diff --git a/.ci_stuff/test_dag.sh b/.ci_stuff/test_dag.sh index eacc2d8fb..5d57b18f9 100755 --- a/.ci_stuff/test_dag.sh +++ b/.ci_stuff/test_dag.sh @@ -55,11 +55,11 @@ touch /tmp/genes.gtf /tmp/genome.fa /tmp/genome.fa.fai WC=`DNA-mapping -i PE_input -o output --tempdir /tmp .ci_stuff/organism.yaml --snakemake_options " --dryrun --conda-prefix /tmp" | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 734 ]; then exit 1 ; fi WC=`DNA-mapping -i PE_input -o output --tempdir /tmp .ci_stuff/organism.yaml --snakemake_options " --dryrun --conda-prefix /tmp" --trim --mapq 20 --dedup --properpairs | tee /dev/stderr | grep -v "Conda environment" | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 936 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 802 ]; then exit 1 ; fi WC=`DNA-mapping -i SE_input -o output --tempdir /tmp .ci_stuff/organism.yaml --snakemake_options " --dryrun --conda-prefix /tmp" | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 684 ]; then exit 1 ; fi WC=`DNA-mapping -i SE_input -o output --tempdir /tmp .ci_stuff/organism.yaml --snakemake_options " --dryrun --conda-prefix /tmp" --trim --mapq 20 --dedup --properpairs | tee /dev/stderr | grep -v "Conda environment" | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 820 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 752 ]; then exit 1 ; fi # ChIP-seq WC=`ChIP-seq -d BAM_input --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml .ci_stuff/ChIP.sample_config.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` @@ -81,19 +81,19 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 889 ]; then exit 1 ; fi WC=`RNA-seq -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 578 ]; then exit 1 ; fi WC=`RNA-seq -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 1052 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 918 ]; then exit 1 ; fi WC=`RNA-seq -i SE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 828 ]; then exit 1 ; fi WC=`RNA-seq -i SE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" -m "alignment" .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 528 ]; then exit 1 ; fi WC=`RNA-seq -i SE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" -m "alignment,deepTools_qc" --trim .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 925 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 857 ]; then exit 1 ; fi # HiC - fails WC=`HiC -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 522 ]; then exit 1 ; fi WC=`HiC -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" --trim .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` -if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 724 ]; then exit 1 ; fi +if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 590 ]; then exit 1 ; fi WC=`HiC -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" --enzyme DpnII .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 522 ]; then exit 1 ; fi WC=`HiC -i PE_input -o output --tempdir /tmp --snakemake_options " --dryrun --conda-prefix /tmp" --noTAD .ci_stuff/organism.yaml | tee /dev/stderr | grep -v "Conda environment" | wc -l` diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index a146a18e7..e0e7dcb39 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: snakepipes - version: 1.2.0 + version: 1.2.1 source: path: ../ diff --git a/docs/content/News.rst b/docs/content/News.rst index a2582221c..9a5903f25 100644 --- a/docs/content/News.rst +++ b/docs/content/News.rst @@ -1,6 +1,15 @@ snakePipes News =============== +snakePipes 1.2.1 +---------------- + + * Fixed a typo in ``createIndices``. + * Implemented complex experimental design in RNAseq (differential gene expression), ChIP/ATACseq (differential binding). + * Fixed an issue with ggplot2 and log transformation in RNAseq report Rmd. + * fastqc folder is created and its content will be added to multiqc only if fastqc flag is called. + * fastqc-trimmed folder is created and its content will be added to multiqc only if both fastqc and trim flags are called. + snakePipes 1.2.0 ---------------- @@ -40,7 +49,7 @@ snakePipes 1.1.0 * Automatic reports are generated in every folder containing results of statistical analysis (single CpG stats, metilene DMR stats, user interval aggregate stats), as long as sample sheet is provided. * R sessionInfo() is now printed at the end of the statistical analysis. - * scRNAseq: + * scRNAseq: * An extention to the pipeline now takes the processed csv file from Results folder as input and runs cell filtering with a range of total transcript thresholds using monocle and subsequently runs clustering, produces tsne visualizations, calculates top 2 and top10 markers per cluster and produces heatmap visualizations for these using monocle/seurat. If the skipRaceID flag is set to False (default), all of the above are also executed using RaceID. * Stats reports were implemented for RaceID and Monocle/Seurat so that folders Filtered_cells_RaceID and Filtered_cells_monocle now contain a Stats_report.html. @@ -49,7 +58,7 @@ snakePipes 1.1.0 * all sample sheets now need to have a "name" and a "condition" column, that was not consistent before * consistent --sampleSheet [FILE] options to invoke differential analysis mode (RNA-seq, ChIP-seq, ATAC-seq), --DE/--DB were dropped - + snakePipes 1.0.0 (king cobra) released -------------------------------------- diff --git a/docs/content/setting_up.rst b/docs/content/setting_up.rst index aa6e7a116..618ec7ebd 100644 --- a/docs/content/setting_up.rst +++ b/docs/content/setting_up.rst @@ -8,7 +8,7 @@ Unlike many other pipelines, setting up snakePipes is easy! All you need is a *l Installing conda with python3 ----------------------------- -Follow the instructions `here `__ to install either +Follow the instructions `here `__ to install either miniconda or anaconda. A minimal version (miniconda) is enough for snakePipes. Get the miniconda installer `here `__. After installation, check your python path and version : @@ -38,6 +38,8 @@ The easiest way to install snakePipes is via our conda channel. The following co This way, the software used within snakePipes do not conflict with the software pre-installed on your terminal or in your python environment. +.. note:: This might take a few minutes depending on the access to conda channels. + Development installation ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/snakePipes/__init__.py b/snakePipes/__init__.py index 58d478ab1..3f262a634 100644 --- a/snakePipes/__init__.py +++ b/snakePipes/__init__.py @@ -1 +1 @@ -__version__ = '1.2.0' +__version__ = '1.2.1' diff --git a/snakePipes/shared/defaults.yaml b/snakePipes/shared/defaults.yaml index 791599ed8..b0203406a 100644 --- a/snakePipes/shared/defaults.yaml +++ b/snakePipes/shared/defaults.yaml @@ -6,8 +6,7 @@ # Note that due to limitations in yaml.dump, only very basic structures are # permitted here. ################################################################################ -#snakemake_options: ' --use-conda --conda-prefix /package/anaconda3/envs/ ' -snakemake_options: ' --use-conda --conda-prefix /data/processing/sikora/snakePipes_envs ' +snakemake_options: ' --use-conda --conda-prefix /package/anaconda3/envs/ ' tempdir: /data/extended/ # The following are only needed if you use the --emailAddress option smtpServer: diff --git a/snakePipes/shared/rscripts/DESeq2.R b/snakePipes/shared/rscripts/DESeq2.R index 3b5cd6234..dfa4c488c 100644 --- a/snakePipes/shared/rscripts/DESeq2.R +++ b/snakePipes/shared/rscripts/DESeq2.R @@ -65,6 +65,7 @@ sampleInfo$condition <- relevel(sampleInfo$condition, ref = as.character(sampleI # sampleInfo[grepl("^[0-9]", sampleInfo$name),]$name <- paste0("X", sampleInfo[grepl("^[0-9]", sampleInfo$name),]$name) #} sampleInfo$name <- make.names(sampleInfo$name) +rownames(sampleInfo)<-sampleInfo$name ## ~~~~~~ 2. Check if data is in proper order ~~~~~ if(isTRUE(tximport)) { diff --git a/snakePipes/shared/rscripts/DESeq2Report.Rmd b/snakePipes/shared/rscripts/DESeq2Report.Rmd index 2f74ac02e..104b1426e 100644 --- a/snakePipes/shared/rscripts/DESeq2Report.Rmd +++ b/snakePipes/shared/rscripts/DESeq2Report.Rmd @@ -467,7 +467,7 @@ plotCounts_gg <- function(i, dds, intgroup) { data <- cbind(data, data.frame('group' = group)) } - ggplot(data, aes(x = group, y = count)) + geom_jitter(width=0.2) + ylab('Normalized count') + ggtitle(i) + coord_trans(y = "log10") + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + ggplot(data, aes(x = group, y = log10(count))) + geom_jitter(width=0.2) + ylab('Log10(Normalized count + 0.5)') + ggtitle(i) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) } for(i in head(features, nBestFeatures)) { print(plotCounts_gg(i, dds = dds, intgroup = intgroup[2:length(intgroup)])) diff --git a/snakePipes/shared/rules/createIndices.snakefile b/snakePipes/shared/rules/createIndices.snakefile index 7eca5bc2b..159b19d24 100644 --- a/snakePipes/shared/rules/createIndices.snakefile +++ b/snakePipes/shared/rules/createIndices.snakefile @@ -126,7 +126,7 @@ rule makeKnownSpliceSites: conda: CONDA_RNASEQ_ENV threads: 10 shell: """ - hista2_extract_splice_sites.py {input} > {output} + hisat2_extract_splice_sites.py {input} > {output} """ diff --git a/snakePipes/shared/rules/envs/atac_seq.yaml b/snakePipes/shared/rules/envs/atac_seq.yaml index f5fc25550..e95a35d2f 100644 --- a/snakePipes/shared/rules/envs/atac_seq.yaml +++ b/snakePipes/shared/rules/envs/atac_seq.yaml @@ -10,4 +10,3 @@ dependencies: - gawk = 4.2.1 - r-kernsmooth = 2.23_15 - r-statmod = 1.4.30 - - bioconductor-genomeinfodbdata diff --git a/snakePipes/shared/rules/multiQC.snakefile b/snakePipes/shared/rules/multiQC.snakefile index 384e925ec..d317e3732 100644 --- a/snakePipes/shared/rules/multiQC.snakefile +++ b/snakePipes/shared/rules/multiQC.snakefile @@ -10,7 +10,7 @@ def multiqc_input_check(return_value): if not pipeline=="scrna-seq" and ("fromBam" not in globals() or not fromBam): if paired: - if trim: + if trim and fastqc: infiles.append( expand("FastQC_trimmed/{sample}{read}_fastqc.html", sample = samples, read = reads) ) indir += " FastQC_trimmed " infiles.append( expand(fastq_dir+"/{sample}{read}.fastq.gz", sample = samples, read = reads) ) @@ -19,7 +19,7 @@ def multiqc_input_check(return_value): infiles.append( expand("FastQC/{sample}{read}_fastqc.html", sample = samples, read = reads) ) indir +=" FastQC " else: - if trim: + if trim and fastqc: infiles.append( expand("FastQC_trimmed/{sample}"+reads[0]+"_fastqc.html", sample = samples) ) indir += " FastQC_trimmed " infiles.append( expand(fastq_dir+"/{sample}"+reads[0]+".fastq.gz", sample = samples) ) @@ -62,10 +62,12 @@ def multiqc_input_check(return_value): if trim: infiles.append( expand("FastQC_trimmed/{sample}"+reads[0]+"_fastqc.html", sample = samples) ) indir += " FastQC_trimmed " + else: + infiles.append( expand("FastQC/{sample}{read}_fastqc.html", sample = samples, read = reads) ) + indir +=" FastQC " + infiles.append( expand(fastq_dir+"/{sample}"+reads[0]+".fastq.gz", sample = samples) ) indir += fastq_dir + " " - infiles.append( expand("FastQC/{sample}{read}_fastqc.html", sample = samples, read = reads) ) - indir +=" FastQC " infiles.append( expand(mapping_prg+"/{sample}.bam", sample = samples) + expand("Sambamba/{sample}.markdup.txt", sample = samples) + expand("deepTools_qc/estimateReadFiltering/{sample}_filtering_estimation.txt", sample=samples)) diff --git a/snakePipes/workflows/RNA-seq/internals.snakefile b/snakePipes/workflows/RNA-seq/internals.snakefile index 807036643..86419a9ae 100644 --- a/snakePipes/workflows/RNA-seq/internals.snakefile +++ b/snakePipes/workflows/RNA-seq/internals.snakefile @@ -2,6 +2,7 @@ import glob import os import subprocess import re +import sys ## Main variables ##############################################################