Skip to content
Snippets Groups Projects
Commit 9308bd60 authored by Dominik Burri's avatar Dominik Burri
Browse files

use shadow keyword correctly #137. Make kallisto multithreaded. Correct TIN score multithreading.

parent 79c3d9fd
No related branches found
No related tags found
1 merge request!78Remove unnecessary files in results directory
Pipeline #11841 passed
...@@ -166,7 +166,7 @@ rule fastqc: ...@@ -166,7 +166,7 @@ rule fastqc:
shell: shell:
"(mkdir -p {output.outdir}; \ "(mkdir -p {output.outdir}; \
fastqc --outdir {output.outdir} {input.reads}) \ fastqc --outdir {output.outdir} --threads {threads} {input.reads}) \
1> {log.stdout} 2> {log.stderr}" 1> {log.stdout} 2> {log.stderr}"
...@@ -345,8 +345,6 @@ rule create_index_salmon: ...@@ -345,8 +345,6 @@ rule create_index_salmon:
"{kmer}", "{kmer}",
"salmon.idx")) "salmon.idx"))
shadow: "full"
params: params:
kmerLen = "{kmer}" kmerLen = "{kmer}"
...@@ -531,8 +529,6 @@ rule calculate_TIN_scores: ...@@ -531,8 +529,6 @@ rule calculate_TIN_scores:
"TIN", "TIN",
"TIN_score.tsv")) "TIN_score.tsv"))
shadow: "full"
params: params:
sample = "{sample}" sample = "{sample}"
...@@ -554,7 +550,7 @@ rule calculate_TIN_scores: ...@@ -554,7 +550,7 @@ rule calculate_TIN_scores:
-r {input.transcripts_bed12} \ -r {input.transcripts_bed12} \
-c 0 \ -c 0 \
--names {params.sample} \ --names {params.sample} \
-n 100 > {output.TIN_score};) 2> {log.stderr}" -n {threads} > {output.TIN_score};) 2> {log.stderr}"
rule merge_TIN_scores: rule merge_TIN_scores:
...@@ -1126,8 +1122,6 @@ rule generate_alfa_index: ...@@ -1126,8 +1122,6 @@ rule generate_alfa_index:
"ALFA", "ALFA",
"sorted_genes.unstranded.ALFA_index") "sorted_genes.unstranded.ALFA_index")
shadow: "full"
params: params:
genome_index = "sorted_genes", genome_index = "sorted_genes",
out_dir = lambda wildcards, output: out_dir = lambda wildcards, output:
......
...@@ -203,12 +203,12 @@ rule pe_map_genome_star: ...@@ -203,12 +203,12 @@ rule pe_map_genome_star:
"map_genome", "map_genome",
"{sample}.pe.Log.final.out") "{sample}.pe.Log.final.out")
shadow: "full" shadow: "minimal"
params: params:
sample_id = "{sample}", sample_id = "{sample}",
index = lambda wildcards: index = lambda wildcards:
os.path.join( os.path.abspath(os.path.join(
config["star_indexes"], config["star_indexes"],
get_sample( get_sample(
'organism', 'organism',
...@@ -218,7 +218,7 @@ rule pe_map_genome_star: ...@@ -218,7 +218,7 @@ rule pe_map_genome_star:
'index_size', 'index_size',
search_id='index', search_id='index',
search_value=wildcards.sample), search_value=wildcards.sample),
"STAR_index"), "STAR_index")),
outFileNamePrefix = os.path.join( outFileNamePrefix = os.path.join(
config["output_dir"], config["output_dir"],
"samples", "samples",
...@@ -339,7 +339,7 @@ rule pe_quantification_salmon: ...@@ -339,7 +339,7 @@ rule pe_quantification_salmon:
"libParams", "libParams",
"flenDist.txt") "flenDist.txt")
shadow: "full" shadow: "minimal"
params: params:
output_dir = os.path.join( output_dir = os.path.join(
...@@ -423,7 +423,7 @@ rule pe_genome_quantification_kallisto: ...@@ -423,7 +423,7 @@ rule pe_genome_quantification_kallisto:
"quant_kallisto", "quant_kallisto",
"abundance.h5") "abundance.h5")
shadow: "full" shadow: "minimal"
params: params:
output_dir = os.path.join( output_dir = os.path.join(
...@@ -454,6 +454,7 @@ rule pe_genome_quantification_kallisto: ...@@ -454,6 +454,7 @@ rule pe_genome_quantification_kallisto:
-i {input.index} \ -i {input.index} \
-o {params.output_dir} \ -o {params.output_dir} \
--pseudobam \ --pseudobam \
-t {threads} \
{params.directionality}-stranded \ {params.directionality}-stranded \
{input.reads1} {input.reads2} > {output.pseudoalignment}) \ {input.reads1} {input.reads2} > {output.pseudoalignment}) \
2> {log.stderr}" 2> {log.stderr}"
......
...@@ -151,16 +151,16 @@ rule map_genome_star: ...@@ -151,16 +151,16 @@ rule map_genome_star:
"map_genome", "map_genome",
"{sample}.se.Log.final.out") "{sample}.se.Log.final.out")
shadow: "full" shadow: "minimal"
params: params:
sample_id = "{sample}", sample_id = "{sample}",
index = lambda wildcards: index = lambda wildcards:
os.path.join( os.path.abspath(os.path.join(
config["star_indexes"], config["star_indexes"],
get_sample('organism', search_id='index', search_value=wildcards.sample), get_sample('organism', search_id='index', search_value=wildcards.sample),
get_sample('index_size', search_id='index', search_value=wildcards.sample), get_sample('index_size', search_id='index', search_value=wildcards.sample),
"STAR_index"), "STAR_index")),
outFileNamePrefix = os.path.join( outFileNamePrefix = os.path.join(
config["output_dir"], config["output_dir"],
"samples", "samples",
...@@ -276,7 +276,7 @@ rule quantification_salmon: ...@@ -276,7 +276,7 @@ rule quantification_salmon:
"libParams", "libParams",
"flenDist.txt") "flenDist.txt")
shadow: "full" shadow: "minimal"
params: params:
output_dir = os.path.join( output_dir = os.path.join(
...@@ -365,8 +365,7 @@ rule genome_quantification_kallisto: ...@@ -365,8 +365,7 @@ rule genome_quantification_kallisto:
"quant_kallisto", "quant_kallisto",
"abundance.h5") "abundance.h5")
shadow: "minimal"
shadow: "full"
params: params:
output_dir = os.path.join( output_dir = os.path.join(
...@@ -410,6 +409,7 @@ rule genome_quantification_kallisto: ...@@ -410,6 +409,7 @@ rule genome_quantification_kallisto:
-l {params.fraglen} \ -l {params.fraglen} \
-s {params.fragsd} \ -s {params.fragsd} \
--pseudobam \ --pseudobam \
-t {threads} \
{params.directionality}-stranded \ {params.directionality}-stranded \
{input.reads} > {output.pseudoalignment};) \ {input.reads} > {output.pseudoalignment};) \
2> {log.stderr}" 2> {log.stderr}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment