gynecoloji/snakemake_RNAseq

Containerized Snakemake workflow for RNA-seq: HISAT2 + featureCounts gene counts, Salmon transcript quantification, and comprehensive QC (FastQC, fastp, Picard, Qualimap, RSeQC, MultiQC). On-demand index building; Docker & Apptainer ready.

Overview

Latest release: v1.6.1, Last update: 2026-07-26

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=gynecoloji/snakemake_RNAseq

Quality control: linting: failed formatting: failed

Topics: apptainer bioinformatics docker featurecounts gene-expression hisat2 multiqc ngs quality-control rna-seq salmon snakemake transcriptomics workflow

Workflow Rule Graph

This visualization of the workflow’s rule graph was automatically generated using Snakevision

Rule Graph light

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --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

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

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/gynecoloji/snakemake_RNAseq . --tag v1.6.1

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 using apptainer/singularity, use

snakemake --cores all --sdm apptainer

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

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.

Configuration

This workflow is configured through two files in this directory:

  • config.yaml — all workflow parameters (nested by section)

  • samples.csv — the sample sheet

plus reference data you place under ref/ (see the top-level README.md).

Sample sheet (config/samples.csv)

CSV with one row per sample:

column

required

description

sample_id

yes

Sample name. Reads must be data/<sample_id>_R1_001.fastq.gz / _R2_001.fastq.gz.

condition

no

Free-text label (informational; not consumed by any rule).

The _R1_001.fastq.gz / _R2_001.fastq.gz suffixes are set by samples.r1_suffix / samples.r2_suffix in config.yaml.

Parameters (config/config.yaml)

Every parameter — type, default, description — is defined in the config schema, workflow/schemas/config.schema.yaml. The workflow validates config.yaml against it on every run (and fills in defaults for anything omitted), and the Snakemake Workflow Catalog renders it as a parameter table. config.yaml ships with working defaults and an inline comment on each parameter.

Reference data

Genomes, indexes and large annotations are not tracked in git. Place them under ref/ matching the references: paths in config.yaml. See the top-level README.md (Reference Files) for exact files and how to obtain them.

The HISAT2 and Salmon indexes are built automatically when absent: provide a genome FASTA (references.genome_fasta) and a transcriptome FASTA (references.transcriptome_fasta), and the hisat2_build / salmon_index / salmon_decoy_index rules create them on the first run. Drop in a pre-built index instead and the build is skipped (the source FASTAs are then never read). Index-build options live under the index: section (hisat2_splice_aware, salmon_kmer).

Chromosome selection

Two optional filters restrict which chromosomes are used, both off by default (an empty list means no filtering):

  • index.align_chroms — restrict the genome to these chromosomes when building the HISAT2 index, so reads only ever align to them (only affects the auto-built index).

  • samtools_filter.keep_chromsafter alignment, keep only reads whose chromosome is in this list (works with any index — bring-your-own or auto-built).

Chromosome names must match your reference (ENSEMBL: 1 2 X Y MT; UCSC: chr1 ).

Workflow parameters

The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.

Parameter

Type

Description

Required

Default

samples_table

string

Path to the sample sheet CSV (column sample_id, optional condition).

yes

config/samples.csv

genome

Informational genome metadata (used in logs/docs only).

. species

string

Homo_sapiens

. build

string

GRCh38

. release

string

102

paths

Input/output directory layout.

yes

. data_dir

string

yes

data

. results_dir

string

yes

results

. logs_dir

string

yes

logs

. ref_dir

string

ref

samples

FASTQ naming convention.

yes

. r1_suffix

string

yes

_R1_001.fastq.gz

. r2_suffix

string

yes

_R2_001.fastq.gz

references

Reference file paths.

yes

. hisat2_index

string

HISAT2 index prefix.

yes

. gtf

string

Gene annotation (GTF).

yes

. bed

string

RSeQC 12-column BED.

yes

. picard_jar

string

Picard Tools JAR.

yes

. salmon_index

string

Standard Salmon index dir.

yes

. salmon_decoy_index

string

Decoy-aware Salmon index dir.

yes

. genome_fasta

string

Source genome FASTA to build the HISAT2 index and Salmon decoys (used only when indexes are absent).

ref/genome.fa

. transcriptome_fasta

string

Source transcriptome FASTA to build the Salmon indexes (used only when indexes are absent).

ref/transcripts.fa

threads

Per-rule CPU allocation.

yes

. fastqc

integer

8

. fastp

integer

8

. hisat2

integer

20

. samtools

integer

20

. samtools_byname

integer

8

. featurecounts

integer

20

. multiqc

integer

2

. picard

integer

4

. qualimap_bamqc

integer

8

. qualimap_rnaseq

integer

8

. rseqc

integer

4

. salmon

integer

20

fastp

yes

. extra

string

Extra fastp flags

yes

hisat2

yes

. extra

string

HISAT2 library/alignment params.

yes

samtools_filter

yes

. require_flags

string

samtools view -f value.

yes

. exclude_flags

string

samtools view -F value.

yes

. unique_tag

string

Post-filter grep tag for unique reads; empty to skip.

yes

. keep_chroms

array

Post-alignment read filter: keep only reads on these chromosomes (names match the reference; empty = keep all).

featurecounts

yes

. feature_type

string

yes

exon

. attribute

string

yes

gene_id

. strandedness

integer

yes

0

. extra

string

Extra featureCounts flags.

yes

qualimap

yes

. java_mem

string

yes

20G

. protocol

string

yes

non-strand-specific

salmon

yes

. lib_type

string

yes

A

. extra

string

Extra salmon quant flags.

yes

index

Options for the on-demand index-building rules.

. hisat2_splice_aware

boolean

Build the HISAT2 index with –ss/–exon from the GTF (needs ~160 GB RAM for human); false builds a plain genome index.

false

. salmon_kmer

integer

salmon index -k (minimum acceptable match length).

31

. align_chroms

array

Restrict the genome to these chromosomes when building the HISAT2 index (empty = whole genome; only affects the auto-built index).

deg

Options for the opt-in differential-expression stage (deg_all).

. condition_col

string

samples.csv column holding the group labels.

condition

. reference

string

Reference (denominator) level of the contrast.

control

. padj

number

Adjusted-p significance threshold.

0.05

. lfc

number

log2FC

threshold for calling a gene significant.

. top_genes

integer

Genes shown in the top-gene heatmap.

30

. go_ont

string

GO ontology for enrichment.

ALL

. run_kegg

boolean

Also run KEGG over-representation (needs network at runtime).

true

. orgdb

string

Bioconductor annotation package (organism).

org.Hs.eg.db

. kegg_organism

string

KEGG organism code (hsa = human).

hsa

Linting and formatting

Linting results
  1No validator found for JSON Schema version identifier 'http://json-schema.org/draft-07/schema#'
  2Defaulting to validator for JSON Schema version 'https://json-schema.org/draft/2020-12/schema'
  3Note that schema file may not be validated correctly.
  4Lints for rule fastqc_raw (line 13, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
  5    * Shell command directly uses variable RESULTS from outside of the rule:
  6      It is recommended to pass all files as input and output, and non-file
  7      parameters via the params directive. Otherwise, provenance tracking is
  8      less accurate.
  9      Also see:
 10      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 11    * Shell command directly uses variable LOGS from outside of the rule:
 12      It is recommended to pass all files as input and output, and non-file
 13      parameters via the params directive. Otherwise, provenance tracking is
 14      less accurate.
 15      Also see:
 16      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 17    * Shell command directly uses variable RESULTS from outside of the rule:
 18      It is recommended to pass all files as input and output, and non-file
 19      parameters via the params directive. Otherwise, provenance tracking is
 20      less accurate.
 21      Also see:
 22      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 23
 24Lints for rule fastp_trim (line 33, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
 25    * Shell command directly uses variable RESULTS from outside of the rule:
 26      It is recommended to pass all files as input and output, and non-file
 27      parameters via the params directive. Otherwise, provenance tracking is
 28      less accurate.
 29      Also see:
 30      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 31    * Shell command directly uses variable LOGS from outside of the rule:
 32      It is recommended to pass all files as input and output, and non-file
 33      parameters via the params directive. Otherwise, provenance tracking is
 34      less accurate.
 35      Also see:
 36      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 37
 38Lints for rule hisat2_build (line 65, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
 39    * Shell command directly uses variable LOGS from outside of the rule:
 40      It is recommended to pass all files as input and output, and non-file
 41      parameters via the params directive. Otherwise, provenance tracking is
 42      less accurate.
 43      Also see:
 44      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 45    * Param prefix is a prefix of input or output file but hardcoded:
 46      If this is meant to represent a file path prefix, it will fail when
 47      running workflow in environments without a shared filesystem. Instead,
 48      provide a function that infers the appropriate prefix from the input or
 49      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 50      Also see:
 51      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 52      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 53
 54Lints for rule hisat2_align (line 109, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
 55    * Shell command directly uses variable RESULTS from outside of the rule:
 56      It is recommended to pass all files as input and output, and non-file
 57      parameters via the params directive. Otherwise, provenance tracking is
 58      less accurate.
 59      Also see:
 60      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 61    * Shell command directly uses variable LOGS from outside of the rule:
 62      It is recommended to pass all files as input and output, and non-file
 63      parameters via the params directive. Otherwise, provenance tracking is
 64      less accurate.
 65      Also see:
 66      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 67    * Param index is a prefix of input or output file but hardcoded:
 68      If this is meant to represent a file path prefix, it will fail when
 69      running workflow in environments without a shared filesystem. Instead,
 70      provide a function that infers the appropriate prefix from the input or
 71      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
 72      Also see:
 73      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 74      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
 75
 76Lints for rule samtools_sort_filter_index (line 142, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
 77    * Shell command directly uses variable RESULTS from outside of the rule:
 78      It is recommended to pass all files as input and output, and non-file
 79      parameters via the params directive. Otherwise, provenance tracking is
 80      less accurate.
 81      Also see:
 82      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 83    * Shell command directly uses variable LOGS from outside of the rule:
 84      It is recommended to pass all files as input and output, and non-file
 85      parameters via the params directive. Otherwise, provenance tracking is
 86      less accurate.
 87      Also see:
 88      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 89    * Shell command directly uses variable RESULTS from outside of the rule:
 90      It is recommended to pass all files as input and output, and non-file
 91      parameters via the params directive. Otherwise, provenance tracking is
 92      less accurate.
 93      Also see:
 94      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
 95
 96Lints for rule featurecount (line 182, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
 97    * Shell command directly uses variable RESULTS from outside of the rule:
 98      It is recommended to pass all files as input and output, and non-file
 99      parameters via the params directive. Otherwise, provenance tracking is
100      less accurate.
101      Also see:
102      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
103    * Shell command directly uses variable LOGS from outside of the rule:
104      It is recommended to pass all files as input and output, and non-file
105      parameters via the params directive. Otherwise, provenance tracking is
106      less accurate.
107      Also see:
108      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
109
110Lints for rule multiqc (line 209, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk):
111    * Shell command directly uses variable LOGS from outside of the rule:
112      It is recommended to pass all files as input and output, and non-file
113      parameters via the params directive. Otherwise, provenance tracking is
114      less accurate.
115      Also see:
116      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
117    * Shell command directly uses variable RESULTS from outside of the rule:
118      It is recommended to pass all files as input and output, and non-file
119      parameters via the params directive. Otherwise, provenance tracking is
120      less accurate.
121      Also see:
122      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
123    * Shell command directly uses variable RESULTS from outside of the rule:
124      It is recommended to pass all files as input and output, and non-file
125      parameters via the params directive. Otherwise, provenance tracking is
126      less accurate.
127      Also see:
128      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
129
130Lints for rule picard_mean_fragment_length (line 19, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/qc.smk):
131    * Shell command directly uses variable RESULTS from outside of the rule:
132      It is recommended to pass all files as input and output, and non-file
133      parameters via the params directive. Otherwise, provenance tracking is
134      less accurate.
135      Also see:
136      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
137    * Shell command directly uses variable LOGS from outside of the rule:
138      It is recommended to pass all files as input and output, and non-file
139      parameters via the params directive. Otherwise, provenance tracking is
140      less accurate.
141      Also see:
142      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
143    * Shell command directly uses variable RESULTS from outside of the rule:
144      It is recommended to pass all files as input and output, and non-file
145      parameters via the params directive. Otherwise, provenance tracking is
146      less accurate.
147      Also see:
148      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
149
150Lints for rule qualimap_bamqc (line 46, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/qc.smk):
151    * Shell command directly uses variable RESULTS from outside of the rule:
152      It is recommended to pass all files as input and output, and non-file
153      parameters via the params directive. Otherwise, provenance tracking is
154      less accurate.
155      Also see:
156      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
157    * Shell command directly uses variable LOGS from outside of the rule:
158      It is recommended to pass all files as input and output, and non-file
159      parameters via the params directive. Otherwise, provenance tracking is
160      less accurate.
161      Also see:
162      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
163    * Shell command directly uses variable RESULTS from outside of the rule:
164      It is recommended to pass all files as input and output, and non-file
165      parameters via the params directive. Otherwise, provenance tracking is
166      less accurate.
167      Also see:
168      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
169
170Lints for rule samtools_sort_by_name (line 79, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/qc.smk):
171    * Shell command directly uses variable RESULTS from outside of the rule:
172      It is recommended to pass all files as input and output, and non-file
173      parameters via the params directive. Otherwise, provenance tracking is
174      less accurate.
175      Also see:
176      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
177    * Shell command directly uses variable LOGS from outside of the rule:
178      It is recommended to pass all files as input and output, and non-file
179      parameters via the params directive. Otherwise, provenance tracking is
180      less accurate.
181      Also see:
182      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
183
184Lints for rule qualimap_rnaseq (line 97, /tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/qc.smk):
185    * Shell command directly uses variable RESULTS from outside of the rule:
186      It is recommended to pass all files as input and output, and non-file
187      parameters via the params directive. Otherwise, provenance tracking is
188      less accurate.
189      Also see:
190      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
191    * Shell command directly uses variable LOGS from outside of the rule:
192      It is recommended to pass all files as input and output, and non-file
193      parameters via the params directive. Otherwise, provenance tracking is
194      less accurate.
195      Also see:
196      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
197    * Shell command directly uses variable RESULTS from outside of the rule:
198      It is recommended to pass all files as input and output, and non-file
199      parameters via the params directive. Otherwise, provenance tracking is
200      less accurate.
201
202... (truncated)
Formatting results
 1[DEBUG] 
 2[DEBUG] In file "/tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/qc.smk":  Formatted content is different from original
 3[DEBUG] 
 4[DEBUG] 
 5[DEBUG] 
 6[DEBUG] 
 7[DEBUG] In file "/tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/det.smk":  Formatted content is different from original
 8[DEBUG] 
 9[DEBUG] In file "/tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/rnaseq.smk":  Formatted content is different from original
10[DEBUG] 
11[DEBUG] In file "/tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/common.smk":  Formatted content is different from original
12[DEBUG] 
13[DEBUG] In file "/tmp/tmpx_760ooe/gynecoloji-snakemake_RNAseq-87f6a7d/workflow/rules/transcript_de.smk":  Formatted content is different from original
14[INFO] 5 file(s) would be changed 😬
15[INFO] 3 file(s) would be left unchanged 🎉
16
17snakefmt version: 0.11.5