Tutorial
A complete walkthrough using the 100-sample synthetic test dataset included with sRNA-TAPS. By the end you will have run the full Snakemake pipeline from raw FASTQs to called m5C sites, automatic R report figures, and, optionally, a three-tool benchmarking comparison.
Create the synthetic FASTQs, sample sheet, and project structure with the expected chemistry already seeded in.
Move from dry-run validation to full execution, then track progress through SLURM, logs, and output checkpoints.
Check seeded miRNA sites, review report figures, and extend the run into optional benchmarking when needed.
sRNA-TAPS conda environment active, built from environment.yaml (it includes R and the report packages), and the sRNA-TAPS repository cloned. No pre-built genome index is required — the pipeline downloads the configured species reference automatically.Generate the test FASTQs
The simulator generates 100 samples with TAPS chemistry. Seeded m5C sites convert at 60 to 90% in treat, 5 to 10% in pb_Ctrl and 1 to 3% in no-treat; other C convert at 0.5%. Reads are 20 to 34 nt, half of them with the TruSeq small RNA adapter, drawn from real GRCh38 fragments: miRNA 40%, mitochondrial tRNA 25%, rRNA 25% and snoRNA 10%. Each fragment contributes only reads that the three-letter alignment places back at their own locus, so every seeded site can be recovered.
python3 tests/simulate_taps_srna.py \
--outdir ~/srnataps_sim \
--reads 1000000 \
--seed 42
You should see 100 .fastq.gz files, a samples.tsv and truth_sites.tsv (the seeded sites in genomic coordinates) in the output directory. This takes about 40 minutes.
--seed 42 makes the simulation fully reproducible. You will get identical results every time.Set up the project directory
sRNA-TAPS needs two files in the project root: a config.yaml and a samples.tsv. srnataps init writes a complete config, and the simulator has already written the sample sheet.
srnataps init --outdir ~/srnataps_test --species human --fastq-dir ~/srnataps_sim
cp ~/srnataps_sim/samples.tsv ~/srnataps_test/samples.tsv
cd ~/srnataps_test
Open config.yaml and set any paths marked <REQUIRED>.
species: human. Leave genome_fa, gtf, and bowtie1_index empty to let the pipeline download the matching Ensembl reference and build the Bowtie1 index automatically before any samples are processed.Dry-run to verify the DAG
Always run a dry-run first. Snakemake prints the complete list of jobs without executing anything — a clean dry-run means your config, sample sheet, and file paths are all correct.
cd ~/srnataps_test
snakemake \
--snakefile /path/to/sRNA-TAPS/srnataps/workflow/Snakefile \
--configfile config.yaml \
--profile /path/to/sRNA-TAPS/srnataps/workflow/profiles/slurm \
--dry-run 2>&1 | tail -20
You should see a job count table listing download_genome_fa, download_gtf, the three-letter index rules, fastqc_pretrim, trim_galore, bowtie1_align, biotype_split, taps_call, the condition rules, the report rules, and multiqc. No errors means you are ready to launch.
Run the pipeline
Launch the pipeline via the tmux launcher (recommended for SLURM clusters) or directly in the background. The coordinator process runs on the login node and submits all jobs to SLURM automatically.
Option A — tmux launcher (recommended)
cd ~/srnataps_test
bash /path/to/sRNA-TAPS/sRNA_taps.bash
This opens a named tmux session. Detach at any time with Ctrl+B then D — the run continues in the background. Reattach later with tmux attach -t sRNA_TAPS.
Option B — direct background launch
cd ~/srnataps_test
snakemake \
--snakefile /path/to/sRNA-TAPS/srnataps/workflow/Snakefile \
--configfile config.yaml \
--profile /path/to/sRNA-TAPS/srnataps/workflow/profiles/slurm &
disown %1
disown %1 immediately after launch detaches the Snakemake coordinator from your terminal so it survives if you close the session.Monitor progress
Check on the run at any time from a new terminal without interrupting it.
SLURM queue
# Number of active jobs (subtract 1 for the header line)
squeue -u $USER | wc -l
Snakemake log
tail -f ~/srnataps_test/.snakemake/log/$(ls -t ~/srnataps_test/.snakemake/log/ | head -1)
Press Ctrl+C to stop watching the log — this does not affect the running pipeline.
Output checkpoints
# Alignment done?
ls ~/srnataps_test/04b.aligned/*.sorted.bam | wc -l # expect 100
# TAPS calls done?
ls ~/srnataps_test/07.taps_calls/miRNA/*_taps.tsv | wc -l # expect 100
# Report figures generated?
ls ~/srnataps_test/report/figures/*.pdf | wc -l
genome_fa and bowtie1_index to the same paths.The full 100-sample test run takes approximately 2–4 hours on a standard SLURM cluster, depending on node availability. Report figures for QC and biotype composition appear while later stages are still running.
Verify the TAPS signal
The simulator wrote the seeded sites to truth_sites.tsv. Once the run is complete, compare them with the calls:
python3 tests/check_simulation_recovery.py \
--truth ~/srnataps_sim/truth_sites.tsv \
--project ~/srnataps_test
For each biotype this prints the seeded sites, how many the replicate and stringent tiers recovered, the median pooled C to T rate at seeded sites per condition, and the replicate-tier calls that are not seeded sites. You can also look at single samples:
head ~/srnataps_test/07.taps_calls/miRNA/treat_HEK_R1_miRNA_taps.tsv
head ~/srnataps_test/07.taps_calls/miRNA/no-treat_Ctrl_HEK_R1_miRNA_taps.tsv
# Replicate-supported calls
ls ~/srnataps_test/07d.replicate_calls/miRNA/
Expected rates at seeded positions:
| Condition | mod_rate |
|---|---|
| TET + PB | 60 to 90% |
| PB | 5 to 10% |
| Ctrl | 1 to 3% |
Explore the report figures
Report figures are generated automatically at each pipeline stage — no separate steps needed. All figures are written to report/figures/ in PDF, PNG, and SVG format.
ls ~/srnataps_test/report/figures/
| Figure prefix | Contents |
|---|---|
01a_* | Read length distributions (raw and trimmed) |
01b_* | Bowtie1 mapping rates per sample |
02_* | Biotype composition per sample and condition |
03_* | Genome-wide C to T rate distributions and percentiles |
04a_* | Modification rate distributions |
04c_* | Condition comparison scatter |
04d_* | Waterfall plot of called sites |
04e_* | Trinucleotide context of called sites |
04k_* | Top 10 sites, heatmap and per biotype |
06_* | Sequence context around called sites |
07_* | miRNA modification atlas |
Further panels (04b, 04f to 04j) appear when the data allow them, for example with two cell lines. The benchmark adds 05a to 05e.
The aggregated MultiQC report covering FastQC, Trim Galore, and Bowtie1 is at:
~/srnataps_test/report/multiqc_report.html
Run benchmarking (optional)
The benchmark suite compares sRNA-TAPS calls against rastair (CpG-only and all-context), asTair (all contexts per biotype), and Bismark (bisulfite contrast). It is opt-in because Bismark genome preparation and asTair on large biotypes are slow and not needed for routine analysis.
Set up the asTair environment
asTair has dependency conflicts with Snakemake and must be installed in a separate conda environment. This is a one-time setup:
# Create a dedicated Python 3.9 environment
mamba create -n astair_env -y python=3.9
# Install asTair and setuptools into it
/path/to/conda/envs/astair_env/bin/pip install astair setuptools
# Verify
/path/to/conda/envs/astair_env/bin/astair --help | head -2
Then update benchmark.smk to point to your astair binary path (only needed once):
# In workflow/rules/benchmark.smk, the astair_call rule shell uses:
/path/to/conda/envs/astair_env/bin/astair call \
benchmark.smk.Launch the benchmark
cd ~/srnataps_test
# Dry-run first
snakemake \
--snakefile /path/to/sRNA-TAPS/srnataps/workflow/Snakefile \
--configfile config.yaml \
--profile /path/to/sRNA-TAPS/srnataps/workflow/profiles/slurm \
--dry-run \
all_benchmark 2>&1 | tail -15
# Launch
snakemake \
--snakefile /path/to/sRNA-TAPS/srnataps/workflow/Snakefile \
--configfile config.yaml \
--profile /path/to/sRNA-TAPS/srnataps/workflow/profiles/slurm \
all_benchmark &
disown %1
The benchmark adds rastair (36 jobs), asTair (144 jobs across 8 biotypes × 18 samples), and Bismark (18 align + 1 index). Monitor with squeue -u $USER. When complete, the comparison outputs and benchmark figures will be at:
~/srnataps_test/09.compare/concordance_summary.tsv
~/srnataps_test/09.compare/correlation_summary.tsv
~/srnataps_test/report/figures/04a_concordance_heatmap.pdf
~/srnataps_test/report/figures/04b_correlation.pdf
~/srnataps_test/report/figures/04c_site_overlap.pdf