Skip to content

Commit 7df9bd3

Browse files
authored
Merge pull request #1073 from maxplanck-ie/develop
3.1.0
2 parents a36b999 + 19d195b commit 7df9bd3

32 files changed

+514
-288
lines changed

.ci_stuff/test_dag.sh

Lines changed: 119 additions & 119 deletions
Large diffs are not rendered by default.

.github/workflows/linux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ['3.11', '3.12']
15+
python-version: ['3.11', '3.12' ,'3.13']
1616
optdeps: [".", ".[actions]", ".[docs]"]
1717
steps:
1818
- uses: actions/checkout@v4
@@ -100,7 +100,8 @@ jobs:
100100
'CONDA_PREPROCESSING_ENV',
101101
'CONDA_NONCODING_RNASEQ_ENV',
102102
'CONDA_SAMBAMBA_ENV',
103-
'CONDA_pysam_ENV'
103+
'CONDA_pysam_ENV',
104+
'CONDA_FQLINT_ENV'
104105
]
105106
runs-on: ubuntu-latest
106107
steps:

.github/workflows/osx.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
'CONDA_PREPROCESSING_ENV',
3232
'CONDA_NONCODING_RNASEQ_ENV',
3333
'CONDA_SAMBAMBA_ENV',
34-
'CONDA_pysam_ENV'
34+
'CONDA_pysam_ENV',
35+
'CONDA_FQLINT_ENV'
3536
]
3637
runs-on: macos-latest
3738
steps:
@@ -46,6 +47,6 @@ jobs:
4647
pip install .
4748
- name: createEnvsOSX
4849
run: |
49-
conda config --add subdirs osx-64
50+
conda config --set subdir osx-64
5051
snakePipes createEnvs --only ${{matrix.envs}}
5152

conda-recipe/meta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "3.0.0" %}
1+
{% set version = "3.1.0" %}
22

33
package:
44
name: snakepipes
@@ -14,9 +14,10 @@ build:
1414

1515
requirements:
1616
host:
17-
- python >=3
17+
- python >=3, < 3.13
1818
- pip
1919
- seaborn
20+
- setuptools
2021
run:
2122
- python >=3.11
2223
- snakemake >=8

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import sys
1616
import os
1717
from importlib.metadata import version as importlibversion
18-
import sphinx_rtd_theme
1918

2019
# to allow readthedocs to compile without installing some dependencies
2120
import mock
@@ -150,7 +149,7 @@
150149

151150
# import them both locally and on rtd
152151
html_theme = 'sphinx_rtd_theme' # 'alabaster' 'sphinx_rtd_theme'
153-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
152+
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
154153

155154
# Theme options are theme-specific and customize the look and feel of a theme
156155
# further. For a list of options available for each theme, see the

docs/content/News.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
snakePipes News
22
===============
33

4+
snakePipes 3.1.0
5+
________________
6+
7+
* installation test for python 3.13
8+
* bulk mode in makePairs wf
9+
* Removal of --user flag in createIndices. Organism yamls are by default written to both installation folder and output folder.
10+
11+
snakePipes 3.0.0
12+
________________
13+
14+
* clusteryaml omitted for profiles
15+
* All workflows have '-' removed from their name
16+
* toml file installation
17+
* makePairs mode introduced
18+
419
snakePipes 2.9.0
520
________________
621

docs/content/setting_up.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ or for the pytests:
6363
Configuring snakePipes
6464
----------------------
6565

66-
Finally, at least one file (``defaults.yaml``) should be modified to match your compute infrastructure. The location of this file can be found out by executing:
66+
Finally, config files ``defaults.yaml`` and snakemake profile should be modified to match your compute infrastructure. The location of this file can be found out by executing:
6767

6868
.. code:: bash
6969
@@ -86,7 +86,7 @@ If you want to use the snakepipes_genericprofile, make sure to review the follow
8686

8787
* ``module load slurm &&`` - could be omitted
8888
* ``resources.partition`` - set to your slurm partition
89-
* ``conda-prefix`` - set to your preferred location where snakePipes environments should be stored
89+
* ``conda-prefix`` - set to your preferred location where snakePipes environments should be stored. You can set this value by running `snakePipes config --condaEnvDir` and providing the respective path.
9090
* ``resources`` - make sure default resources make sense for your infrastructure
9191
* ``ccancel.sh`` - refers to the ccancel.sh file inside the profile directory and contains instructions on how to kill submitted jobs (on failure / interruption of snakemake). The module command could be omitted here as before
9292

docs/content/workflows/makePairs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ makePairs
66
What it does
77
------------
88

9-
The snakePipes makePairs workflow allows users to process their HiC data from raw fastq files to HiC matrices in
10-
an allele-specific manner. The workflow utilized mapping by bwa, followed by analysis
9+
The snakePipes makePairs workflow allows users to process their HiC/uC data from raw fastq files to HiC matrices (in
10+
an allele-specific manner). The workflow utilizes mapping by bwa, followed by analysis
1111
using `pairtools <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9949071/>`__ . The workflow follows the `example workflow described in the documentation of pairtools <https://pairtools.readthedocs.io/en/latest/examples/pairtools_phase_walkthrough.html>`__ ,
1212
which explains each step in detail and would be useful for new users to have a look at.
1313
Currently the output matrices are produced in the `.pairs <https://pairtools.readthedocs.io/en/latest/formats.html>`__ format.

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ Quick start
4545
4646
* Download genome fasta and annotations for an your organism, and build indexes, Check in :ref:`createIndices`
4747

48-
* Configure snakePipes with paths to organism and cluster configs on your system using snakePipes config. For detailed information, run:
48+
* Configure snakePipes with paths to organism and snakemake configs on your system using snakePipes config. Importantly, take care to set `--condaEnvDir` parameter, which defaults to `/tmp`.
49+
For detailed information, run:
4950

5051
.. code:: bash
5152

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "snakePipes"
77
description = 'Snakemake workflows and wrappers for NGS data processing from the MPI-IE'
88
readme = "README.md"
9-
version = "3.0.0"
9+
version = "3.1.0"
1010
keywords = [
1111
"DNAmapping",
1212
"ChIPSeq",
@@ -24,8 +24,7 @@ authors = [
2424
]
2525

2626
classifiers = [
27-
"Intended Audience :: Bioinformaticians",
28-
"Intended Audience :: Biologists",
27+
"Intended Audience :: Science/Research",
2928
"License :: OSI Approved :: MIT License",
3029
"Programming Language :: Python :: 3",
3130
]

snakePipes/common_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def set_env_yamls():
4242
'CONDA_NONCODING_RNASEQ_ENV': 'envs/noncoding.yaml',
4343
'CONDA_SAMBAMBA_ENV': 'envs/sambamba.yaml',
4444
'CONDA_pysam_ENV': 'envs/pysam.yaml',
45-
'CONDA_SEACR_ENV': 'envs/chip_seacr.yaml'}
45+
'CONDA_SEACR_ENV': 'envs/chip_seacr.yaml',
46+
'CONDA_FQLINT_ENV': 'envs/fqlint.yaml'
47+
}
4648

4749

4850
def merge_dicts(x, y):

snakePipes/parserCommon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def snpArguments(defaults):
139139
snpargs = parser.add_argument_group('Allele-specific mapping arguments')
140140
snpargs.add_argument("--VCFfile",
141141
default='',
142-
help="VCF file to create N-masked genomes (default: 'None')")
142+
help="VCF file to create N-masked genomes (default: 'None'). Note that for the makePairs workflow this file is assumed to be gzipped and indexed (with tabix).")
143143

144144
snpargs.add_argument("--strains",
145145
default='',

snakePipes/shared/defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ max_thread: 25
1919
#print tools versions
2020
toolsVersion: True
2121
oldConfig:
22-
configMode: manual
22+
configMode: manual

snakePipes/shared/rules/ChIP_peak_calling.snakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ rule MACS2_peak_qc:
122122
123123
# compute peak genome coverage
124124
peak_len=`awk '{{total+=$3-$2}}END{{print total}}' {params.peaks}`
125-
genome_size=`awk '{{total+=$3-$2}}END{{print total}}' {params.genome_index}`
125+
genome_size=`awk '{{total+=$3-$2}}END{{printf( "%14d",total) }}' {params.genome_index}`
126126
genomecov=`bc -l <<< "$peak_len/$genome_size"`
127127
128128
# write peak-based QC metrics to output file

snakePipes/shared/rules/FASTQ.snakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if pairedEnd or pipeline=="scrnaseq":
55
r2 = indir+"/{sample}"+reads[1]+ext
66
output:
77
temp("originalFASTQ/{sample}.valid")
8-
conda: CONDA_SHARED_ENV
8+
conda: CONDA_FQLINT_ENV
99
shell:"""
1010
fq lint {input.r1} {input.r2}
1111
touch {output}
@@ -16,7 +16,7 @@ else:
1616
r1 = indir+"/{sample}"+reads[0]+ext
1717
output:
1818
temp("originalFASTQ/{sample}.valid")
19-
conda: CONDA_SHARED_ENV
19+
conda: CONDA_FQLINT_ENV
2020
shell:"""
2121
fq lint {input.r1}
2222
touch {output}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
channels:
2+
- bioconda
3+
dependencies:
4+
- fq = 0.12.0

snakePipes/shared/rules/envs/makePairs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: pairtools_phased
22
channels:
33
- conda-forge
44
- bioconda
5-
- defaults
65
dependencies:
76
- bwa
7+
- cooler
88
- samtools
99
- tabix
1010
- bcftools

snakePipes/shared/rules/envs/shared.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ dependencies:
1212
- fastqc = 0.12.1
1313
- cutadapt = 4.6
1414
- trim-galore = 0.6.10
15-
- multiqc = 1.19
15+
- multiqc = 1.23
1616
- fastp = 0.23.4
1717
- umi_tools = 1.1.4
18-
- fq = 0.11.0
1918
- pybigwig = 0.3.22
2019

snakePipes/shared/rules/masked_genomeIndex.snakefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ from os.path import join, dirname
22
import glob
33

44
GENOMEDIR = os.path.dirname(genome_fasta)
5-
BASENAME = genome
5+
genome_alias = os.path.splitext(os.path.basename(genome))[0]
6+
BASENAME = genome_alias
67
# define snpgenome_dir
78
if allele_hybrid == 'dual':
89
SNPdir = "snp_genome/" + strains[0] + "_" + \
@@ -50,17 +51,15 @@ else:
5051
params:
5152
strain1 = strains[0],
5253
SNPpath = os.path.abspath(VCFfile),
53-
54-
temp_out=temp("all_SNPs_" + strains[0] + "_GRCm38.txt.gz"),
54+
temp_out=temp("all_SNPs_" + strains[0] + "_" + genome_alias + ".txt.gz"),
5555
out_bname=os.path.basename(SNPFile)
5656
conda: CONDA_SHARED_ENV
5757
shell:
5858
" ( [ -d snp_genome ] || mkdir -p snp_genome ) && cd snp_genome &&"
5959
" SNPsplit_genome_preparation"
6060
" --genome_build {BASENAME}"
6161
" --reference_genome {input.genome} --vcf_file {params.SNPpath}"
62-
" --strain {params.strain1} && cp "
63-
"{params.temp_out} {params.out_bname}"
62+
" --strain {params.strain1}"
6463
"&& cd ../"
6564

6665
if aligner == "STAR":

0 commit comments

Comments
 (0)