@@ -94,26 +94,18 @@ rule all:
9494 )
9595
9696rule copy_config :
97- input :
98- "config.yaml"
99- output :
100- f"{ cfg .data_root } /{{tissue}}/{{tissue}}_config.yaml"
101- resources :
102- mem_mb = 256 ,
103- runtime = 1 ,
104- tissue = "" # intentionally left blank; reference: github.com/jdblischak/smk-simple-slurm/issues/20
105- shell : "cp --verbose {input} {output}"
97+ localrule : True
98+ input : "config.yaml"
99+ output : f"{ cfg .data_root } /{{tissue}}/{{tissue}}_config.yaml"
100+ shell : "cp {input} {output}"
106101
107102rule preroundup :
103+ localrule : True
108104 output :
109105 layout = f"{ cfg .data_root } /{{tissue}}/layouts/{{tissue}}_{{tag}}_layout.txt" ,
110106 preparation = f"{ cfg .data_root } /{{tissue}}/prepMethods/{{tissue}}_{{tag}}_prep_method.txt" ,
111107 params :
112- sample_name = lambda wildcards : f"{ wildcards .tissue } _{ wildcards .tag } " ,
113- resources :
114- mem_mb = lambda wildcards , attempt : 1024 * attempt ,
115- runtime = lambda wildcards , attempt : 1 * attempt ,
116- tissue = lambda wildcards : wildcards .tissue ,
108+ sample_name = lambda wildcards : f"{ wildcards .tissue } _{ wildcards .tag } "
117109 benchmark : repeat (f"{ cfg .benchmark_dir } /{{tissue}}/preroundup/preroundup_{{tissue}}_{{tag}}.benchmark" , cfg .benchmark_count )
118110 run :
119111 # example row: SRR12873784,effectorcd8_S1R1,PE,total
@@ -354,6 +346,7 @@ rule fastq_dump_single:
354346 resources :
355347 mem_mb = lambda wildcards , attempt : 4096 * attempt ,
356348 runtime = lambda wildcards , attempt : 30 * attempt ,
349+ network_slots = 1 ,
357350 tissue = lambda wildcards : wildcards .tissue
358351 threads : 4
359352 conda : "envs/SRAtools.yaml"
@@ -477,7 +470,7 @@ rule trim_paired:
477470 r2_fastq = f"{ cfg .data_root } /{{tissue}}/trim/{{tissue}}_{{tag}}_2.fastq.gz" ,
478471 r2_report = f"{ cfg .data_root } /{{tissue}}/trim/{{tissue}}_{{tag}}_2_trimming_report.txt" ,
479472 resources :
480- mem_mb = lambda wildcards , attempt : 4096 * attempt ,
473+ mem_mb = lambda wildcards , attempt : 8096 * attempt ,
481474 runtime = lambda wildcards , attempt : 45 * attempt ,
482475 tissue = lambda wildcards : wildcards .tissue ,
483476 threads : 4
@@ -525,7 +518,7 @@ rule trim_single:
525518 # See the trim_galore `--cores` setting for details on why 16 was chosen
526519 # https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md
527520 resources :
528- mem_mb = lambda wildcards , attempt : 4096 * attempt ,
521+ mem_mb = lambda wildcards , attempt : 8096 * attempt ,
529522 runtime = lambda wildcards , attempt : 45 * attempt ,
530523 tissue = lambda wildcards : wildcards .tissue ,
531524 threads : 4
@@ -851,7 +844,7 @@ rule fragment_size:
851844 bed_filepath = rules .download_genome .output ,
852845 resources :
853846 mem_mb = lambda wildcards , attempt : 4096 * attempt ,
854- runtime = lambda wildcards , attempt : 20 * attempt ,
847+ runtime = lambda wildcards , attempt : 40 * attempt ,
855848 tissue = lambda wildcards : wildcards .tissue ,
856849 conda : "envs/rseqc.yaml"
857850 threads : 4
@@ -948,57 +941,28 @@ rule rnaseq_metrics:
948941 """
949942
950943rule copy_fragment_size :
951- input :
952- rules .fragment_size .output ,
953- output :
954- f"{ cfg .como_root } /{{tissue}}/fragmentSizes/{{sample}}/{{tissue}}_{{tag}}_fragment_size.txt"
955- resources :
956- mem_mb = 256 ,
957- runtime = 1 ,
958- tissue = lambda wildcards : wildcards .tissue ,
959- benchmark : repeat (f"{ cfg .benchmark_dir } /{{tissue}}/copy_fragment_size/copy_fragment_size_{{sample}}/{{tissue}}_{{tag}}.benchmark" ,cfg .benchmark_count )
960- shell :
961- """cp --verbose {input} {output}"""
944+ localrule : True
945+ input : rules .fragment_size .output ,
946+ output : f"{ cfg .como_root } /{{tissue}}/fragmentSizes/{{sample}}/{{tissue}}_{{tag}}_fragment_size.txt"
947+ shell : """cp {input} {output}"""
962948
963949rule copy_insert_size :
964- input :
965- rules .insert_size .output .txt ,
966- output :
967- f"{ cfg .como_root } /{{tissue}}/insertSizeMetrics/{{sample}}/{{tissue}}_{{tag}}_insert_size.txt"
968- resources :
969- mem_mb = 256 ,
970- runtime = 1 ,
971- tissue = lambda wildcards : wildcards .tissue ,
972- benchmark : repeat (f"{ cfg .benchmark_dir } /{{tissue}}/copy_insert_size/copy_insert_size_{{sample}}/{{tissue}}_{{tag}}.benchmark" ,cfg .benchmark_count )
973- shell :
974- """cp --verbose {input} {output}"""
950+ localrule : True
951+ input : rules .insert_size .output .txt ,
952+ output : f"{ cfg .como_root } /{{tissue}}/insertSizeMetrics/{{sample}}/{{tissue}}_{{tag}}_insert_size.txt"
953+ shell : """cp {input} {output}"""
975954
976955rule copy_rnaseq_metrics :
977- input :
978- rules .rnaseq_metrics .output .strand ,
979- output :
980- f"{ cfg .como_root } /{{tissue}}/strandedness/{{sample}}/{{tissue}}_{{tag}}_strandedness.txt"
981- resources :
982- mem_mb = 256 ,
983- runtime = 1 ,
984- tissue = lambda wildcards : wildcards .tissue ,
985- benchmark : repeat (f"{ cfg .benchmark_dir } /{{tissue}}/copy_rnaseq_metrics/copy_rnaseq_metrics_{{sample}}/{{tissue}}_{{tag}}.benchmark" ,cfg .benchmark_count )
986- shell :
987- """cp --verbose {input} {output}"""
988-
956+ localrule : True
957+ input : rules .rnaseq_metrics .output .strand ,
958+ output : f"{ cfg .como_root } /{{tissue}}/strandedness/{{sample}}/{{tissue}}_{{tag}}_strandedness.txt"
959+ shell : """cp {input} {output}"""
989960
990961rule copy_gene_counts :
991- input :
992- rules .align .output .gene_table ,
993- output :
994- f"{ cfg .como_root } /{{tissue}}/geneCounts/{{sample}}/{{tissue}}_{{tag}}.tab"
995- resources :
996- mem_mb = 256 ,
997- runtime = 1 ,
998- tissue = lambda wildcards : wildcards .tissue ,
999- benchmark : repeat (f"{ cfg .benchmark_dir } /{{tissue}}/copy_gene_counts/copy_gene_counts_{{sample}}/{{tissue}}_{{tag}}.benchmark" ,cfg .benchmark_count )
1000- shell :
1001- """cp --verbose {input} {output}"""
962+ localrule : True
963+ input : rules .align .output .gene_table ,
964+ output : f"{ cfg .como_root } /{{tissue}}/geneCounts/{{sample}}/{{tissue}}_{{tag}}.tab"
965+ shell : """cp {input} {output}"""
1002966
1003967
1004968def multiqc_contamination_input (wildcards ) -> list [str ]:
0 commit comments