arwisyah/snakemake_rna_vc_docker_reproduce

None

Overview

Topics:

Latest release: None, Last update: 2024-05-25

Linting: linting: passed, Formatting:formatting: passed

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/arwisyah/snakemake_rna_vc_docker_reproduce . --tag None

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

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.

General settings

To configure this workflow, modify config/config.yaml according to your needs, following the explanations provided in the file.

Sample Files

Add samples to config/samples.tsv and config/units.tsv.

units

In the units file each row contain a single unit for a given sample, with fastq files for read1 and, if present, read2. The file have 4 tab-separated columns:

  • sample: generic sample name, it will be reported also in the samples.tsv file. Can be present multiple times in different rows if the sample has multiple units.
  • unit: is a unique identifier for the unit. A unit, i.e. HSQ1008_141.L001.NA20804 is composed by 3 different parts:
    • flowcell_id: an id for the flowcell or instrument
    • lane: the lane id in which that unit was sequenced
    • sample_id: the sample id (the same in the first column of the file)
  • fq1: absolute path of fastq file containing read1
  • fq2: absolute path of fastq file containing read2, leave blank if SE.

An example config/units.tsv is reported below:

sample	unit	fq1	fq2
SRR7876818	HSQ1008_141.L005.SRR7876818	/abs_path/SRR7876818.L005.R1.fq.gz	/abs_path/SRR7876818.L005.R2.fq.gz
SRR7876818	HSQ1008_141.L006.SRR7876818	/abs_path/SRR7876818.L006.R1.fq.gz	/abs_path/SRR7876818.L006.R2.fq.gz

samples

In the samples file each row contain information for a single sample, with indication of all its units. The file have 3 tab-separated columns:

  • sample: generic sample name, the same indicated in the units.tsv file.
  • odp: Optical Duplicate Distance used for Picard MarkDuplicates, depending on flowcell type.
  • units: comma separated list of units (the unit name reported in the units file) for a given sample.

An example config/samples.tsv is reported below:

sample	odp	units
SRR7876818	100	HSQ1008_141.L005.SRR7876818,HSQ1008_141.L006.SRR7876818
SRR7876819	100	HSQ1008_141.L005.SRR7876819

Linting and formatting

Linting results

None

Formatting results

None