From 438508189cb2a2e4a6cc45fdcdff4319ca5e2e6f Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Wed, 10 Apr 2024 11:57:49 +0200 Subject: [PATCH] deseq2 salmon --- .../shared/rules/DESeq2.singleComp.snakefile | 41 ++++++------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/snakePipes/shared/rules/DESeq2.singleComp.snakefile b/snakePipes/shared/rules/DESeq2.singleComp.snakefile index c62349da9..2e506fd5b 100644 --- a/snakePipes/shared/rules/DESeq2.singleComp.snakefile +++ b/snakePipes/shared/rules/DESeq2.singleComp.snakefile @@ -52,23 +52,14 @@ rule DESeq2_Salmon_basic: fdr = fdr, importfunc = os.path.join(maindir, "shared", "rscripts", "DE_functions.R"), allele_info = 'FALSE', - tx2gene_file = "Annotation/genes.filtered.t2g", + tx2gene_file = os.path.join(outdir,"Annotation/genes.filtered.t2g"), rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd"), - formula = config["formula"] + formula = config["formula"], + counts_table = lambda wildcards,input: os.path.join(outdir,input.counts_table), + symbol_file = lambda wildcards,input: os.path.join(outdir,input.symbol_file) conda: CONDA_RNASEQ_ENV - shell: - "cd {params.outdir} && " - "Rscript {params.script} " - "{input.sampleSheet} " # 1 - "../{input.counts_table} " # 2 - "{params.fdr} " # 3 - "../{input.symbol_file} " # 4 - "{params.importfunc} " # 5 - "{params.allele_info} " # 6 - "../{input.tx2gene_file} " # 7 - "{params.rmdTemplate} " # 8 - "{params.formula} " # 9 - " > ../{log.out} 2> ../{log.err}" + script: "{params.script}" + rule DESeq2_Salmon_allelic: input: @@ -89,18 +80,10 @@ rule DESeq2_Salmon_allelic: fdr = fdr, importfunc = os.path.join(maindir, "shared", "rscripts", "DE_functions.R"), allele_info = 'TRUE', - tx2gene_file = "Annotation/genes.filtered.t2g", - rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd") + tx2gene_file = os.path.join(outdir,"Annotation/genes.filtered.t2g"), + rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd"), + formula = config["formula"], + counts_table = lambda wildcards,input: os.path.join(outdir,input.counts_table), + symbol_file = lambda wildcards,input: os.path.join(outdir,input.symbol_file) conda: CONDA_RNASEQ_ENV - shell: - "cd {params.outdir} && " - "Rscript {params.script} " - "{input.sampleSheet} " # 1 - "../{input.counts_table} " # 2 - "{params.fdr} " # 3 - "../{input.symbol_file} " # 4 - "{params.importfunc} " # 5 - "{params.allele_info} " # 6 - "../{input.tx2gene_file} " # 7 - "{params.rmdTemplate} " # 8 - " > ../{log.out} 2> ../{log.err}" + script: "{params.script}"