friendsofstrandseq/mosaicatcher-pipeline
Integrated workflow for SV calling from single-cell Strand-seq data
Overview
Topics: bioinformatics pipeline snakemake strand-seq mosaicatcher genomics
Latest release: 2.3.5, Last update: 2024-07-30
Linting: linting: failed, Formatting:formatting: failed
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.
When using Mamba, run
mamba create -c conda-forge -c bioconda --name snakemake snakemake snakedeploy
to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via
conda activate snakemake
Step 2: Deploy workflow
With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:
mkdir -p path/to/project-workdir
cd path/to/project-workdir
In all following steps, we will assume that you are inside of that directory. Then run
snakedeploy deploy-workflow https://github.com/friendsofstrandseq/mosaicatcher-pipeline . --tag 2.3.5
Snakedeploy will create two folders, workflow
and config
. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.
Step 3: Configure workflow
To configure the workflow, adapt config/config.yml
to your needs following the instructions below.
Step 4: Run workflow
The deployment method is controlled using the --software-deployment-method
(short --sdm
) argument.
To run the workflow with automatic deployment of all required software via conda
/mamba
, use
snakemake --cores all --sdm conda
To run the workflow using a combination of conda
and apptainer
/singularity
for software deployment, use
snakemake --cores all --sdm conda apptainer
Snakemake will automatically detect the main Snakefile
in the workflow
subfolder and execute the workflow module that has been defined by the deployment in step 2.
For further options such as cluster and cloud execution, see the docs.
Step 5: Generate report
After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using
snakemake --report report.zip
Configuration
The following section is imported from the workflow’s config/README.md
.
To configure this workflow, modify config/config.yaml according to your needs, following the explanations provided in the file.
At this moment, mosaicatcher-pipeline is designed to automatically produce a configuration file saved in the input folder selected based on the parameter <input_bam_location>. This configuration file looks like the following when running the pipeline with ashleys-qc-pipeline preprocessing module disabled (BAM input):
File | Folder | Sample | Cell | Full_path |
---|---|---|---|---|
BM510x3PE20401 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20401 | .tests/data_CHR21/RPE-BM510/all/BM510x3PE20401.sort.mdup.bam |
BM510x3PE20402 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20402 | .tests/data_CHR21/RPE-BM510/all/BM510x3PE20402.sort.mdup.bam |
If the ashleys-qc-pipeline preprocessing module is enabled (FASTQ input), thus the configuration file looks like the following:
File | Folder | Sample | Cell | Full_path |
---|---|---|---|---|
BM510x3PE20401.1 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20401 | .tests/data_CHR21/RPE-BM510/fastq/BM510x3PE20401.1.fastq.gz |
BM510x3PE20401.2 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20401 | .tests/data_CHR21/RPE-BM510/fastq/BM510x3PE20401.2.fastq.gz |
BM510x3PE20402.1 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20402 | .tests/data_CHR21/RPE-BM510/fastq/BM510x3PE20402.1.fastq.gz |
BM510x3PE20402.2 | .tests/data_CHR21 | RPE-BM510 | BM510x3PE20402 | .tests/data_CHR21/RPE-BM510/fastq/BM510x3PE20402.2.fastq.gz |
This configuration file is then used to create the dictionnary and lists needed to flag wildcards and identify the samples, the different cells for each of them and the associated files.
Linting and formatting
Linting results
/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/scripts/utils/pipeline_aesthetic_start.py:18: SyntaxWarning: invalid escape sequence '\ '
smk = """
/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/scripts/utils/pipeline_aesthetic_start.py:26: SyntaxWarning: invalid escape sequence '\/'
wf_name = """
/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/scripts/utils/pipeline_aesthetic_start.py:138: SyntaxWarning: invalid escape sequence '\ '
smk = """
/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/scripts/utils/pipeline_aesthetic_start.py:145: SyntaxWarning: invalid escape sequence '\/'
wf_name = """
Traceback (most recent call last):
File "/home/runner/micromamba-root/envs/snakemake-workflow-catalog/lib/python3.12/site-packages/snakemake/cli.py", line 2011, in args_to_api
any_lint = workflow_api.lint()
^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba-root/envs/snakemake-workflow-catalog/lib/python3.12/site-packages/snakemake/api.py", line 337, in _handle_no_dag
return method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba-root/envs/snakemake-workflow-catalog/lib/python3.12/site-packages/snakemake/api.py", line 354, in lint
workflow.include(
... (truncated)
Formatting results
[DEBUG]
[DEBUG] In file "/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/rules/setup.smk": Formatted content is different from original
[DEBUG]
[DEBUG]
[DEBUG]
[DEBUG] In file "/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/rules/count.smk": Formatted content is different from original
[DEBUG]
[DEBUG]
[DEBUG]
[DEBUG]
[DEBUG]
<unknown>:2: SyntaxWarning: invalid escape sequence '\d'
<unknown>:1: SyntaxWarning: invalid escape sequence '\d'
[DEBUG]
[DEBUG]
[DEBUG]
[DEBUG] In file "/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/rules/aggregate_fct.smk": Formatted content is different from original
[DEBUG]
[ERROR] In file "/tmp/tmpo3lak8m3/friendsofstrandseq-mosaicatcher-pipeline-2b6921d/workflow/rules/external_data_v8.smk": InvalidPython: Black error:
… (truncated)