Skip to content

Commit

Permalink
Add gtf file to inputs instead of referencing it directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekado committed May 24, 2024
1 parent df9da49 commit a669397
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions snakefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ def hisat2_file_arguments(args):

rule count_reads:
input:
gtf = GTF_FILE,
bam = os.path.join(MAPPED_READS_DIR, MAPPER, "{sample}_Aligned.sortedByCoord.out.bam"),
bai = os.path.join(MAPPED_READS_DIR, MAPPER, "{sample}_Aligned.sortedByCoord.out.bam.bai")
output:
Expand All @@ -564,7 +565,7 @@ def hisat2_file_arguments(args):
group_by = config['counting']['group_feature_by'],
yield_size = config['counting']['yield_size']
shell:
"{RSCRIPT_EXEC} {SCRIPTS_DIR}/count_reads.R {wildcards.sample} {input.bam} {GTF_FILE} \
"{RSCRIPT_EXEC} {SCRIPTS_DIR}/count_reads.R {wildcards.sample} {input.bam} {input.gtf} \
{params.single_end} {params.mode} {params.nonunique} {params.strandedness} \
{params.feature} {params.group_by} {params.yield_size} >> {log} 2>&1"

Expand Down Expand Up @@ -605,6 +606,7 @@ def hisat2_file_arguments(args):

rule report1:
input:
gtf=GTF_FILE,
counts=os.path.join(COUNTS_DIR, "raw_counts", MAPPER, "counts.tsv"),
coldata=str(rules.translate_sample_sheet_for_report.output),
params:
Expand All @@ -630,7 +632,7 @@ def hisat2_file_arguments(args):
--reportFile={params.reportRmd} \
--countDataFile={input.counts} \
--colDataFile={input.coldata} \
--gtfFile={GTF_FILE} \
--gtfFile={input.gtf} \
--caseSampleGroups='{params.case}' \
--controlSampleGroups='{params.control}' \
--covariates='{params.covariates}' \
Expand Down Expand Up @@ -658,6 +660,7 @@ def hisat2_file_arguments(args):

rule report2:
input:
gtf=GTF_FILE,
counts=os.path.join(COUNTS_DIR, "raw_counts", "salmon", "counts_from_SALMON.transcripts.tsv"),
coldata=str(rules.translate_sample_sheet_for_report.output)
params:
Expand All @@ -682,7 +685,7 @@ def hisat2_file_arguments(args):
--reportFile={params.reportRmd} \
--countDataFile={input.counts} \
--colDataFile={input.coldata} \
--gtfFile={GTF_FILE} \
--gtfFile={input.gtf} \
--caseSampleGroups='{params.case}' \
--controlSampleGroups='{params.control}' \
--covariates='{params.covariates}' \
Expand Down Expand Up @@ -710,6 +713,7 @@ def hisat2_file_arguments(args):

rule report3:
input:
gtf=GTF_FILE,
counts=os.path.join(COUNTS_DIR, "raw_counts", "salmon", "counts_from_SALMON.genes.tsv"),
coldata=str(rules.translate_sample_sheet_for_report.output)
params:
Expand All @@ -734,7 +738,7 @@ def hisat2_file_arguments(args):
--reportFile={params.reportRmd} \
--countDataFile={input.counts} \
--colDataFile={input.coldata} \
--gtfFile={GTF_FILE} \
--gtfFile={input.gtf} \
--caseSampleGroups='{params.case}' \
--controlSampleGroups='{params.control}' \
--covariates='{params.covariates}' \
Expand Down

0 comments on commit a669397

Please sign in to comment.