From 2039bcacd851bea488b581b6a5118a7034cdd5dc Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 11:53:21 +0200 Subject: [PATCH 01/51] added salmon allelic --- .../shared/rules/Salmon_allelic.snakefile | 170 ++++++++++++++++++ snakePipes/workflows/mRNA-seq/Snakefile | 69 +++---- 2 files changed, 209 insertions(+), 30 deletions(-) create mode 100755 snakePipes/shared/rules/Salmon_allelic.snakefile diff --git a/snakePipes/shared/rules/Salmon_allelic.snakefile b/snakePipes/shared/rules/Salmon_allelic.snakefile new file mode 100755 index 000000000..ed4df369b --- /dev/null +++ b/snakePipes/shared/rules/Salmon_allelic.snakefile @@ -0,0 +1,170 @@ +allelic_suffix = ['genome1', 'genome2'] + +## Salmon Index + +rule SalmonIndex: + input: + "Annotation/genes.filtered.fa", + genome_fasta + output: + "Salmon/SalmonIndex/decoys.txt", + temp("Salmon/SalmonIndex/seq.fa"), + "Salmon/SalmonIndex/seq.bin" + benchmark: + "Salmon/.benchmark/Salmon.index.benchmark" + params: + salmonIndexOptions = salmonIndexOptions + log: + out = "Salmon/SalmonIndex/SalmonIndex.out", + err = "Salmon/SalmonIndex/SalmonIndex.err", + threads: lambda wildcards: 16 if 16" {input[1]} | cut -d " " -f 1 | tr -d ">" > {output[0]} + cat {input[0]} {input[1]} > {output[1]} + salmon index -p {threads} -t {output[1]} -d {output[0]} -i Salmon/SalmonIndex {params.salmonIndexOptions} > {log.out} 2> {log.err} + """ + + +def getSalmon_libtype(pairedEnd, libraryType): + """ + Convert from a featureCounts library type to a HISAT2 option string + """ + if pairedEnd: + if libraryType == 1: + return "ISF" + elif libraryType == 2: + return "ISR" + else: + return "IU" + else: + if libraryType == 1: + return "SF" + elif libraryType == 2: + return "SR" + else: + return "U" + +## Salmon quant, the bootstraps are needed in Sleuth +if pairedEnd: + rule getAllelicFQ: + input: + allelic_bam="allelic_bams/{sample}.{allelic_suffix}.sorted.bam", + allelic_bai="allelic_bams/{sample}.{allelic_suffix}.sorted.bam.bai" + output: + r1="allelicFASTQ/{sample}.{allelic_suffix}_R1.fastq.gz", + r2="allelicFASTQ/{sample}.{allelic_suffix}_R2.fastq.gz" + log: "allelicFASTQ/logs/bam2fq.{sample}.{allelic_suffix}.log" + benchmark: "allelicFASTQ/.benchmark/bam2fq.{sample}.{allelic_suffix}.benchmark" + threads: 4 + conda: CONDA_SHARED_ENV + shell: """ + samtools collate -@ {threads} -u -O {input.allelic_bam} | \\ +samtools fastq -1 {output.r1} -2 {output.r2} -0 /dev/null -s /dev/null -n \\ + 2> {log} + """ + rule SalmonQuant: + input: + r1 = "allelicFASTQ/{sample}.{allelic_suffix}_R1.fastq.gz", + r2 = "allelicFASTQ/{sample}.{allelic_suffix}_R2.fastq.gz", + bin = "Salmon/SalmonIndex/seq.bin" + output: + quant = "SalmonAllelic/{sample}.{allelic_suffix}/quant.sf" + log: "SalmonAllelic/logs/{sample}.{allelic_suffix}.quant.log" + benchmark: + "SalmonAllelic/.benchmark/SalmonQuant.{sample}.{allelic_suffix}.benchmark" + params: + outdir = "SalmonAllelic/{sample}.{allelic_suffix}", + gtf = genes_gtf, + lib_type = getSalmon_libtype(pairedEnd, libraryType) + threads: 8 + conda: CONDA_RNASEQ_ENV + shell: """ + salmon quant -p {threads} --softclipOverhangs --validateMappings --numBootstraps 50 -i Salmon/SalmonIndex -l {params.lib_type} -1 {input.r1} -2 {input.r2} -o {params.outdir} 2> {log} + """ +else: + rule getAllelicFQ: + input: + allelic_bam="allelic_bams/{sample}.{allelic_suffix}.sorted.bam", + allelic_bai="allelic_bams/{sample}.{allelic_suffix}.sorted.bam.bai" + output: + r1="allelicFASTQ/{sample}.{allelic_suffix}_R1.fastq.gz" + log: "allelicFASTQ/logs/bam2fq.{sample}.{allelic_suffix}.log" + benchmark: "allelicFASTQ/.benchmark/bam2fq.{sample}.{allelic_suffix}.benchmark" + threads: 4 + conda: CONDA_SHARED_ENV + shell: """ + samtools collate -@ {threads} -u -O {input.allelic_bam} | \\ +samtools fastq -1 /dev/null -2 /dev/null -0 /dev/null -s {output.r1} -n \\ + 2> {log} + """ + rule SalmonQuant: + input: + fastq = "allelicFASTQ/{sample}.{allelic_suffix}_R1.fastq.gz", + bin = "SalmonAllelic/SalmonIndex/seq.bin", + output: + quant = "SalmonAllelic/{sample}.{allelic_suffix}/quant.sf" + log: "SalmonAllelic/logs/{sample}.{allelic_suffix}.quant.log" + benchmark: + "SalmonAllelic/.benchmark/SalmonQuant.{sample}.{allelic_suffix}.benchmark" + params: + outdir = "SalmonAllelic/{sample}.{allelic_suffix}", + gtf = genes_gtf, + lib_type = getSalmon_libtype(pairedEnd, libraryType) + threads: 8 + conda: CONDA_RNASEQ_ENV + shell: """ + salmon quant -p {threads} --softclipOverhangs --validateMappings --numBootstraps 50 -i Salmon/SalmonIndex -l {params.lib_type} -r {input.fastq} -o {params.outdir} 2> {log} + """ + + +rule Salmon_symlinks: + input: + quant = "SalmonAllelic/{sample}.{allelic_suffix}/quant.sf" + output: + quant = "SalmonAllelic/{sample}.{allelic_suffix}.quant.sf" + shell: """ + ln -s ../{input.quant} {output.quant} + """ + + +rule Salmon_TPM: + input: + expand("SalmonAllelic/{sample}.{allelic_suffix}.quant.sf", sample=samples,allelic_suffix=allelic_suffix) + output: + "SalmonAllelic/TPM.transcripts.tsv" + benchmark: + "SalmonAllelic/.benchmark/Salmon_TPM.benchmark" + log: + "SalmonAllelic/logs/Salmon_TPM.log" + conda: CONDA_RNASEQ_ENV + shell: + "Rscript "+os.path.join(maindir, "shared", "rscripts", "merge_count_tables.R")+" Name TPM {output} {input} " + + +rule Salmon_counts: + input: + expand("SalmonAllelic/{sample}.{allelic_suffix}.quant.sf", sample=samples,allelic_suffix=allelic_suffix) + output: + "SalmonAllelic/counts.transcripts.tsv" + benchmark: + "SalmonAllelic/.benchmark/Salmon_counts.benchmark" + log: + "SalmonAllelic/logs/Salmon_counts.log" + conda: CONDA_RNASEQ_ENV + shell: + "Rscript "+os.path.join(maindir, "shared", "rscripts", "merge_count_tables.R")+" Name NumReads {output} {input} " + + +## Prepare Salmon output for Sleuth +rule Salmon_wasabi: + input: + "SalmonAllelic/{sample}.{allelic_suffix}.quant.sf" + output: + "SalmonAllelic/{sample}.{allelic_suffix}/abundance.h5" + log: "SalmonAllelic/logs/{sample}.{allelic_suffix}.wasabi.log" + params: + "SalmonAllelic/{sample}.{allelic_suffix}/" + conda: CONDA_RNASEQ_ENV + shell: + "Rscript "+os.path.join(maindir, "shared", "rscripts", "wasabi.R")+" {params} 2> {log}" diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index baf145378..74918b961 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -71,19 +71,21 @@ if not fromBAM: include: os.path.join(maindir, "shared", "rules", "SNPsplit.snakefile") # deepTools QC include: os.path.join(maindir, "shared", "rules", "deepTools_RNA_allelic.snakefile") + if "alignment-free" in mode: + include: os.path.join(maindir, "shared", "rules", "Salmon_allelic.snakefile") else: # HISAT2/STAR include: os.path.join(maindir, "shared", "rules", "RNA_mapping.snakefile") - ## Salmon - if "alignment-free" in mode: - include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") - ## Sleuth (on Salmon) - if sampleSheet: - if isMultipleComparison: - include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") - else: - include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") + ## Salmon + if "alignment-free" in mode: + include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") + ## Sleuth (on Salmon) + if sampleSheet: + if isMultipleComparison: + include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") + else: + include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") else: fastqc=False @@ -146,27 +148,34 @@ def run_Trimming(trim, fastqc): def run_alignment_free(): if "alignment-free" in mode: - file_list = [ - expand("Salmon/{sample}.quant.sf", sample=samples), - "Salmon/TPM.transcripts.tsv", - "Salmon/counts.transcripts.tsv", - expand("Salmon/{sample}/abundance.h5", sample=samples) ] - - if sampleSheet: - sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] - if not isMultipleComparison: - file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) - if cf.check_replicates(sampleSheet): - file_list.append( ["sleuth_Salmon_{}/so.rds".format(sample_name)] ) - if rMats: - file_list.append( ["rMats_{}/RI.MATS.JCEC.txt".format(sample_name)] ) - file_list.append( ["rMats_{}/b2.csv".format(sample_name)] ) - else: - file_list.append(expand("DESeq2_Salmon_{}".format(sample_name) + ".{compGroup}/DESeq2.session_info.txt",compGroup=cf.returnComparisonGroups(sampleSheet))) - file_list.append(expand("sleuth_Salmon_{}".format(sample_name) + ".{compGroup}/so.rds",compGroup=cf.returnComparisonGroups(sampleSheet))) - if rMats: - file_list.append(expand("rMats_{}".format(sample_name) + ".{compGroup}/RI.MATS.JCEC.txt",compGroup=cf.returnComparisonGroups(sampleSheet))) - file_list.append(expand("rMats_{}".format(sample_name) + ".{compGroup}/b2.csv",compGroup=cf.returnComparisonGroups(sampleSheet))) + if not "allelic-mapping" in mode: + file_list = [ + expand("Salmon/{sample}.quant.sf", sample=samples), + "Salmon/TPM.transcripts.tsv", + "Salmon/counts.transcripts.tsv", + expand("Salmon/{sample}/abundance.h5", sample=samples) ] + + if sampleSheet: + sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] + if not isMultipleComparison: + file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) + if cf.check_replicates(sampleSheet): + file_list.append( ["sleuth_Salmon_{}/so.rds".format(sample_name)] ) + if rMats: + file_list.append( ["rMats_{}/RI.MATS.JCEC.txt".format(sample_name)] ) + file_list.append( ["rMats_{}/b2.csv".format(sample_name)] ) + else: + file_list.append(expand("DESeq2_Salmon_{}".format(sample_name) + ".{compGroup}/DESeq2.session_info.txt",compGroup=cf.returnComparisonGroups(sampleSheet))) + file_list.append(expand("sleuth_Salmon_{}".format(sample_name) + ".{compGroup}/so.rds",compGroup=cf.returnComparisonGroups(sampleSheet))) + if rMats: + file_list.append(expand("rMats_{}".format(sample_name) + ".{compGroup}/RI.MATS.JCEC.txt",compGroup=cf.returnComparisonGroups(sampleSheet))) + file_list.append(expand("rMats_{}".format(sample_name) + ".{compGroup}/b2.csv",compGroup=cf.returnComparisonGroups(sampleSheet))) + else: + file_list = [ + expand("SalmonAllelic/{sample}.{allelic_suffix}.quant.sf", sample=samples,allelic_suffix=allelic_suffix), + "SalmonAllelic/TPM.transcripts.tsv", + "SalmonAllelic/counts.transcripts.tsv", + expand("SalmonAllelic/{sample}.{allelic_suffix}/abundance.h5", sample=samples,allelic_suffix=allelic_suffix) ] return(file_list) else: return([]) From 784e4ca851a0e1f6d81da67a70a1e3830bef26a2 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 12:13:28 +0200 Subject: [PATCH 02/51] News.rst --- docs/content/News.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/News.rst b/docs/content/News.rst index a62ceb9e6..cc3e6b0bb 100755 --- a/docs/content/News.rst +++ b/docs/content/News.rst @@ -9,6 +9,7 @@ snakePipes 2.x.x * Fixed a couple of issues in the ATAC-seq workflow after sofware versions update. * Updated organism yamls. * Added apeglm2 logFC shrinkage to allelic DESeq2 results. +* Added the allelic version of Salmon-based transcript quantitation to mRNA-seq workflow. Will be run if *both* 'allelic-mapping' and 'alignment-free' modes are specified. snakePipes 2.5.4 From 3e85c4e83db46a89f24604c59e54fc33232f3c79 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 12:15:37 +0200 Subject: [PATCH 03/51] test dag --- .ci_stuff/test_dag.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index fec103664..c3cb2420f 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -221,8 +221,9 @@ WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi +WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi -# noncoding-RNA-seq WC=`noncoding-RNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 717 ]; then exit 1 ; fi WC=`noncoding-RNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From f187a3db4cf90500f110a3934ebec1f964afd2f4 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 12:35:53 +0200 Subject: [PATCH 04/51] DESeq2 allelic rule --- snakePipes/shared/rules/DESeq2.singleComp.snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakePipes/shared/rules/DESeq2.singleComp.snakefile b/snakePipes/shared/rules/DESeq2.singleComp.snakefile index 7939f7961..2c8b47e9d 100644 --- a/snakePipes/shared/rules/DESeq2.singleComp.snakefile +++ b/snakePipes/shared/rules/DESeq2.singleComp.snakefile @@ -43,7 +43,7 @@ rule DESeq2: ## DESeq2 (on Salmon) rule DESeq2_Salmon: input: - counts_table = "Salmon/counts.transcripts.tsv", + counts_table = "Salmon/counts.transcripts.tsv" if not "allelic-mapping" in mode else "SalmonAllelic/counts.transcripts.tsv", sampleSheet = sampleSheet, tx2gene_file = "Annotation/genes.filtered.t2g", symbol_file = "Annotation/genes.filtered.symbol" #get_symbol_file From b5f03dfb1b90d96c616fee1fca8b2058cb900bbe Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 12:38:01 +0200 Subject: [PATCH 05/51] Snakefile --- snakePipes/workflows/mRNA-seq/Snakefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index 74918b961..c4a5cd260 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -176,6 +176,10 @@ def run_alignment_free(): "SalmonAllelic/TPM.transcripts.tsv", "SalmonAllelic/counts.transcripts.tsv", expand("SalmonAllelic/{sample}.{allelic_suffix}/abundance.h5", sample=samples,allelic_suffix=allelic_suffix) ] + if sampleSheet: + sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] + if not isMultipleComparison: + file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) return(file_list) else: return([]) From 3f743abb77cd9149a7884b795cdfe981f5da8491 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 23 Sep 2022 13:49:01 +0200 Subject: [PATCH 06/51] multiqc snakefile --- snakePipes/shared/rules/multiQC.snakefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/snakePipes/shared/rules/multiQC.snakefile b/snakePipes/shared/rules/multiQC.snakefile index 7445d94ee..4101a44ed 100755 --- a/snakePipes/shared/rules/multiQC.snakefile +++ b/snakePipes/shared/rules/multiQC.snakefile @@ -71,8 +71,12 @@ def multiqc_input_check(return_value): infiles.append( expand("allelic_bams/{sample}.SNPsplit_sort.yaml", sample = samples) ) indir += "allelic_bams" if "alignment-free" in mode: - infiles.append( expand("Salmon/{sample}/quant.sf", sample = samples) ) - indir += " Salmon " + if "allelic-mapping" in mode: + infiles.append( expand("SalmonAllelic/{sample}.{allelic_suffix}/quant.sf", sample = samples,allelic_suffix=allelic_suffix) ) + indir += " SalmonAllelic " + else: + infiles.append( expand("Salmon/{sample}/quant.sf", sample = samples) ) + indir += " Salmon " elif pipeline == "noncoding-rna-seq": infiles.append(expand("deepTools_qc/estimateReadFiltering/{sample}_filtering_estimation.txt",sample=samples)) indir += " STAR deepTools_qc " From 84ad7fa790b37195bb1f2f27b27a6524c3ac6aea Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 26 Sep 2022 09:44:42 +0200 Subject: [PATCH 07/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index c3cb2420f..51ac0611c 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -222,7 +222,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1795 ]; then exit 1 ; fi WC=`noncoding-RNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 717 ]; then exit 1 ; fi From 18b53cbb9097b6c80f41c22be519652a71153009 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 11:11:32 +0200 Subject: [PATCH 08/51] added fromBAM to allelic mRNAseq --- snakePipes/workflows/mRNA-seq/Snakefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index c4a5cd260..bfd0a8557 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -91,6 +91,14 @@ else: fastqc=False trim=False downsample=None + if "allelic-mapping" in mode: + allele_mode = "from_bam" + star_index_allelic = NmaskedIndex + SNPFile = SNPfile + # SNPsplit + include: os.path.join(maindir, "shared", "rules", "SNPsplit.snakefile") + # deepTools QC + include: os.path.join(maindir, "shared", "rules", "deepTools_RNA_allelic.snakefile") include: os.path.join(maindir, "shared", "rules", "LinkBam.snakefile") From 42dfedbbef8a3e8765e6b84ee88d2b4fa48f4a6a Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 11:45:06 +0200 Subject: [PATCH 09/51] other fromBam fixes for allelic mRNAseq --- snakePipes/shared/rules/SNPsplit.snakefile | 2 +- snakePipes/workflows/mRNA-seq/Snakefile | 2 +- snakePipes/workflows/mRNA-seq/mRNA-seq | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/snakePipes/shared/rules/SNPsplit.snakefile b/snakePipes/shared/rules/SNPsplit.snakefile index d8107d883..37169ab55 100644 --- a/snakePipes/shared/rules/SNPsplit.snakefile +++ b/snakePipes/shared/rules/SNPsplit.snakefile @@ -19,7 +19,7 @@ if aligner == "Bowtie2": "SNPsplit {params.pairedEnd}" " -o {params.outdir} --snp_file {input.snp} {input.bam} 2> {log}" -elif aligner == "STAR": +elif aligner == "STAR" or aligner == "EXTERNAL_BAM": rule snp_split: input: snp = SNPFile, diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index bfd0a8557..4cf0200a1 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -93,7 +93,7 @@ else: downsample=None if "allelic-mapping" in mode: allele_mode = "from_bam" - star_index_allelic = NmaskedIndex + star_index_allelic = NMaskedIndex SNPFile = SNPfile # SNPsplit include: os.path.join(maindir, "shared", "rules", "SNPsplit.snakefile") diff --git a/snakePipes/workflows/mRNA-seq/mRNA-seq b/snakePipes/workflows/mRNA-seq/mRNA-seq index d3cb61b46..2a62d8bd4 100755 --- a/snakePipes/workflows/mRNA-seq/mRNA-seq +++ b/snakePipes/workflows/mRNA-seq/mRNA-seq @@ -152,8 +152,8 @@ def main(): sys.exit("{} is not a valid mode!\n".format(mode)) if "alignment" not in modeTemp and args.UMIDedup: sys.exit("UMIDedup is only valid for \"alignment\" mode!\n") - if args.fromBAM and ("alignment-free" in modeTemp or "allelic-mapping" in modeTemp): - sys.exit("\n--fromBAM can only be used with modes \'alignment\' or \'deepTools_qc\' - use one of these modes or provide fastq files!\n") + if args.fromBAM and ("alignment-free" in modeTemp ): + sys.exit("\n--fromBAM can only be used with modes \'alignment\' , \'allelic-mapping\' or \'deepTools_qc\' - use one of these modes or provide fastq files!\n") if args.fromBAM: args.aligner = "EXTERNAL_BAM" if args.rMats and not args.sampleSheet: From cda5b7554b467665d3b8bad23ae80686c0d18541 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 11:46:57 +0200 Subject: [PATCH 10/51] added dag test --- .ci_stuff/test_dag.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 38a36ccb4..206b61689 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -217,6 +217,8 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi +WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i BAM_input/filtered_bam --fromBAM -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 300af6a88cc6676c295998a38eb16be04067aef5 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 13:37:43 +0200 Subject: [PATCH 11/51] mRNAseq snakefile --- snakePipes/workflows/mRNA-seq/Snakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index 4cf0200a1..a0ddcc79b 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -351,6 +351,7 @@ else: rule all: input: run_alignment(), + run_allelesp_mapping(), run_deepTools_qc(), run_GenomicContamination(), "multiQC/multiqc_report.html" From a9e0b7c2d6b085ef8b4318833da836ca3a7df372 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 13:38:44 +0200 Subject: [PATCH 12/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 206b61689..aed7b4858 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -217,7 +217,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi -WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i BAM_input/filtered_bam --fromBAM -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i BAM_input/filtered_bam --fromBAM -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi From c06c0b00d93c6f85a1776c27499911a8c5bbcd14 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 14:09:14 +0200 Subject: [PATCH 13/51] does this work --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index aed7b4858..d1c6c09c1 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -217,7 +217,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi -WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i BAM_input/filtered_bam --fromBAM -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi From 179790bbfc5794cf97e81100c1587025d88e15ab Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 24 Oct 2022 14:17:31 +0200 Subject: [PATCH 14/51] does this work --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index d1c6c09c1..4818904f2 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -217,7 +217,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi -WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi From 9704c5736136ddc872e54b98ee568586b927ebee Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 7 Nov 2022 11:41:52 +0100 Subject: [PATCH 15/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 4818904f2..b837567de 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -217,7 +217,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi -WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` +WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi From 84b8f60d013325e259135ef510452ac044cc0c7f Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 7 Nov 2022 11:48:20 +0100 Subject: [PATCH 16/51] test dag --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index b837567de..7b4ea4d6e 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -218,7 +218,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1120 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 3852d9954fa1c38ebdf6b7f029ba2364418df034 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 11 Nov 2022 14:31:19 +0100 Subject: [PATCH 17/51] Salmon allelic working but needs prettifications --- .../shared/rscripts/.DE_functions.R.swp | Bin 0 -> 16384 bytes snakePipes/shared/rscripts/DESeq2.R | 4 +- snakePipes/shared/rscripts/DE_functions.R | 55 +++++++++++++----- 3 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 snakePipes/shared/rscripts/.DE_functions.R.swp diff --git a/snakePipes/shared/rscripts/.DE_functions.R.swp b/snakePipes/shared/rscripts/.DE_functions.R.swp new file mode 100644 index 0000000000000000000000000000000000000000..ffb0726e6fd9e2ed1f9ba70b3fc93e33b9682b0f GIT binary patch literal 16384 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 O_id11){ ## Run allele-sepecific DESeq wrapper (if asked for) if (isTRUE(allelic_info)) { - seqout_allelic <- DESeq_allelic(countdata, coldata = sampleInfo, fdr = fdr) + seqout_allelic <- DESeq_allelic(countdata, coldata = sampleInfo, fdr = fdr, from_salmon=tximport) DESeq_writeOutput(DEseqout = seqout_allelic, fdr = fdr, outprefix = "DEseq_allelic", diff --git a/snakePipes/shared/rscripts/DE_functions.R b/snakePipes/shared/rscripts/DE_functions.R index 4ca2c5446..a5c9b7951 100644 --- a/snakePipes/shared/rscripts/DE_functions.R +++ b/snakePipes/shared/rscripts/DE_functions.R @@ -31,8 +31,13 @@ checktable <- function(countdata = NA, sampleSheet = NA, alleleSpecific = FALSE, ## check files if(!is.na(salmon_dir)) { - # mode = Salmon : check whether salmon output files exist in Salmon dir - files <- paste0(salmon_dir,"/",sampleSheet$name,".quant.sf") + #mode = Salmon : check whether salmon output files exist in Salmon dir + if(alleleSpecific){ + files <- c(paste0(salmon_dir,"/",sampleSheet$name,".genome1.quant.sf"),paste0(salmon_dir,"/",sampleSheet$name,".genome2.quant.sf")) + }else{ + files <- paste0(salmon_dir,"/",sampleSheet$name,".quant.sf") + } + #files<-dir(salmon_dir,pattern=".quant.sf",full.names=TRUE) filecheck <- file.exists(files) if(!(all(filecheck == TRUE))) { cat("Error! The following File(s) don't exist : ") @@ -63,7 +68,7 @@ checktable <- function(countdata = NA, sampleSheet = NA, alleleSpecific = FALSE, } } } - if(all(is.integer(countdata))){ + if(all(is.integer(countdata)) | !is.na(salmon_dir)){ print("All countdata is integer.") }else{ print("Non-integer counts detected. The data will be rounded, as this is well within the expected sampling variation of a technical replicate.") @@ -135,33 +140,51 @@ DESeq_basic <- function(countdata, coldata, fdr, alleleSpecific = FALSE, from_sa #' #' -DESeq_allelic <- function(countdata, coldata, fdr) { +DESeq_allelic <- function(countdata, coldata, fdr, from_salmon=FALSE) { # AlleleSpecific DEseq print("Performing Allele-specific DESeq using Interaction design : Genome2 vs Genome1") + if(isTRUE(from_salmon)) { + # create alleleSpecific design matrix + coldata_allelic <- data.frame(name = colnames(as.data.frame(countdata$counts)), + allele = rep(c("genome1", "genome2"), nrow(coldata)), + condition = rep(coldata$condition, each = 2) ) + rownames(coldata_allelic)<-colnames(as.data.frame(countdata$counts)) + coldata_allelic$allele<-factor(coldata_allelic$allele,levels=c("genome1","genome2")) + coldata_allelic$condition<-factor(coldata_allelic$condition,levels=unique(coldata_allelic$condition)) + print("Using input from tximport") + dds <- DESeq2::DESeqDataSetFromTximport(countdata, + colData = coldata_allelic, design =~1) + + } else { + print("Using input from count table") rnasamp <- dplyr::select(countdata, -dplyr::ends_with("_all")) # create alleleSpecific design matrix - design <- data.frame(name = colnames(rnasamp), + coldata_allelic <- data.frame(name = colnames(rnasamp), allele = rep(c("genome1", "genome2"), nrow(coldata)), condition = rep(coldata$condition, each = 2) ) - rownames(design)<-colnames(rnasamp) + rownames(coldata_allelic)<-colnames(rnasamp) + coldata_allelic$allele<-factor(coldata_allelic$allele,levels=c("genome1","genome2")) + coldata_allelic$condition<-factor(coldata_allelic$condition,levels=unique(coldata_allelic$condition)) + dds <- DESeq2::DESeqDataSetFromMatrix(rnasamp, colData = coldata_allelic, + design = ~1) + rownames(dds) <- rownames(rnasamp) + } + coldata_allelic$allele<-factor(coldata_allelic$allele,levels=c("genome1","genome2")) + # Run DESeq - if(length(unique(design$condition))>1){ - dds <- DESeq2::DESeqDataSetFromMatrix(rnasamp, colData = design, - design = ~allele + condition + allele:condition) - rownames(dds) <- rownames(rnasamp) + if(length(unique(coldata_allelic$condition))>1){ + DESeq2::design(dds) <- formula(~allele + condition + allele:condition) dds <- DESeq2::DESeq(dds,betaPrior = FALSE) ddr <- DESeq2::results(dds, name=paste0("allelegenome2.condition",unique(coldata$condition)[2])) ddr_shrunk <- DESeq2::lfcShrink(dds,coef=paste0("allelegenome2.condition",unique(coldata$condition)[2]),type="apeglm",res=ddr) } else { - dds <- DESeq2::DESeqDataSetFromMatrix(rnasamp, colData = design, - design = ~allele) - rownames(dds) <- rownames(rnasamp) - dds <- DESeq2::DESeq(dds,betaPrior = FALSE) - ddr <- DESeq2::results(dds, name="allele_genome2_vs_genome1") - ddr_shrunk <- DESeq2::lfcShrink(dds,coef="allele_genome2_vs_genome1",type="apeglm",res=ddr) + DESeq2::design(dds) <- formula(~allele) + dds <- DESeq2::DESeq(dds,betaPrior = FALSE) + ddr <- DESeq2::results(dds, name="allele_genome2_vs_genome1") + ddr_shrunk <- DESeq2::lfcShrink(dds,coef="allele_genome2_vs_genome1",type="apeglm",res=ddr) } output <- list(dds = dds, ddr = ddr, ddr_shrunk=ddr_shrunk) return(output) From 7abd776a59d4bcd6ba3aa8a775128a81a9e4ca05 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Mon, 14 Nov 2022 13:21:14 +0100 Subject: [PATCH 18/51] added sleuth allelic --- .../shared/rscripts/.DE_functions.R.swp | Bin 16384 -> 20480 bytes snakePipes/shared/rscripts/sleuth_allelic.R | 106 ++++++++++++++++++ .../shared/rules/DESeq2.singleComp.snakefile | 2 +- .../shared/rules/sleuth.singleComp.snakefile | 26 +++++ snakePipes/workflows/mRNA-seq/Snakefile | 2 + 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 snakePipes/shared/rscripts/sleuth_allelic.R diff --git a/snakePipes/shared/rscripts/.DE_functions.R.swp b/snakePipes/shared/rscripts/.DE_functions.R.swp index ffb0726e6fd9e2ed1f9ba70b3fc93e33b9682b0f..0a19d4bdb64971af064340342d091d8a5c5b6eff 100644 GIT binary patch delta 4269 zcmchaZEPIH8OO&YapD*Ue;^@E0FU7O7IDHd(0!foMoSl!^}srA2^13P^~zqJRYL2VROQ=m(OjQKU+dnyCHH z&hFm1b^;=Zm43eQ&U4Q^^UU)ycj!>pp`%^vrZ(R>eh0ldx0T@OC*+pf-STIzbd%HP zo?mxz$?`x{v)lUi9zU~W+m$^_r3{`uVZMK$r=c6(L`Nx4<+Az!X>mKJFvrD0mo*f#u+f zD+zfU{2KfU{1VK7&ER}5A#e1O7Wo|p$G{`tUT`y54nAK=$V;FMPWKS<5AY>80iFO4 zfFFY_=mlq15b`A01_~e#20;&40nRQbICeGdQmC&&A@ zp6Ojn_1W;#?U|CCYx=e;^jfXyctW4pF%Sf{y@3$9lxJW|ktQCo6UzK3d;nHqD!mH+1fB!G=tJ5t493AASPw2B zr``w8f=2-bpCOIj1@C~jz?$!EN9}`7mbnlbkiLS%1<-&IduPw^pGN+iZCVV@}i(R9) zPsZ^o11Sl}3gdRojY5%*WNFp&8-XJ=v@T17r9Wgj4s)0a$T`X!&gg?gE=_5r;+J^c z58MNC&BPR^TAr*U2oFRnx5^%?7Mm6qY_qN@Wr%vO!3w!F$2Bu>?Slc+k^QnL+>p)~ z_Z03mOflPJMGaM;<}@@DQC!5*NseIHxjbeAM`fjnlCh(~E^~E*gzpWm`x-wcn_u)C zQZLd??Yf4s^2Ts`vqXB;uA(rwHBr|)ow8q8rAXc`cX-FRHE*cX$k5$^tIi6@&HIp57?2Iz2T*qv|pht#Qx0ES~ zbcZFhZ3@B{b|ktCV^R0YcbmzJr6nP+4C-3%@JXlIPxr`Dfrva(&Z%QQZ8 z^eVK?IA~O8MEaY~tUo-=Q3uKb_5`kwOPVxWQ8Va2yfkAYWHsq1crje24XlbJsj#LT zhK?3qb>q5l)zFGK(z;x{V4G~l@U&~X=cAQT#T0gK~$nEpt$96HV8VLrZNWvJ4X zroz}x&JN-SfV}CctPe*s`r4|GOD(sYhUXSl4@Mg#nT_Fz><`1gWS(k4JT^dC-!@Je zfh$9tSWE=It9yZH211n^HI|NaaPO3T6FDq9zihG5(2s^mx0RDg>s1;mt@MRdleDAx zy?9LJJMN7zK5Pv zG*%Eti0sF@YRL0+&|4|)#;W@!M$Ls?L#vYlC)?@55{H9~?rOAHk!IkIw$Y3`Y?RVz zK}@P_ypQDW^{rM&dU)pwNk5PE!x;+-(jwii?K+5mgBGDW#7)BsTSUAr+-r0BBTS#4 j_4uXtpzI=>BAe4LBF#)(5o?gI)YIu3yjjp*=K21AY_Qe$ delta 441 zcmXxgJ4nJ&6vy$OkH7Wzk^h1UTzo7o77BquZ9(MF5@ZxTpjskus-XucO^t;uMNm@> zO=7h~kdWCDNmEM=K}$h6hfrV94tzNG+?K)RWr%aD3xsHjlzMo63kTW z^l-9AqyM9lUpmDyqA>B@CSBta7dXNM!ua$_4=Cdd+n7NV2Hw2V4%*>?8y_C&)}xG$ zS*&6lF?6EnmS!=D6h_d8UUcKel-4nbTB~%0O^o8Dg-2o+X+-eqk`A$t9M&+6A7hB0 j7}7B8cw`b~+@pkZETIQsgwTQd#Qe^D@!4MZidQ{1){ +message("Fitting full model with allele, condition and allele:condition.") + d<-formula(~allele + condition + allele:condition) +}else{ +message("Fitting reduced model with allele only.") + d<-formula(~allele) +} +colnames(sample_info)[colnames(sample_info) %in% "name"] ="sample" +print(sample_info) +sample_info$sample + +sample_id = list.dirs(file.path(indir), recursive=F, full.names=F) +sample_id = sort(sample_id[grep('[^benchmark][^SalmonIndex]', sample_id, invert=F)]) +#sample_id = intersect(sample_info$sample, sample_id) # get only those sample that are defined in the sampleInfo! +sample_id<-sample_id[match(sample_info$sample,sample_id)] +print(sample_id) + +salmon_dirs = sapply(sample_id, function(id) file.path(indir, id)) +print(salmon_dirs) + +s2c = mutate(sample_info, path=salmon_dirs) +## reorder conditions (for Wald test later on: order of comparison important for fold change) +if ( s2c$condition[[1]] != levels(s2c$condition)[[1]] ) { + s2c$condition = relevel(s2c$condition, as.character(s2c$condition[[1]]) ) +} +print(s2c) + +## get gene names / symbol names +tryCatch( { t2g = read.table(t2g_file, header=F) },error = function(e) { print('No t2g file available!') },finally = {}) + +if (exists('t2g')) { + colnames(t2g) <- c("target_id","ens_gene","ext_gene") + + ## add gene names + so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g) +} else { + ## construct sleuth object + so = sleuth_prep(s2c, full_model=d) +} + +## model expression responding on condition +so = sleuth_fit(so) + +# ## fit reduced model (not depending on any factor) +# so <- sleuth_fit(so, ~1, 'reduced') +# +# ## likelihood ratio test (LRT) between models to get transcripts affected by condition. +# ## Usually considered more stringent than Wald test. No fold change! +# so <- sleuth_lrt(so, 'reduced', 'full') +# results_table_lrt <- sleuth_results(so, 'reduced:full', test_type = 'lrt') +# head(results_table_lrt) + +## Wald test (to get *fold change*) +if(length(unique(sample_info$condition))>1){ + wald_beta_name = paste0("allelegenome2.condition",unique(coldata$condition)[2]) +}else{ + wald_beta_name = "allele_genome2_vs_genome1" +} +so <- sleuth_wt(so, wald_beta_name, "full") +results_table_wt <- sleuth_results(so, wald_beta_name) +head(results_table_wt) +write.table(results_table_wt, "Wald-test.results.tsv", col.names=T, row.names=F, quote=F, sep="\t") + + +## view fitted models and tests +models(so) +tests(so) + +saveRDS(so, file='so.rds') +so = readRDS("so.rds") + +write(c("library(sleuth)", + "so = readRDS('so.rds')", + "sleuth_live(so)"), + file="sleuth_live.R") + +pdf("MA-plot.pdf") +plot_ma(so, wald_beta_name, sig_level = fdr) +dev.off() + + +# sleuth_live(so, "wt") # wt for Wald test diff --git a/snakePipes/shared/rules/DESeq2.singleComp.snakefile b/snakePipes/shared/rules/DESeq2.singleComp.snakefile index 2c8b47e9d..0d12a1bc8 100644 --- a/snakePipes/shared/rules/DESeq2.singleComp.snakefile +++ b/snakePipes/shared/rules/DESeq2.singleComp.snakefile @@ -59,7 +59,7 @@ rule DESeq2_Salmon: outdir = get_outdir("DESeq2_Salmon",sampleSheet), fdr = 0.05, importfunc = os.path.join(maindir, "shared", "rscripts", "DE_functions.R"), - allele_info = 'FALSE', + allele_info = lambda wildcards : 'TRUE' if 'allelic-mapping' in mode else 'FALSE', tx2gene_file = "Annotation/genes.filtered.t2g", rmdTemplate = os.path.join(maindir, "shared", "rscripts", "DESeq2Report.Rmd") conda: CONDA_RNASEQ_ENV diff --git a/snakePipes/shared/rules/sleuth.singleComp.snakefile b/snakePipes/shared/rules/sleuth.singleComp.snakefile index e14afb944..e23857b9e 100644 --- a/snakePipes/shared/rules/sleuth.singleComp.snakefile +++ b/snakePipes/shared/rules/sleuth.singleComp.snakefile @@ -27,3 +27,29 @@ rule sleuth_Salmon: "{params.outdir} " "{params.fdr} " + os.path.join(outdir,"{input.t2g}") + " >{log.out} 2>{log.err}" + +rule sleuth_SalmonAllelic: + input: + quant_files = expand("SalmonAllelic/{sample}/abundance.h5", sample=samples), + t2g = "Annotation/genes.filtered.t2g", + sampleSheet = sampleSheet + output: + "sleuth_SalmonAllelic_{}/so.rds".format(sample_name) + benchmark: + "sleuth_SalmonAllelic_{}/.benchmark/sleuth.Salmon.benchmark".format(sample_name) + params: + script=os.path.join(maindir, "shared", "rscripts", "sleuth_allelic.R"), + indir = os.path.join(outdir,"SalmonAllelic"), + outdir = os.path.join(outdir,"sleuth_SalmonAllelic_{}".format(sample_name)), + fdr = 0.05, + log: + out = "sleuth_SalmonAllelic_{}/logs/sleuth.out".format(sample_name), + err = "sleuth_SalmonAllelic_{}/logs/sleuth.err".format(sample_name) + conda: CONDA_RNASEQ_ENV + shell: + "Rscript {params.script} " + "{input.sampleSheet} " + "{params.indir} " + "{params.outdir} " + "{params.fdr} " + os.path.join(outdir,"{input.t2g}") + + " >{log.out} 2>{log.err}" diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index a0ddcc79b..df2c0fa99 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -188,6 +188,8 @@ def run_alignment_free(): sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] if not isMultipleComparison: file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) + if cf.check_replicates(sampleSheet): + file_list.append( ["sleuth_SalmonAllelic_{}/so.rds".format(sample_name)] ) return(file_list) else: return([]) From 8947e22428284872f31cd505f8f97a94d9077dc6 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Thu, 1 Dec 2022 12:20:43 +0100 Subject: [PATCH 19/51] sleuth fix --- snakePipes/common_functions.py | 1 + snakePipes/shared/rscripts/sleuth_allelic.R | 12 ++++++++++-- snakePipes/shared/rules/envs/rna_seq.yaml | 1 - snakePipes/shared/rules/envs/sleuth.yaml | 8 ++++++++ snakePipes/shared/rules/sleuth.multiComp.snakefile | 2 +- snakePipes/shared/rules/sleuth.singleComp.snakefile | 6 +++--- snakePipes/workflows/mRNA-seq/Snakefile | 4 ++-- 7 files changed, 25 insertions(+), 9 deletions(-) create mode 100755 snakePipes/shared/rules/envs/sleuth.yaml diff --git a/snakePipes/common_functions.py b/snakePipes/common_functions.py index bcc3f8518..27ee0cbd3 100644 --- a/snakePipes/common_functions.py +++ b/snakePipes/common_functions.py @@ -22,6 +22,7 @@ def set_env_yamls(): return {'CONDA_SHARED_ENV': 'envs/shared.yaml', 'CONDA_CREATE_INDEX_ENV': 'envs/createIndices.yaml', 'CONDA_RNASEQ_ENV': 'envs/rna_seq.yaml', + 'CONDA_SLEUTH_ENV': 'envs/sleuth.yaml', 'CONDA_RMATS_ENV': 'envs/rMats.yaml', 'CONDA_scRNASEQ_ENV': 'envs/sc_rna_seq.yaml', 'CONDA_seurat_ENV': 'envs/sc_rna_seq_seurat.yaml', diff --git a/snakePipes/shared/rscripts/sleuth_allelic.R b/snakePipes/shared/rscripts/sleuth_allelic.R index ecef30e7c..3e87a9e5f 100644 --- a/snakePipes/shared/rscripts/sleuth_allelic.R +++ b/snakePipes/shared/rscripts/sleuth_allelic.R @@ -21,7 +21,13 @@ t2g_file = args[[5]] setwd(outdir) sample_info = read.table(sample_info_file, header=T)#[,1:2] -cnames.sub<-unique(colnames(sample_info)[2:which(colnames(sample_info) %in% "condition")]) +coldata_allelic <- data.frame(name = paste0(rep(sample_info$name,each=2),c(".genome1",".genome2")), + allele = rep(c("genome1", "genome2"), nrow(sample_info)), + condition = rep(sample_info$condition, each = 2) ) +coldata_allelic$allele<-factor(coldata_allelic$allele,levels=c("genome1","genome2")) +coldata_allelic$condition<-factor(coldata_allelic$condition,levels=unique(coldata_allelic$condition)) +sample_info<-coldata_allelic + if(length(unique(sample_info$condition))>1){ message("Fitting full model with allele, condition and allele:condition.") d<-formula(~allele + condition + allele:condition) @@ -35,6 +41,7 @@ sample_info$sample sample_id = list.dirs(file.path(indir), recursive=F, full.names=F) sample_id = sort(sample_id[grep('[^benchmark][^SalmonIndex]', sample_id, invert=F)]) +print(sample_id) #sample_id = intersect(sample_info$sample, sample_id) # get only those sample that are defined in the sampleInfo! sample_id<-sample_id[match(sample_info$sample,sample_id)] print(sample_id) @@ -44,6 +51,7 @@ print(salmon_dirs) s2c = mutate(sample_info, path=salmon_dirs) ## reorder conditions (for Wald test later on: order of comparison important for fold change) +s2c$condition<-factor(s2c$condition) if ( s2c$condition[[1]] != levels(s2c$condition)[[1]] ) { s2c$condition = relevel(s2c$condition, as.character(s2c$condition[[1]]) ) } @@ -78,7 +86,7 @@ so = sleuth_fit(so) if(length(unique(sample_info$condition))>1){ wald_beta_name = paste0("allelegenome2.condition",unique(coldata$condition)[2]) }else{ - wald_beta_name = "allele_genome2_vs_genome1" + wald_beta_name = "allelegenome2" } so <- sleuth_wt(so, wald_beta_name, "full") results_table_wt <- sleuth_results(so, wald_beta_name) diff --git a/snakePipes/shared/rules/envs/rna_seq.yaml b/snakePipes/shared/rules/envs/rna_seq.yaml index 4882f36ed..db4437bb7 100755 --- a/snakePipes/shared/rules/envs/rna_seq.yaml +++ b/snakePipes/shared/rules/envs/rna_seq.yaml @@ -12,7 +12,6 @@ dependencies: - salmon = 1.9.0 - r-base = 4.1.3 - r-wasabi - - r-sleuth - r-dplyr - r-ggplot2 - r-pheatmap diff --git a/snakePipes/shared/rules/envs/sleuth.yaml b/snakePipes/shared/rules/envs/sleuth.yaml new file mode 100755 index 000000000..6c504b2aa --- /dev/null +++ b/snakePipes/shared/rules/envs/sleuth.yaml @@ -0,0 +1,8 @@ +name: snakepipes_sleuth_environment_2.0 +channels: + - conda-forge + - bioconda +dependencies: + - r-base = 4.2.0 + - r-sleuth = 0.30.1 + - r-dplyr diff --git a/snakePipes/shared/rules/sleuth.multiComp.snakefile b/snakePipes/shared/rules/sleuth.multiComp.snakefile index 58661d6a9..fbe1ec853 100644 --- a/snakePipes/shared/rules/sleuth.multiComp.snakefile +++ b/snakePipes/shared/rules/sleuth.multiComp.snakefile @@ -21,7 +21,7 @@ rule sleuth_Salmon: log: out = "sleuth_Salmon_{}/logs/sleuth.out".format(os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}"), err = "sleuth_Salmon_{}/logs/sleuth.err".format(os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}") - conda: CONDA_RNASEQ_ENV + conda: CONDA_SLEUTH_ENV shell: "Rscript {params.script} " "{params.sampleSheet} " diff --git a/snakePipes/shared/rules/sleuth.singleComp.snakefile b/snakePipes/shared/rules/sleuth.singleComp.snakefile index e23857b9e..c97fd9fa3 100644 --- a/snakePipes/shared/rules/sleuth.singleComp.snakefile +++ b/snakePipes/shared/rules/sleuth.singleComp.snakefile @@ -19,7 +19,7 @@ rule sleuth_Salmon: log: out = "sleuth_Salmon_{}/logs/sleuth.out".format(sample_name), err = "sleuth_Salmon_{}/logs/sleuth.err".format(sample_name) - conda: CONDA_RNASEQ_ENV + conda: CONDA_SLEUTH_ENV shell: "Rscript {params.script} " "{input.sampleSheet} " @@ -30,7 +30,7 @@ rule sleuth_Salmon: rule sleuth_SalmonAllelic: input: - quant_files = expand("SalmonAllelic/{sample}/abundance.h5", sample=samples), + quant_files = expand("SalmonAllelic/{sample}.{allele}/abundance.h5", sample=samples,allele=["genome1","genome2"]), t2g = "Annotation/genes.filtered.t2g", sampleSheet = sampleSheet output: @@ -45,7 +45,7 @@ rule sleuth_SalmonAllelic: log: out = "sleuth_SalmonAllelic_{}/logs/sleuth.out".format(sample_name), err = "sleuth_SalmonAllelic_{}/logs/sleuth.err".format(sample_name) - conda: CONDA_RNASEQ_ENV + conda: CONDA_SLEUTH_ENV shell: "Rscript {params.script} " "{input.sampleSheet} " diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index df2c0fa99..a16fecd79 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -73,6 +73,7 @@ if not fromBAM: include: os.path.join(maindir, "shared", "rules", "deepTools_RNA_allelic.snakefile") if "alignment-free" in mode: include: os.path.join(maindir, "shared", "rules", "Salmon_allelic.snakefile") + include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") else: # HISAT2/STAR include: os.path.join(maindir, "shared", "rules", "RNA_mapping.snakefile") @@ -188,8 +189,7 @@ def run_alignment_free(): sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] if not isMultipleComparison: file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) - if cf.check_replicates(sampleSheet): - file_list.append( ["sleuth_SalmonAllelic_{}/so.rds".format(sample_name)] ) + file_list.append( ["sleuth_SalmonAllelic_{}/so.rds".format(sample_name)] ) return(file_list) else: return([]) From c3d42f73ebb3149c106b656ff92fcd6e465e77b7 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 2 Dec 2022 08:15:41 +0100 Subject: [PATCH 20/51] dag fix --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 7b4ea4d6e..c55f75428 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -226,7 +226,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1795 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1802 ]; then exit 1 ; fi WC=`noncoding-RNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 717 ]; then exit 1 ; fi From 5e1c97669d97645dc35b42fd6ad61938eb092b47 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 2 Dec 2022 17:27:19 +0100 Subject: [PATCH 21/51] bumped minor version --- snakePipes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakePipes/__init__.py b/snakePipes/__init__.py index 574f4077e..766ce2d06 100755 --- a/snakePipes/__init__.py +++ b/snakePipes/__init__.py @@ -1 +1 @@ -__version__ = '2.6.1' +__version__ = '2.7.0' From f677bdad23d8373135af68d8a020583284fcf63b Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Wed, 7 Dec 2022 11:20:04 +0100 Subject: [PATCH 22/51] sleuth and deseq2 fixes --- snakePipes/workflows/mRNA-seq/Snakefile | 2 +- snakePipes/workflows/mRNA-seq/cluster.yaml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index a16fecd79..86a1f34f4 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -188,7 +188,7 @@ def run_alignment_free(): if sampleSheet: sample_name = os.path.splitext(os.path.basename(sampleSheet))[0] if not isMultipleComparison: - file_list.append( ["DESeq2_Salmon_{}/DESeq2.session_info.txt".format(sample_name)]) + file_list.append( ["DESeq2_SalmonAllelic_{}/DESeq2.session_info.txt".format(sample_name)]) file_list.append( ["sleuth_SalmonAllelic_{}/so.rds".format(sample_name)] ) return(file_list) else: diff --git a/snakePipes/workflows/mRNA-seq/cluster.yaml b/snakePipes/workflows/mRNA-seq/cluster.yaml index bff08a4e8..3c27af597 100644 --- a/snakePipes/workflows/mRNA-seq/cluster.yaml +++ b/snakePipes/workflows/mRNA-seq/cluster.yaml @@ -14,9 +14,13 @@ annotation_bed2fasta: memory: 4G sleuth_Salmon: memory: 4G +sleuth_SalmonAllelic: + memory: 4G DESeq2: memory: 5G -DESeq2_Salmon: +DESeq2_Salmon_basic: + memory: 3G +DESeq2_Salmon_allelic: memory: 3G star_index: memory: 15G From f3e2ebab506de4dd10acf18c4289dd56d28e2b81 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Wed, 7 Dec 2022 13:31:06 +0100 Subject: [PATCH 23/51] sleuth prep --- .../shared/rscripts/.DE_functions.R.swp | Bin 20480 -> 0 bytes snakePipes/shared/rscripts/DESeq2.R | 16 +++++++++----- snakePipes/shared/rscripts/DE_functions.R | 20 +++++++++--------- snakePipes/shared/rscripts/sleuth.R | 6 ++++-- snakePipes/shared/rscripts/sleuth_allelic.R | 19 ++++++++++++----- 5 files changed, 39 insertions(+), 22 deletions(-) delete mode 100644 snakePipes/shared/rscripts/.DE_functions.R.swp diff --git a/snakePipes/shared/rscripts/.DE_functions.R.swp b/snakePipes/shared/rscripts/.DE_functions.R.swp deleted file mode 100644 index 0a19d4bdb64971af064340342d091d8a5c5b6eff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 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 nz(C`$IHT~Z(qy%lLk2I!s8!`1){ - seqout <- DESeq_basic(countdata, coldata = sampleInfo, fdr = fdr, alleleSpecific = allelic_info, from_salmon = tximport) + if(tximport & allelic_info){ + message("Detected allelic Salmon counts. Skipping DESeq_basic.") + }else{ + seqout <- DESeq_basic(countdata, coldata = sampleInfo, fdr = fdr, alleleSpecific = allelic_info, from_salmon = tximport) - DESeq_writeOutput(DEseqout = seqout, + DESeq_writeOutput(DEseqout = seqout, fdr = fdr, outprefix = "DEseq_basic", geneNamesFile = geneNamesFilePath) + } } #DESeq_downstream(DEseqout = seqout, countdata, sampleInfo, # fdr = fdr, outprefix = "DEseq_basic", heatmap_topN = topN, @@ -132,9 +136,10 @@ write.bibtex(bib, file = 'citations.bib') file.copy(rmdTemplate, to = 'DESeq2_report_basic.Rmd') if(length(unique(sampleInfo$condition))>1){ - outprefix = "DEseq_basic" - cite_options(citation_format = "text",style = "html",cite.style = "numeric",hyperlink = TRUE) - render('DESeq2_report_basic.Rmd', + if(!tximport & !allelic_info){ + outprefix = "DEseq_basic" + cite_options(citation_format = "text",style = "html",cite.style = "numeric",hyperlink = TRUE) + render('DESeq2_report_basic.Rmd', output_format = "html_document", clean = TRUE, params = list( @@ -145,6 +150,7 @@ if(length(unique(sampleInfo$condition))>1){ fdr = fdr, heatmap_topN = 20, geneNamesFile = geneNamesFilePath)) + } } if (isTRUE(allelic_info)) { diff --git a/snakePipes/shared/rscripts/DE_functions.R b/snakePipes/shared/rscripts/DE_functions.R index a5c9b7951..2c5320f9a 100644 --- a/snakePipes/shared/rscripts/DE_functions.R +++ b/snakePipes/shared/rscripts/DE_functions.R @@ -93,6 +93,7 @@ DESeq_basic <- function(countdata, coldata, fdr, alleleSpecific = FALSE, from_sa cnames.sub<-unique(colnames(coldata)[2:which(colnames(coldata) %in% "condition")]) d<-as.formula(noquote(paste0("~",paste(cnames.sub,collapse="+")))) + # Normal DESeq print("Performing basic DESeq: test vs control") if(isTRUE(from_salmon)) { @@ -100,18 +101,18 @@ DESeq_basic <- function(countdata, coldata, fdr, alleleSpecific = FALSE, from_sa dds <- DESeq2::DESeqDataSetFromTximport(countdata, colData = coldata, design =d) - } else { - print("Using input from count table") - if(isTRUE(alleleSpecific)) { - rnasamp <- dplyr::select(countdata, dplyr::ends_with("_all")) - rownames(coldata)<-colnames(rnasamp) - dds <- DESeq2::DESeqDataSetFromMatrix(countData = rnasamp, - colData = coldata, design =d) } else { - dds <- DESeq2::DESeqDataSetFromMatrix(countData = countdata, + if(isTRUE(alleleSpecific)) { + rnasamp <- dplyr::select(countdata, dplyr::ends_with("_all")) + rownames(coldata)<-colnames(rnasamp) + countdata<-rnasamp + } + + dds <- DESeq2::DESeqDataSetFromMatrix(countData = countdata, colData = coldata, design =d) + } - } + if(length(size_factors) > 1) { print("applying size factors") print(size_factors) @@ -172,7 +173,6 @@ DESeq_allelic <- function(countdata, coldata, fdr, from_salmon=FALSE) { rownames(dds) <- rownames(rnasamp) } - coldata_allelic$allele<-factor(coldata_allelic$allele,levels=c("genome1","genome2")) # Run DESeq if(length(unique(coldata_allelic$condition))>1){ diff --git a/snakePipes/shared/rscripts/sleuth.R b/snakePipes/shared/rscripts/sleuth.R index 3c26b6ad4..3823294e7 100644 --- a/snakePipes/shared/rscripts/sleuth.R +++ b/snakePipes/shared/rscripts/sleuth.R @@ -50,10 +50,12 @@ if (exists('t2g')) { colnames(t2g) <- c("target_id","ens_gene","ext_gene") ## add gene names - so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g) + so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g, num_cores=6, + transformation_function=log2(x + 0.5)) } else { ## construct sleuth object - so = sleuth_prep(s2c, full_model=d) + so = sleuth_prep(s2c, full_model=d, num_cores=6, + transformation_function=log2(x + 0.5)) } ## model expression responding on condition diff --git a/snakePipes/shared/rscripts/sleuth_allelic.R b/snakePipes/shared/rscripts/sleuth_allelic.R index 3e87a9e5f..a07a83cb1 100644 --- a/snakePipes/shared/rscripts/sleuth_allelic.R +++ b/snakePipes/shared/rscripts/sleuth_allelic.R @@ -31,9 +31,11 @@ sample_info<-coldata_allelic if(length(unique(sample_info$condition))>1){ message("Fitting full model with allele, condition and allele:condition.") d<-formula(~allele + condition + allele:condition) +# d0<-formula(~allele + condition) }else{ -message("Fitting reduced model with allele only.") +message("Fitting full model with allele only.") d<-formula(~allele) +# d0<-formula(~1) } colnames(sample_info)[colnames(sample_info) %in% "name"] ="sample" print(sample_info) @@ -64,14 +66,19 @@ if (exists('t2g')) { colnames(t2g) <- c("target_id","ens_gene","ext_gene") ## add gene names - so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g) + so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g, num_cores=6, + transformation_function = function(x) log2(x + 0.5)) } else { ## construct sleuth object - so = sleuth_prep(s2c, full_model=d) + so = sleuth_prep(s2c, full_model=d, num_cores=6, + transformation_function = function(x) log2(x + 0.5)) } ## model expression responding on condition so = sleuth_fit(so) +#so <- sleuth_fit(so, d, 'full') +#so <- sleuth_fit(so, d0, 'reduced') + # ## fit reduced model (not depending on any factor) # so <- sleuth_fit(so, ~1, 'reduced') @@ -84,7 +91,7 @@ so = sleuth_fit(so) ## Wald test (to get *fold change*) if(length(unique(sample_info$condition))>1){ - wald_beta_name = paste0("allelegenome2.condition",unique(coldata$condition)[2]) + wald_beta_name = paste0("allelegenome2.condition",unique(coldata_allelic$condition)[2]) }else{ wald_beta_name = "allelegenome2" } @@ -92,7 +99,9 @@ so <- sleuth_wt(so, wald_beta_name, "full") results_table_wt <- sleuth_results(so, wald_beta_name) head(results_table_wt) write.table(results_table_wt, "Wald-test.results.tsv", col.names=T, row.names=F, quote=F, sep="\t") - +#so <- sleuth_lrt(so, 'reduced', 'full') +#results_table_lrt <- sleuth_results(so, 'reduced:full', test_type = 'lrt') +#write.table(results_table_lrt, "LRT-test.results.tsv", col.names=T, row.names=F, quote=F, sep="\t") ## view fitted models and tests models(so) From 99c8882fd61d9eb914208b6961d9e7a77ffd2a2d Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Wed, 7 Dec 2022 14:02:12 +0100 Subject: [PATCH 24/51] sleuth fixes --- snakePipes/shared/rscripts/sleuth_allelic.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakePipes/shared/rscripts/sleuth_allelic.R b/snakePipes/shared/rscripts/sleuth_allelic.R index a07a83cb1..c88c5a0c6 100644 --- a/snakePipes/shared/rscripts/sleuth_allelic.R +++ b/snakePipes/shared/rscripts/sleuth_allelic.R @@ -91,7 +91,7 @@ so = sleuth_fit(so) ## Wald test (to get *fold change*) if(length(unique(sample_info$condition))>1){ - wald_beta_name = paste0("allelegenome2.condition",unique(coldata_allelic$condition)[2]) + wald_beta_name = paste0("allelegenome2:condition",unique(coldata_allelic$condition)[2]) }else{ wald_beta_name = "allelegenome2" } From 7e440de011928c312c5a98c8aedc0776d63e4085 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Thu, 8 Dec 2022 12:40:14 +0100 Subject: [PATCH 25/51] Snakefile fix --- snakePipes/workflows/mRNA-seq/Snakefile | 19 ++++++++++--------- snakePipes/workflows/mRNA-seq/cluster.yaml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index 86a1f34f4..fefda1a37 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -78,15 +78,6 @@ if not fromBAM: # HISAT2/STAR include: os.path.join(maindir, "shared", "rules", "RNA_mapping.snakefile") - ## Salmon - if "alignment-free" in mode: - include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") - ## Sleuth (on Salmon) - if sampleSheet: - if isMultipleComparison: - include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") - else: - include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") else: fastqc=False @@ -103,6 +94,16 @@ else: include: os.path.join(maindir, "shared", "rules", "LinkBam.snakefile") + ## Salmon + if "alignment-free" in mode: + include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") + ## Sleuth (on Salmon) + if sampleSheet: + if isMultipleComparison and not "allelic-mapping" in mode: + include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") + else: + include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") + if "allelic-mapping" in mode: ## featureCounts_allelic include: os.path.join(maindir, "shared", "rules", "featureCounts_allelic.snakefile") diff --git a/snakePipes/workflows/mRNA-seq/cluster.yaml b/snakePipes/workflows/mRNA-seq/cluster.yaml index 3c27af597..9b340f000 100644 --- a/snakePipes/workflows/mRNA-seq/cluster.yaml +++ b/snakePipes/workflows/mRNA-seq/cluster.yaml @@ -15,7 +15,7 @@ annotation_bed2fasta: sleuth_Salmon: memory: 4G sleuth_SalmonAllelic: - memory: 4G + memory: 10G DESeq2: memory: 5G DESeq2_Salmon_basic: From d1f1dfd4fd860b43ecf3fa67c62a75d1b87e235f Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Thu, 8 Dec 2022 13:08:24 +0100 Subject: [PATCH 26/51] Snakefile fix --- snakePipes/workflows/mRNA-seq/Snakefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index fefda1a37..e54a418c4 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -77,7 +77,15 @@ if not fromBAM: else: # HISAT2/STAR include: os.path.join(maindir, "shared", "rules", "RNA_mapping.snakefile") - + ## Salmon + if "alignment-free" in mode: + include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") + ## Sleuth (on Salmon) + if sampleSheet: + if isMultipleComparison: + include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") + else: + include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") else: fastqc=False @@ -94,15 +102,6 @@ else: include: os.path.join(maindir, "shared", "rules", "LinkBam.snakefile") - ## Salmon - if "alignment-free" in mode: - include: os.path.join(maindir, "shared", "rules", "Salmon.snakefile") - ## Sleuth (on Salmon) - if sampleSheet: - if isMultipleComparison and not "allelic-mapping" in mode: - include: os.path.join(maindir, "shared", "rules", "sleuth.multiComp.snakefile") - else: - include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") if "allelic-mapping" in mode: ## featureCounts_allelic From 4e84509d6606577cd5400b9c1d1b16b96d83fcb6 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 10:21:35 +0100 Subject: [PATCH 27/51] does this work --- .../shared/rules/DESeq2.singleComp.snakefile | 41 +++++++++++++++++-- .../shared/rules/sleuth.multiComp.snakefile | 3 +- .../shared/rules/sleuth.singleComp.snakefile | 6 ++- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/snakePipes/shared/rules/DESeq2.singleComp.snakefile b/snakePipes/shared/rules/DESeq2.singleComp.snakefile index 0d12a1bc8..6216aefbf 100644 --- a/snakePipes/shared/rules/DESeq2.singleComp.snakefile +++ b/snakePipes/shared/rules/DESeq2.singleComp.snakefile @@ -41,9 +41,9 @@ rule DESeq2: ## DESeq2 (on Salmon) -rule DESeq2_Salmon: +rule DESeq2_Salmon_basic: input: - counts_table = "Salmon/counts.transcripts.tsv" if not "allelic-mapping" in mode else "SalmonAllelic/counts.transcripts.tsv", + counts_table = "Salmon/counts.transcripts.tsv", sampleSheet = sampleSheet, tx2gene_file = "Annotation/genes.filtered.t2g", symbol_file = "Annotation/genes.filtered.symbol" #get_symbol_file @@ -59,7 +59,42 @@ rule DESeq2_Salmon: outdir = get_outdir("DESeq2_Salmon",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', + 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} " + "{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}" + +rule DESeq2_Salmon_allelic: + input: + counts_table = "SalmonAllelic/counts.transcripts.tsv", + sampleSheet = sampleSheet, + tx2gene_file = "Annotation/genes.filtered.t2g", + symbol_file = "Annotation/genes.filtered.symbol" #get_symbol_file + output: + "{}/DESeq2.session_info.txt".format(get_outdir("DESeq2_SalmonAllelic",sampleSheet)) + log: + out = "{}/logs/DESeq2.out".format(get_outdir("DESeq2_SalmonAllelic",sampleSheet)), + err = "{}/logs/DESeq2.err".format(get_outdir("DESeq2_SalmonAllelic",sampleSheet)) + benchmark: + "{}/.benchmark/DESeq2.SalmonAllelic.benchmark".format(get_outdir("DESeq2_SalmonAllelic",sampleSheet)) + params: + script=os.path.join(maindir, "shared", "rscripts", "DESeq2.R"), + outdir = get_outdir("DESeq2_SalmonAllelic",sampleSheet), + fdr = 0.05, + 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") conda: CONDA_RNASEQ_ENV diff --git a/snakePipes/shared/rules/sleuth.multiComp.snakefile b/snakePipes/shared/rules/sleuth.multiComp.snakefile index fbe1ec853..3f1b9c7cb 100644 --- a/snakePipes/shared/rules/sleuth.multiComp.snakefile +++ b/snakePipes/shared/rules/sleuth.multiComp.snakefile @@ -17,7 +17,8 @@ rule sleuth_Salmon: indir = os.path.join(outdir,"Salmon"), outdir = os.path.join(outdir,"sleuth_Salmon_{}".format(os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}")), sampleSheet = lambda wildcards,input: os.path.join(outdir,str(input.sampleSheet)), - fdr = 0.05, + fdr = 0.05 + threads: 6 log: out = "sleuth_Salmon_{}/logs/sleuth.out".format(os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}"), err = "sleuth_Salmon_{}/logs/sleuth.err".format(os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}") diff --git a/snakePipes/shared/rules/sleuth.singleComp.snakefile b/snakePipes/shared/rules/sleuth.singleComp.snakefile index c97fd9fa3..8b4c53644 100644 --- a/snakePipes/shared/rules/sleuth.singleComp.snakefile +++ b/snakePipes/shared/rules/sleuth.singleComp.snakefile @@ -15,7 +15,8 @@ rule sleuth_Salmon: script=os.path.join(maindir, "shared", "rscripts", "sleuth.R"), indir = os.path.join(outdir,"Salmon"), outdir = os.path.join(outdir,"sleuth_Salmon_{}".format(sample_name)), - fdr = 0.05, + fdr = 0.05 + threads: 6 log: out = "sleuth_Salmon_{}/logs/sleuth.out".format(sample_name), err = "sleuth_Salmon_{}/logs/sleuth.err".format(sample_name) @@ -41,7 +42,8 @@ rule sleuth_SalmonAllelic: script=os.path.join(maindir, "shared", "rscripts", "sleuth_allelic.R"), indir = os.path.join(outdir,"SalmonAllelic"), outdir = os.path.join(outdir,"sleuth_SalmonAllelic_{}".format(sample_name)), - fdr = 0.05, + fdr = 0.05 + threads: 6 log: out = "sleuth_SalmonAllelic_{}/logs/sleuth.out".format(sample_name), err = "sleuth_SalmonAllelic_{}/logs/sleuth.err".format(sample_name) From 9fc1dbb305b59ecf7a392e48288bdcc2ed458411 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 10:29:48 +0100 Subject: [PATCH 28/51] does this also work --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index c55f75428..ea9d46dfa 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -194,7 +194,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 602 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 948 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1005 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1006 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 916 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --UMIDedup --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 88aa502e5093b01a366b62950c620438a96ef3e7 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 10:34:11 +0100 Subject: [PATCH 29/51] dag fix --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index ea9d46dfa..6f7fecf7b 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -206,7 +206,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 526 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 863 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 920 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 921 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --trim --fastqc .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 975 ]; then exit 1 ; fi WC=`mRNA-seq -i BAM_input/filtered_bam -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --fromBAM .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From aadfe6750bc99eb77db96cbef49af36d04082906 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 10:38:01 +0100 Subject: [PATCH 30/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 6f7fecf7b..806f870d9 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -213,7 +213,7 @@ WC=`mRNA-seq -i BAM_input/filtered_bam -o output --sampleSheet .ci_stuff/test_sa if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 659 ]; then exit 1 ; fi #multiple comparison groups WC=`mRNA-seq --mode alignment,alignment-free -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet_multiComp.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 867 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 869 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi From bd89482a7c765468cb98593cbafd9c8b9af9fc02 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 10:42:30 +0100 Subject: [PATCH 31/51] dag fix --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 806f870d9..7b4fb7e79 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -226,7 +226,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1802 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1803 ]; then exit 1 ; fi WC=`noncoding-RNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 717 ]; then exit 1 ; fi From 949284c24a32a682d3b648940d987ecfa39b72fa Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 11:19:42 +0100 Subject: [PATCH 32/51] fixes --- conda-recipe/meta.yaml | 2 +- docs/content/News.rst | 2 +- snakePipes/shared/rscripts/sleuth.R | 4 ++-- snakePipes/workflows/mRNA-seq/Snakefile | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index d0200ad21..b6d93a2ce 100755 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: snakepipes - version: 2.6.1 + version: 2.7.0 source: path: ../ diff --git a/docs/content/News.rst b/docs/content/News.rst index c03a8ed29..db65d59db 100644 --- a/docs/content/News.rst +++ b/docs/content/News.rst @@ -2,7 +2,7 @@ snakePipes News =============== -snakePipes 2.x.x +snakePipes 2.7.0 ---------------- * Added the allelic version of Salmon-based transcript quantitation to mRNA-seq workflow. Will be run if *both* 'allelic-mapping' and 'alignment-free' modes are specified. diff --git a/snakePipes/shared/rscripts/sleuth.R b/snakePipes/shared/rscripts/sleuth.R index 3823294e7..ea47cfbf4 100644 --- a/snakePipes/shared/rscripts/sleuth.R +++ b/snakePipes/shared/rscripts/sleuth.R @@ -38,8 +38,8 @@ print(salmon_dirs) s2c = mutate(sample_info, path=salmon_dirs) ## reorder conditions (for Wald test later on: order of comparison important for fold change) -if ( s2c$condition[[1]] != levels(s2c$condition)[[1]] ) { - s2c$condition = relevel(s2c$condition, as.character(s2c$condition[[1]]) ) +if ( s2c$condition[1] != levels(s2c$condition)[1] ) { + s2c$condition = relevel(s2c$condition, as.character(s2c$condition[1]) ) } print(s2c) diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index e54a418c4..73044701c 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -74,6 +74,7 @@ if not fromBAM: if "alignment-free" in mode: include: os.path.join(maindir, "shared", "rules", "Salmon_allelic.snakefile") include: os.path.join(maindir, "shared", "rules", "sleuth.singleComp.snakefile") +# include: os.path.join(maindir, "shared", "rules", "DESeq2.singleComp.snakefile") else: # HISAT2/STAR include: os.path.join(maindir, "shared", "rules", "RNA_mapping.snakefile") @@ -118,7 +119,7 @@ include:os.path.join(maindir, "shared", "rules", "RNA-seq_qc_report.snakefile") ## DESeq2 if sampleSheet: - if isMultipleComparison: + if isMultipleComparison and not "allelic-mapping" in mode: include: os.path.join(maindir, "shared", "rules", "DESeq2.multipleComp.snakefile") if rMats: include: os.path.join(maindir, "shared", "rules", "rMats.multipleComp.snakefile") From 37dce612b0dc9460516d356b2aed527c4a0b508f Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 11:39:44 +0100 Subject: [PATCH 33/51] sleuth running --- snakePipes/shared/rscripts/sleuth.R | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/snakePipes/shared/rscripts/sleuth.R b/snakePipes/shared/rscripts/sleuth.R index ea47cfbf4..23f4c3bfa 100644 --- a/snakePipes/shared/rscripts/sleuth.R +++ b/snakePipes/shared/rscripts/sleuth.R @@ -38,9 +38,7 @@ print(salmon_dirs) s2c = mutate(sample_info, path=salmon_dirs) ## reorder conditions (for Wald test later on: order of comparison important for fold change) -if ( s2c$condition[1] != levels(s2c$condition)[1] ) { - s2c$condition = relevel(s2c$condition, as.character(s2c$condition[1]) ) -} +s2c$condition<-factor(s2c$condition,levels=unique(s2c$condition)) print(s2c) ## get gene names / symbol names @@ -51,11 +49,11 @@ if (exists('t2g')) { ## add gene names so <- sleuth_prep(s2c, full_model=d, target_mapping = t2g, num_cores=6, - transformation_function=log2(x + 0.5)) + transformation_function=function(x) log2(x + 0.5)) } else { ## construct sleuth object so = sleuth_prep(s2c, full_model=d, num_cores=6, - transformation_function=log2(x + 0.5)) + transformation_function=function(x) log2(x + 0.5)) } ## model expression responding on condition From 6ee1c47a24d0604ed3ec9c9f40738529c65ee063 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 12:09:11 +0100 Subject: [PATCH 34/51] little changes --- docs/content/News.rst | 2 +- snakePipes/shared/rules/DESeq2.multipleComp.snakefile | 2 +- snakePipes/workflows/mRNA-seq/Snakefile | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/content/News.rst b/docs/content/News.rst index db65d59db..2fbfa886c 100644 --- a/docs/content/News.rst +++ b/docs/content/News.rst @@ -5,7 +5,7 @@ snakePipes News snakePipes 2.7.0 ---------------- -* Added the allelic version of Salmon-based transcript quantitation to mRNA-seq workflow. Will be run if *both* 'allelic-mapping' and 'alignment-free' modes are specified. +* Added the allelic version of Salmon-based transcript quantitation to mRNA-seq workflow. Will be run if *both* 'allelic-mapping' and 'alignment-free' modes are specified. An allelic version of sleuth will be run, if sample sheet is provided, as well as DESeq2 on allelic Salmon counts. snakePipes 2.6.1 diff --git a/snakePipes/shared/rules/DESeq2.multipleComp.snakefile b/snakePipes/shared/rules/DESeq2.multipleComp.snakefile index 4f3030179..f6365f469 100644 --- a/snakePipes/shared/rules/DESeq2.multipleComp.snakefile +++ b/snakePipes/shared/rules/DESeq2.multipleComp.snakefile @@ -54,7 +54,7 @@ rule DESeq2: ## DESeq2 (on Salmon) -rule DESeq2_Salmon: +rule DESeq2_Salmon_basic: input: counts_table = "Salmon/counts.transcripts.tsv", sampleSheet = lambda wildcards: checkpoints.split_sampleSheet.get(compGroup=wildcards.compGroup).output, diff --git a/snakePipes/workflows/mRNA-seq/Snakefile b/snakePipes/workflows/mRNA-seq/Snakefile index 73044701c..f48af4223 100755 --- a/snakePipes/workflows/mRNA-seq/Snakefile +++ b/snakePipes/workflows/mRNA-seq/Snakefile @@ -333,8 +333,6 @@ onstart: ################################################################################ if not fromBAM: - localrules: Salmon_wasabi, sleuth_Salmon - rule all: input: @@ -349,7 +347,6 @@ if not fromBAM: "multiQC/multiqc_report.html" else: - localrules: Salmon_wasabi rule all: input: From 6d9fce5de714a5015e97f92973786d9ea8850fa6 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 12:22:54 +0100 Subject: [PATCH 35/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 7b4fb7e79..c1623ade7 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -184,7 +184,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 333 ]; then exit 1 ; fi # mRNA-seq WC=`mRNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 882 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 879 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 892 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 4210df0f588eb417e54662a5c2b315e6c3505cb1 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 12:28:53 +0100 Subject: [PATCH 36/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index c1623ade7..f953dd5be 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -186,7 +186,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 333 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 879 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 892 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 889 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 908 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 34b4cd115716195446c65fc83177106526d3c3e0 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 12:33:35 +0100 Subject: [PATCH 37/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index f953dd5be..a427948db 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -188,7 +188,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 879 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 889 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 908 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 905 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 602 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From c4a8289192eee1d0f2f18d862d8543a81633812b Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 12:40:21 +0100 Subject: [PATCH 38/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index a427948db..7ab3ff8f2 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -190,7 +190,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 889 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 905 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 602 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 599 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 948 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From ce7cda0ba82f1958cedc811631d93709af036bc7 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:26:26 +0100 Subject: [PATCH 39/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 7ab3ff8f2..5923a29a4 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -192,7 +192,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 905 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 599 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 948 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 945 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1006 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 1b096cab2129c88d6ee35f3d5f1fdc406060b160 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:30:36 +0100 Subject: [PATCH 40/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 5923a29a4..929316d51 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -196,7 +196,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 945 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1006 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 916 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 913 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --UMIDedup --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 966 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 4f32402957e23665404f82762ba34be92cb40e82 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:36:23 +0100 Subject: [PATCH 41/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 929316d51..d5691d2e0 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -198,7 +198,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1006 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 913 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --UMIDedup --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 966 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 963 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 807 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 6d6016667592217e27b726c85f3f0beb70e3a275 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:39:57 +0100 Subject: [PATCH 42/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index d5691d2e0..da4608caa 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -200,7 +200,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 913 ]; then exit 1 ; fi WC=`mRNA-seq -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --bcExtract --UMIDedup --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 963 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 807 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 804 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 526 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From b2b299733ae03ee231e2941812b4d93a9df6bc21 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:48:39 +0100 Subject: [PATCH 43/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index da4608caa..2cbb7ee82 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -202,7 +202,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 963 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 804 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 526 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 523 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 863 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From fb9c78e612e77b8036e864dab57c18847eaa53c2 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:53:15 +0100 Subject: [PATCH 44/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 2cbb7ee82..3a7b5c4b0 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -204,7 +204,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 804 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 523 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 863 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 860 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 921 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --trim --fastqc .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 60610f26cd5eabf708187dd747ee285fb4bf6f40 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 13:57:41 +0100 Subject: [PATCH 45/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 3a7b5c4b0..6d463c27d 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -208,7 +208,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 860 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" -m "alignment-free,deepTools_qc" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 921 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --trim --fastqc .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 975 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 972 ]; then exit 1 ; fi WC=`mRNA-seq -i BAM_input/filtered_bam -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --fromBAM .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 659 ]; then exit 1 ; fi #multiple comparison groups From 2a1f0a7c1fe0550b6ca0d65b39bb80b5f76e0a3b Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 14:04:50 +0100 Subject: [PATCH 46/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 6d463c27d..9d271f6d7 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -210,7 +210,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 921 ]; then exit 1 ; fi WC=`mRNA-seq -i SE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --trim --fastqc .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 972 ]; then exit 1 ; fi WC=`mRNA-seq -i BAM_input/filtered_bam -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --fromBAM .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 659 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 657 ]; then exit 1 ; fi #multiple comparison groups WC=`mRNA-seq --mode alignment,alignment-free -i PE_input -o output --rMats --sampleSheet .ci_stuff/test_sampleSheet_multiComp.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 869 ]; then exit 1 ; fi From 7836c77baa3e1dbca6d4cadfd2a5e1aa78e6ef6d Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 14:09:20 +0100 Subject: [PATCH 47/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 9d271f6d7..9a10ca8f0 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -216,7 +216,7 @@ WC=`mRNA-seq --mode alignment,alignment-free -i PE_input -o output --rMats --sam if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 869 ]; then exit 1 ; fi #allelic WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1360 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1357 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1120 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From e36c867cfbdd2dcd8b2ecb0fed9afc136cb4777c Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Fri, 9 Dec 2022 14:17:25 +0100 Subject: [PATCH 48/51] dag test --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 9a10ca8f0..d46304041 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -218,7 +218,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 869 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1357 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1120 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1118 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From e556403e7db87216c1d101a76b20e1d2c8849b21 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Tue, 13 Dec 2022 09:27:07 +0100 Subject: [PATCH 49/51] test dag --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index d46304041..52f0c8c8f 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -220,7 +220,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1357 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i allelic_BAM_input/filtered_bam --fromBAM --bamExt '.filtered.bam' -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1118 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1367 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From f35bb7330f031fa58aeb7a5142b322d8b4f22b50 Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Tue, 13 Dec 2022 09:31:22 +0100 Subject: [PATCH 50/51] test dag --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index 52f0c8c8f..cf071c0c4 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -222,7 +222,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1118 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1,strain2 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1367 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1353 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1350 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` From 03b9adad44ddaecd5658dbc8060a0d76f04db2eb Mon Sep 17 00:00:00 2001 From: "katarzyna.otylia.sikora@gmail.com" Date: Tue, 13 Dec 2022 10:34:44 +0100 Subject: [PATCH 51/51] test dag --- .ci_stuff/test_dag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index cf071c0c4..b2e408301 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -224,7 +224,7 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1367 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --SNPfile allelic_input/snpfile.txt --NMaskedIndex allelic_input/Ngenome .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1350 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1370 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1367 ]; then exit 1 ; fi WC=`mRNA-seq -m allelic-mapping,deepTools_qc,alignment-free -i PE_input -o output --sampleSheet .ci_stuff/test_sampleSheet.tsv --snakemakeOptions " --dryrun --conda-prefix /tmp" --VCFfile allelic_input/file.vcf.gz --strains strain1 .ci_stuff/organism.yaml | tee >(cat 1>&2) | grep -v "Conda environment" | sed '/^\s*$/d' | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1803 ]; then exit 1 ; fi