Skip to content

Commit

Permalink
Merge pull request #750 from maxplanck-ie/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
katsikora committed Feb 5, 2021
2 parents bea1f7b + 152d4cb commit 0768c55
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .ci_stuff/test_dag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ WC=`ChIP-seq -d allelic_BAM_input --sampleSheet .ci_stuff/test_sampleSheet.tsv -
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 331 ]; 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
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`
Expand Down Expand Up @@ -211,6 +213,8 @@ if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 659 ]; then exit 1 ; fi
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
#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 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`
Expand All @@ -219,6 +223,8 @@ WC=`mRNA-seq -m allelic-mapping,deepTools_qc -i PE_input -o output --sampleSheet
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`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 733 ]; then exit 1 ; fi
WC=`noncoding-RNA-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`
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: snakepipes
version: 2.4.2
version: 2.4.3

source:
path: ../
Expand Down
9 changes: 9 additions & 0 deletions docs/content/News.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
snakePipes News
===============

snakePipes 2.4.3
----------------

* Fixed noncoding-RNA-seq workflow without sample sheet.
* Updated links to prebuilt indices on zenodo.
* Fixed read length estimation for rMats.
* Cutadapt is set as default read trimming program for both noncoding-RNA-seq and mRNA-seq workflows.


snakePipes 2.4.2
----------------

Expand Down
10 changes: 5 additions & 5 deletions docs/content/setting_up.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The easiest way to install snakePipes is via our conda channel. The following co

.. code:: bash
conda create -n snakePipes -c mpi-ie -c conda-forge -c bioconda snakePipes==2.4.2
conda create -n snakePipes -c mpi-ie -c conda-forge -c bioconda snakePipes==2.4.3
This way, the software used within snakePipes do not conflict with the software pre-installed on your terminal or in your python environment.

Expand Down Expand Up @@ -192,10 +192,10 @@ Download premade indices

For the sake of convenience, we provide premade indices for the following organisms:

- `Human (GRCh38, Gencode release 29) <https://zenodo.org/record/2650763>`__
- `Mouse (GRCm38/mm10, Gencode release m19) <https://zenodo.org/record/4020455>`__
- `Mouse (GRCm37/mm9, Gencode release 1) <https://zenodo.org/record/2650849>`__
- `Fruit fly (dm6, Ensembl release 94) <https://zenodo.org/record/2650762>`__
- `Human (GRCh38, Gencode release 29) <https://zenodo.org/record/4471116>`__
- `Mouse (GRCm38/mm10, Gencode release m19) <https://zenodo.org/record/4468065>`__
- `Mouse (GRCm37/mm9, Gencode release 1) <https://zenodo.org/record/4478284>`__
- `Fruit fly (dm6, Ensembl release 94) <https://zenodo.org/record/4478414>`__

To use these, simply download and extract them. You will then need to modify the provided YAML file to indicate exactly where the indices are located (i.e., replace ``/data/processing/ryan`` with whatever is appropriate).

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Quick start

.. code:: bash
conda create -n snakePipes -c mpi-ie -c conda-forge -c bioconda snakePipes==2.4.2
conda create -n snakePipes -c mpi-ie -c conda-forge -c bioconda snakePipes==2.4.3
* You can update snakePipes to the latest version available on conda with:

Expand Down
2 changes: 1 addition & 1 deletion snakePipes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.4.2'
__version__ = '2.4.3'
2 changes: 1 addition & 1 deletion snakePipes/shared/rules/rMats.multipleComp.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ rule rMats:
TMPDIR={params.tempDir}
MYTEMP=$(mktemp -d ${{TMPDIR:-/tmp}}/snakepipes.XXXXXXXXXX);
set +o pipefail;
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print sum / NR }}\')
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print int(sum / NR) }}\')
rmats.py --gtf {params.gtf} --b1 {input.b1} --b2 {input.b2} --od {params.od} --tmp $MYTEMP -t {params.end} --libType {params.libType} --readLength $readLen --variable-read-length --nthread {threads} --tstat {threads} 2> {log};
rm -rf $MYTEMP
"""
2 changes: 1 addition & 1 deletion snakePipes/shared/rules/rMats.singleComp.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rule rMats:
TMPDIR={params.tempDir}
MYTEMP=$(mktemp -d ${{TMPDIR:-/tmp}}/snakepipes.XXXXXXXXXX);
set +o pipefail;
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print sum / NR }}\')
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print int(sum / NR) }}\')
rmats.py --gtf {params.gtf} --b1 {input.b1} --b2 {input.b2} --od {params.od} --tmp $MYTEMP -t {params.end} --libType {params.libType} --readLength $readLen --variable-read-length --nthread {threads} --tstat {threads} 2> {log};
rm -rf $MYTEMP
"""
2 changes: 1 addition & 1 deletion snakePipes/shared/rules/rMats.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ rule rMats:
conda: CONDA_RNASEQ_ENV
shell:"""
set +o pipefail;
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print sum / NR }}\')
readLen=$(samtools view {params.s1} | awk \'{{print length($10)}}\' | head -10000 | awk \'{{ sum += $1 }} END {{ if (NR > 0) print int(sum / NR) }}\')
rmats.py --gtf {params.gtf} --b1 {input.b1} --b2 {input.b2} --od {params.od} --tmp {params.tempDir} -t {params.end} --libType {params.libType} --readLength $readLen --variable-read-length --nthread {threads} --tstat {threads} 2> {log}
"""
21 changes: 11 additions & 10 deletions snakePipes/shared/rules/tecounts.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,17 @@ def get_outdir(folder_name,sampleSheet):
sample_name = os.path.splitext(os.path.basename(str(sampleSheet)))[0]
return("{}_{}".format(folder_name, sample_name))

rule split_sampleSheet:
input:
sampleSheet = sampleSheet
output:
splitSheets = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")
params:
splitSheetPfx = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0])
run:
if isMultipleComparison:
cf.splitSampleSheet(input.sampleSheet,params.splitSheetPfx)
if sampleSheet:
rule split_sampleSheet:
input:
sampleSheet = sampleSheet
output:
splitSheets = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0]+".{compGroup}.tsv")
params:
splitSheetPfx = os.path.join("splitSampleSheets",os.path.splitext(os.path.basename(str(sampleSheet)))[0])
run:
if isMultipleComparison:
cf.splitSampleSheet(input.sampleSheet,params.splitSheetPfx)


# TODO: topN, FDR
Expand Down
2 changes: 1 addition & 1 deletion snakePipes/workflows/noncoding-RNA-seq/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pairedEnd: True
downsample:
## Options for trimming
trim: False
trimmer: fastp
trimmer: cutadapt
trimmerOptions:
## further options
mode: alignment,deepTools_qc
Expand Down

0 comments on commit 0768c55

Please sign in to comment.