Skip to content

Commit

Permalink
Always declare GTF_FILE as an input when it's used.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekado committed May 24, 2024
1 parent 7a2641b commit 17b1d03
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions snakefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,18 @@ def trim_reads_input(args):
shell: "{FASTP_EXEC} --in1 {input[0]} --out1 {output.r} -h {output.html} -j {output.json} >> {log} 2>&1 "

rule star_index:
input:
GENOME_FASTA,
rules.check_annotation_files.output
input:
gtf = GTF_FILE,
genome = GENOME_FASTA,
checked = rules.check_annotation_files.output
output:
star_index_file = os.path.join(OUTPUT_DIR, 'star_index', "SAindex")
resources:
mem_mb = config['execution']['rules']['star_index']['memory']
params:
star_index_dir = os.path.join(OUTPUT_DIR, 'star_index')
log: os.path.join(LOG_DIR, 'star_index.log')
shell: "{STAR_EXEC_INDEX} --runMode genomeGenerate --runThreadN {STAR_INDEX_THREADS} --genomeDir {params.star_index_dir} --genomeFastaFiles {input[0]} --sjdbGTFfile {GTF_FILE} >> {log} 2>&1"
shell: "{STAR_EXEC_INDEX} --runMode genomeGenerate --runThreadN {STAR_INDEX_THREADS} --genomeDir {params.star_index_dir} --genomeFastaFiles {input.genome} --sjdbGTFfile {input.gtf} >> {log} 2>&1"

rule hisat2_index:
input:
Expand Down Expand Up @@ -459,6 +460,7 @@ def hisat2_file_arguments(args):

rule salmon_quant:
input:
gtf = GTF_FILE,
index_tar = rules.salmon_index.output.tar,
reads = map_input
output:
Expand All @@ -482,7 +484,7 @@ def hisat2_file_arguments(args):
-p {SALMON_QUANT_THREADS} {pe_se_args} \
-o {params.outfolder} \
--seqBias --gcBias \
-g {GTF_FILE} && \
-g {input.gtf} && \
mkdir -p $(dirname {output.salmon_quant_tar}) && \
cd {SALMON_DIR} && tar cf {output.salmon_quant_tar}.temp {wildcards.sample} && \
mv {output.salmon_quant_tar}.temp {output.salmon_quant_tar}) >> {log} 2>&1"
Expand Down

0 comments on commit 17b1d03

Please sign in to comment.