Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Support only snakemake >=8.24.1 #130

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Snakemake workflow: MPRAsnakeflow

[![Documentation Status](https://readthedocs.org/projects/mprasnakeflow/badge/?version=latest)](https://mprasnakeflow.readthedocs.io/latest/?badge=latest)
[![Snakemake](https://img.shields.io/badge/snakemake-≥7.2.1-brightgreen.svg)](https://snakemake.bitbucket.io)
[![Snakemake](https://img.shields.io/badge/snakemake-≥8.24.1-brightgreen.svg)](https://snakemake.github.io/)
[![Tests](https://github.com/kircherlab/MPRAsnakeflow/actions/workflows/main.yml/badge.svg)](https://github.com/kircherlab/MPRAsnakeflow/actions/workflows/main.yml)

This pipeline processes sequencing data from Massively Parallel Reporter Assays (MPRA) to create count tables for candidate sequences tested in the experiment.
Expand Down Expand Up @@ -33,17 +33,17 @@ Create or adjust the `config/example_config.yaml` in the repository to your need

### Step 3: Install Snakemake

Install Snakemake (recommended version >= 8.x) using [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) or [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) (recommended installation via [miniforge](https://github.com/conda-forge/miniforge)):
Install Snakemake (version >= 8.24.1) using [conda >24.7.1](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) (recommended installation via [miniforge](https://github.com/conda-forge/miniforge)):

mamba create -c bioconda -n snakemake snakemake
conda create -c bioconda -n snakemake snakemake

For installation details, see the [instructions in the Snakemake documentation](https://snakemake.readthedocs.io/en/stable/getting_started/installation.html).

### Step 4: Execute workflow

Activate the conda environment:

mamba activate snakemake
conda activate snakemake

Test your configuration by performing a dry-run via

Expand All @@ -58,9 +58,6 @@ using `$N` cores or run it in a cluster environment (here SLURM) via the [slurm
snakemake --software-deployment-method conda --executor slurm --cores $N --configfile config.yaml --workflow-profile profiles/default

Please note that `profiles/default/config.yaml` has to be adapted to your needs (like partition names).
For snakemake 7.x this might work too using slurm sbatch (but depricated in newer snakemake versions:

snakemake --use-conda --configfile config.yaml --cluster "sbatch --nodes=1 --ntasks={cluster.threads} --mem={cluster.mem} -t {cluster.time} -p {cluster.queue} -o {cluster.output}" --jobs 100 --cluster-config config/sbatch.yaml


Please note that the log folder of the cluster environment has to be generated first, e.g:
Expand Down
6 changes: 3 additions & 3 deletions docs/cluster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Using the slurm excecutor plugin running 300 jobs in parallel.
snakemake --sdm conda --configfile config/config.yaml -j 300 --workflow-profile profiles/default --executor slurm


Snakemake 7
-----------
Snakemake 7 (not supported anymore)
-------------------------------------

Here we used the :code:`--cluster` option which is not anymo,onger available in snakemake 8. You can also use the predefined `config/sbatch.yaml` but this might be outdated and we highly recommend to use resources with the workfloe profile.
Here we used the :code:`--cluster` option which is not available in snakemake 8. You can also use the predefined `config/sbatch.yaml` but this might be outdated and we highly recommend to use resources with the workfloe profile.

.. code-block:: bash

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ Use the following steps for installing Sphinx and the dependencies for building
.. code-block:: bash

cd MPRAsnakeflow/docs
mamba env create -f environment.yml -n sphinx
mamba activate sphinx
conda env create -f environment.yml -n sphinx
conda activate sphinx

Use the following for building the documentation.
The first two lines is only required for loading the virtualenv.
Expand Down
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
MPRAsnakeflow's documentation
====================================

.. image:: https://img.shields.io/badge/snakemake-≥7.7.1-brightgreen.svg
:target: https://snakemake.bitbucket.io
.. image:: https://img.shields.io/badge/snakemake-≥8.24.1-brightgreen.svg
:target: https://snakemake.github.io/

.. image:: https://img.shields.io/badge/mamba-≥4.6-brightgreen.svg
:target: https://docs.conda.io/en/latest/miniconda.html
.. image:: https://img.shields.io/badge/conda->24.7.1-brightgreen.svg
:target: https://github.com/conda-forge/miniforge


**Welcome!**

MPRAsnakeflow pipeline processes sequencing data from Massively Parallel Reporter Assays (MPRAs)
to create count tables for candidate sequences tested in the experiment.

MPRAsnakeflow is built on top of `Snakemake <https://snakemake.readthedocs.io/>`_ (version 8 preferred) and is configured via a ``.yaml`` file.
MPRAsnakeflow is built on top of `Snakemake <https://snakemake.readthedocs.io/>`_ (version ≥8.24.1 required) and is configured via a ``.yaml`` file.

Authors
Max Schubach (`@visze <https://github.com/visze>`_)
Expand Down Expand Up @@ -74,7 +74,7 @@ Features
* - Option
- Description
* - ``--software-deployment-method``
- When ``conda`` is set, the utility uses mamba to efficiently query repositories and query package dependencies. MPRAsnakeflow also can use containers via apptainer by using ``--software-deployment-method apptainer``. Recommended option: ``--software-deployment-method conda apptainer``
- When ``conda`` is set, the utility uses conda to efficiently query repositories and query package dependencies. MPRAsnakeflow also can use containers via apptainer by using ``--software-deployment-method apptainer``. Recommended option: ``--software-deployment-method conda apptainer``
* - ``--cores``
- This utility sets the number of cores (``$N``) to be used by MPRAsnakeflow.
* - ``--configfile``
Expand Down
10 changes: 5 additions & 5 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Package management

.. code-block:: bash

conda (mamba) 4.6 or above
conda >24.7.1 or above

Download here: https://github.com/conda-forge/miniforge

Expand All @@ -36,7 +36,7 @@ Workflow language

.. code-block:: bash

snakemake 8.16.0 or above (snakemake >=7.15.1 will also work but cli might be different as here documented)
snakemake 8.24.1 or above

Download here: https://snakemake.readthedocs.io/

Expand All @@ -47,17 +47,17 @@ Clone repository
Download here: https://github.com/kircherlab/MPRAsnakeflow.git


Set up snakemake environment with conda/mamba
Set up snakemake environment with conda
=============================================

This pipeline uses python2.7 and python3.6 with additional R scripts in a Snakemake pipeline. The ``.yml`` files provided will create the appropriate environments and is completely handled by MPRAsnakeflow. The whole pipeline is set up to run on a Linux system.
This pipeline uses python2.7 and python ≥3.7 with additional R scripts in a Snakemake pipeline. The ``.yml`` files provided will create the appropriate environments and is completely handled by MPRAsnakeflow. The whole pipeline is set up to run on a Linux system.

Install the the conda environment. The general conda environment is called ``snakemake``.

.. code-block:: bash

cd MPRAsnakeflow
mamba create -c conda-forge -c bioconda -n snakemake snakemake
conda create -c conda-forge -c bioconda -n snakemake snakemake

# activate snakemake
conda activate snakemake
Expand Down
2 changes: 1 addition & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import pandas as pd
##### check snakemake min version #####
from snakemake.utils import min_version

min_version("7.15.1")
min_version("8.24.1")


##### report workflow #####
Expand Down
Loading