-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #725 from maxplanck-ie/develop
Develop
- Loading branch information
Showing
31 changed files
with
514 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name condition group | ||
sample1 sample1 Control All | ||
sample2 sample2 Control All | ||
sample3 sample3 Treatment Group1 | ||
sample4 sample4 Treatment Group1 | ||
sample5 sample5 Treatment Group2 | ||
sample6 sample6 Treatment Group2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package: | ||
name: snakepipes | ||
version: 2.3.1 | ||
version: 2.4.0 | ||
|
||
source: | ||
path: ../ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.3.1' | ||
__version__ = '2.4.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
## function to get the name of the samplesheet and extend the name of the folder DESeq2 to DESeq2_[name] | ||
def get_outdir(folder_name,sampleSheet): | ||
sample_name = os.path.splitext(os.path.basename(str(sampleSheet)))[0] | ||
|
||
return("{}_{}".format(folder_name, sample_name)) | ||
|
||
checkpoint split_sampleSheet: | ||
input: | ||
sampleSheet = sampleSheet | ||
output: | ||
splitSheets = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv") | ||
params: | ||
splitSheetPfx = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0]) | ||
run: | ||
if isMultipleComparison: | ||
cf.splitSampleSheet(input.sampleSheet,params.splitSheetPfx) | ||
|
||
|
||
## DESeq2 (on featureCounts) | ||
rule DESeq2: | ||
input: | ||
counts_table = lambda wildcards : "featureCounts/counts_allelic.tsv" if 'allelic-mapping' in mode else "featureCounts/counts.tsv", | ||
sampleSheet = lambda wildcards: checkpoints.split_sampleSheet.get(compGroup=wildcards.compGroup).output, | ||
symbol_file = "Annotation/genes.filtered.symbol" #get_symbol_file | ||
output: | ||
"{}/DESeq2.session_info.txt".format(get_outdir("DESeq2",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
benchmark: | ||
"{}/.benchmark/DESeq2.featureCounts.benchmark".format(get_outdir("DESeq2",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
params: | ||
script=os.path.join(maindir, "shared", "rscripts", "DESeq2.R"), | ||
outdir = lambda wildcards,input: get_outdir("DESeq2",input.sampleSheet), | ||
sampleSheet = lambda wildcards,input: os.path.join(outdir,str(input.sampleSheet)), | ||
fdr = 0.05, | ||
importfunc = os.path.join(maindir, "shared", "rscripts", "DE_functions.R"), | ||
allele_info = lambda wildcards : 'TRUE' if 'allelic-mapping' in mode else 'FALSE', | ||
tx2gene_file = 'NA', | ||
rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd") | ||
log: | ||
out = "{}/logs/DESeq2.out".format(get_outdir("DESeq2",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")), | ||
err = "{}/logs/DESeq2.err".format(get_outdir("DESeq2",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
conda: CONDA_RNASEQ_ENV | ||
shell: | ||
"cd {params.outdir} && " | ||
"Rscript {params.script} " | ||
"{params.sampleSheet} " # 1 | ||
"../{input.counts_table} " # 2 | ||
"{params.fdr} " # 3 | ||
"../{input.symbol_file} " # 4 | ||
"{params.importfunc} " # 5 | ||
"{params.allele_info} " # 6 | ||
"{params.tx2gene_file} " # 7 | ||
"{params.rmdTemplate} " # 8 | ||
" > ../{log.out} 2> ../{log.err}" | ||
|
||
|
||
## DESeq2 (on Salmon) | ||
rule DESeq2_Salmon: | ||
input: | ||
counts_table = "Salmon/counts.transcripts.tsv", | ||
sampleSheet = lambda wildcards: checkpoints.split_sampleSheet.get(compGroup=wildcards.compGroup).output, | ||
tx2gene_file = "Annotation/genes.filtered.t2g", | ||
symbol_file = "Annotation/genes.filtered.symbol" #get_symbol_file | ||
output: | ||
"{}/DESeq2.session_info.txt".format(get_outdir("DESeq2_Salmon",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
log: | ||
out = "{}/logs/DESeq2.out".format(get_outdir("DESeq2_Salmon",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")), | ||
err = "{}/logs/DESeq2.err".format(get_outdir("DESeq2_Salmon",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
benchmark: | ||
"{}/.benchmark/DESeq2.Salmon.benchmark".format(get_outdir("DESeq2_Salmon",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")) | ||
params: | ||
script=os.path.join(maindir, "shared", "rscripts", "DESeq2.R"), | ||
outdir = lambda wildcards,input: get_outdir("DESeq2_Salmon",input.sampleSheet), | ||
sampleSheet = lambda wildcards,input: os.path.join(outdir,str(input.sampleSheet)), | ||
fdr = 0.05, | ||
importfunc = os.path.join(maindir, "shared", "rscripts", "DE_functions.R"), | ||
allele_info = 'FALSE', | ||
tx2gene_file = "Annotation/genes.filtered.t2g", | ||
rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd") | ||
conda: CONDA_RNASEQ_ENV | ||
shell: | ||
"cd {params.outdir} && " | ||
"Rscript {params.script} " | ||
"{params.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}" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: snakepipes_rMats_environment_0.1 | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- python >= 3 | ||
- rmats = 4.1.0 | ||
- samtools = 1.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ channels: | |
- bioconda | ||
dependencies: | ||
- python=3.8 | ||
- pip: | ||
- loompy | ||
- loompy=3.0.6 |
Oops, something went wrong.