This is the nanocap pipeline from the Sequana project
| Overview: | Adaptive-sampling nanopore quality control. Maps long reads onto a reference (raw and fastp-filtered), computes per-base coverage with sequana_coverage, and aggregates the results in a summary.html entry point and a MultiQC report. |
|---|---|
| Input: | A directory of single-end FastQ files (*.fastq.gz) and a reference FASTA. |
| Output: | summary.html (main entry point), per-sample HTML coverage reports (raw + filtered), a combined nanocap.html per sample, and a global MultiQC report. |
| Status: | production |
| Citation: | Cokelaer et al, (2017), 'Sequana': a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352 |
Install the pipeline with pip:
pip install sequana_nanocap --upgrade
You also need the tools listed in the Requirements section below. The easiest way to get them is the bundled conda environment:
conda env create -f environment.yml conda activate nanocap
Apptainer images referenced in config.yaml are an alternative to installing
the tools locally — pass --apptainer-prefix <dir> to sequana_nanocap
(see Usage).
sequana_nanocap --help sequana_nanocap --input-directory DATAPATH --reference-file reference.fa
This creates a working directory with the Snakemake workflow and a generated
config.yaml. The reference file is copied into the references/
sub-directory of the working directory (for book keeping) and the pipeline uses
that copy. Launch the pipeline with:
cd nanocap bash nanocap.sh # local run (bash, not sh — pipefail is a bashism)
To run with apptainer containers (no local tool install needed):
sequana_nanocap --input-directory DATAPATH \
--reference-file reference.fa \
--apptainer-prefix ~/.sequana/apptainers
cd nanocap
bash nanocap.sh
If you are familiar with Snakemake, you can edit the generated files and invoke Snakemake directly:
snakemake -s nanocap.rules --configfile config.yaml --cores 4 --stats stats.txt
This pipeline requires the following executables:
- fastp
- graphviz
- minimap2
- multiqc
- samtools
- sequana_coverage (ships with
sequana)
All of them can be installed via conda using the bundled environment.yml,
or pulled on demand via the apptainer images declared in config.yaml.
For each input FastQ the pipeline runs two branches in parallel:
- raw — map reads to the reference with
minimap2(-ax map-ont), sort withsamtools, index, compute per-base depth withsamtools depth, runsequana_coveragefor ROI detection. - filtered — same flow, after quality/length filtering with
fastp(defaults:-q 0 -e 9 -l 1000).
A per-sample {sample}/nanocap.html page aggregates both coverage reports
(with a link back to summary.html), and a top-level
multiqc/multiqc_report.html combines the fastp and sequana_coverage outputs
across all samples.
Once the pipeline is finished, open summary.html in the working directory.
This is the main entry point. It follows the standard Sequana report layout and
contains:
- an overview with the (relative) path to the reference and a link to the MultiQC report;
- a per-sample table: number of reads before and after fastp filtering, percentage of reads kept, number of mapped alignments (raw and filtered), and links to the Nanocap, fastp and sequana_coverage (raw and filtered) reports;
- the workflow (DAG), with links to the Snakemake and configuration files;
- the dependencies and the command used to set up the pipeline.
Here is the latest documented configuration file to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.
| Version | Description |
|---|---|
| 0.6.0 |
|
| 0.5.0 |
|
| 0.3.0 |
|
| 0.2.0 |
|
| 0.1.0 | First release. |
