Skip to main content

APSCALE-Nanopore

Downloads

Metabarcoding pipeline for Oxford Nanopore data, based on APSCALE. APSCALE-Nanopore takes you from the raw Nanopore reads to the read table and the taxonomic assignment: index demultiplexing, primer trimming, quality filtering, clustering/denoising, read table and taxonomic assignment with APSCALE-blast. It can be used with a graphical user interface (runs in your browser) or from the command line, and also supports live processing during sequencing.

  • Input: Nanopore sequencing data (.fastq or .fastq.gz), demultiplexed or not
  • Output: read table (.xlsx/.parquet), OTU/ESV sequences (.fasta), taxonomy table (.xlsx) and quality/summary reports (.html) in your project folder. The read table and taxonomy table have the same format as in APSCALE, so they can be imported directly into TaxonTableTools2 (import format "APSCALE")

Installation

The easiest way is the conda environment of the APSCALE installer, which installs APSCALE-Nanopore and all its dependencies (APSCALE-blast, cutadapt, VSEARCH, SWARM, BLAST+).

Alternatively, install via pip (Python ≥ 3.10):

pip install apscale_nanopore

With pip, VSEARCH, SWARM and BLAST+ must be installed separately and be available in your PATH. APSCALE-Nanopore checks whether they are installed and tells you what is missing.

To download all databases at once from the GUI, the browser used for the download must be installed once:

playwright install chromium

To update:

pip install --upgrade apscale_nanopore

Graphical user interface

conda activate apscale4
apscale_nanopore gui

The graphical interface opens in your browser. Enter the path to your projects folder (e.g. an empty folder named APSCALE_projects) in the sidebar, create the database folder, and create or select a project. Click "🔄 Refresh files and folders" at the top of each page when you have added new files.

Pages

Start

  • Home: overview of the active project (raw files, demultiplexed files, FASTA files, databases), installed tools and package versions, links and citations

Raw Data Processing

  • APSCALE-Nanopore: download databases, adjust the settings (index demultiplexing, primer trimming, quality filtering, clustering/denoising, read table, taxonomic assignment) and run the selected steps. The settings are saved to the project's settings file when the analysis starts. For demultiplexed data, the raw files can be imported into the Demultiplexing sheet with one click. The taxonomic assignment of the pipeline uses the standard settings of APSCALE-blast

Taxonomic Assignment (same as in APSCALE-GUI)

  • Database Finder: find a suitable reference database for your taxonomic group and marker, check whether it is already in your database folder, or build it with the APSCALE-blast Database Creator
  • APSCALE-BLAST: BLAST your OTUs/ESVs with all APSCALE-blast options: database-specific thresholds (db_thresholds.xlsx, calculated with the Database Optimiser) or custom thresholds, filter mode, minimum query coverage, re-BLAST against a second database. Optional: validate the species assignments with GBIF occurrences in your study area. The results are written to 7_taxonomic_assignment/blastn_...

Reports

  • Quality Report: create and view quality plots (mean PHRED score, read length, quality vs. length) for the raw, demultiplexed or primer-trimmed data
  • Summary Report: reads and OTUs/ESVs per sample, created automatically after each run

Downstream

  • Data Analysis: shows which read table and taxonomy table to import into TaxonTableTools2

Live processing during sequencing is only available from the command line (see below).

Command line

Create a project

apscale_nanopore create -p PATH/TO/My_project

A new project folder (My_project_apscale_nanopore) is created. You are asked whether your data is already demultiplexed, and the matching settings file is created. Existing projects are never overwritten.

Run APSCALE-Nanopore

APSCALE-Nanopore can be run in four different ways:

1) Non-demultiplexed data

Copy your non-demultiplexed .fastq(.gz) files to 1_raw_data/data. All files are demultiplexed according to the Demultiplexing sheet.

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore

2) Demultiplexed data

Copy your demultiplexed .fastq(.gz) files to 1_raw_data/data (one file per sample) and add them to the Demultiplexing sheet:

apscale_nanopore import_raw_data -p PATH/TO/My_project_apscale_nanopore

This writes one row per file (the file name is the sample ID) and copies the primers and lengths of the first row to all samples. Check the sheet, then run with -sd (skip demultiplexing):

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -sd

3) Live processing of non-demultiplexed data

Let the sequencer write your .fastq(.gz) files to 1_raw_data/data. APSCALE-Nanopore scans the folder for new files and processes them automatically. Press Ctrl+C to stop.

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -live

4) Live processing of demultiplexed data

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -live -sd

Run individual steps

Run a single step (-step X) or all steps from a specific step onwards (-steps X):

  • 1 = Index demultiplexing
  • 2 = Primer trimming
  • 3 = Quality filtering
  • 4 = Clustering/denoising
  • 5 = Read table
  • 6 = Taxonomic assignment

Example: run only the clustering/denoising

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -step 4

Example: run all steps from the quality filtering onwards

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -steps 3

Re-running the index demultiplexing replaces the previous results (reads are not added twice).

Change settings on the fly

Settings can be changed for a single run without editing the settings file:

Option Setting
-e1 allowed errors index
-e2 allowed errors primer
-minlen / -maxlen minimum / maximum length (for all samples)
-minq minimum quality
-mode clustering/denoising mode
-percid vsearch clustering percentage identity
-alpha vsearch denoising alpha
-d swarm's d value
-rep representative sequence (centroid or consensus)
-minreads read filter threshold

Example:

apscale_nanopore run -p PATH/TO/My_project_apscale_nanopore -steps 4 -mode "Swarm OTUs" -percid 0.98

Quality control

Create quality plots for the raw, demultiplexed or primer-trimmed data (you are asked which folder):

apscale_nanopore qc -p PATH/TO/My_project_apscale_nanopore

Project folder

APSCALE_projects/
├── APSCALE_databases/
└── My_project_apscale_nanopore/
    ├── 1_raw_data/data                <- raw data (non-demultiplexed or demultiplexed)
    ├── 2_index_demultiplexing/data
    ├── 3_primer_trimming/data
    ├── 4_quality_filtering/data
    ├── 5_clustering_denoising/data
    ├── 6_read_table                   <- read table (My_project_read_table.xlsx/.parquet.snappy)
    │   └── data                       <- OTU/ESV sequences (My_project_reads.fasta)
    ├── 7_taxonomic_assignment
    │   ├── My_project                 <- taxonomy table of the pipeline (My_project_taxonomy.xlsx)
    │   └── blastn_My_project_reads    <- taxonomy table of the APSCALE-BLAST page
    ├── 8_nanopore_report              <- quality reports (data) and summary report (main)
    └── My_project_settings.xlsx

Settings file

The settings file has two sheets.

Demultiplexing sheet

One row per sample. The index columns are only required for non-demultiplexed data and can be left empty otherwise. The minimum and maximum length are set per sample, so different markers can be processed in the same run.

Forward index 5-3 Forward primer 5-3 Reverse index 5-3 Reverse primer 5-3 ID Minimum length Maximum length
AGAACGACTTCCATACTCGTGTGA AAACTCGTGCCAGCCACC AGAACGACTTCCATACTCGTGTGA GGGTATCTAATCCCAGTTTG Sample_1 157 177
AACGAGTCTCTTGGGACCCATAGA AAACTCGTGCCAGCCACC AACGAGTCTCTTGGGACCCATAGA GGGTATCTAATCCCAGTTTG Sample_2 157 177

Settings sheet (defaults)

Category Default Comment
cpu count auto Number of cores to use (auto = all cores minus two)
allowed errors index 3 Allowed errors during index demultiplexing
allowed errors primer 3 Allowed errors during primer trimming
minimum quality 20 Reads below this average PHRED quality score are discarded
mode denoised OTUs ESVs, Swarms, denoised OTUs or Swarm OTUs
percid 0.97 vsearch clustering percentage identity
alpha 1 vsearch denoising alpha value
d 1 swarm's d value
representative centroid Representative sequence of OTUs: centroid or consensus
minimum reads 0.0001 Read filter per sample: < 1 = relative (0.0001 = 0.01% of the sample's reads), ≥ 1 = absolute number of reads
apscale blast Yes Run the taxonomic assignment (Yes or No)
task megablast BLAST task (megablast, blastn, dc-megablast)
apscale db Path to the APSCALE database (selected automatically in the GUI)

Bioinformatic workflow

1) Index demultiplexing (cutadapt) – sorts the reads into samples by their index combination. Reads are searched in both orientations (5'-3' and 3'-5').

2) Primer trimming (cutadapt) – removes the primers (both orientations); reads without primers are discarded.

3) Quality filtering (python, vsearch) – removes reads below the minimum mean PHRED score and outside the length range of the sample, then dereplicates the reads.

4) Clustering/denoising (vsearch, swarm) – per sample, followed by de novo chimera removal (vsearch --uchime3_denovo):

  • ESVs: denoising (UNOISE3) to exact sequence variants
  • Swarms: SWARM clustering; the seed (= centroid) is always used as representative
  • denoised OTUs: denoising followed by similarity clustering
  • Swarm OTUs: SWARM clustering followed by similarity clustering

The read count of each OTU/ESV includes the reads of all its cluster members.

5) Read table (python) – builds the read table (OTUs/ESVs × samples) and removes low-abundance OTUs/ESVs per sample (minimum reads). The format is the same as in APSCALE: columns hash, sequence and one column per sample; the hash is the SHA3-256 hash of the sequence; OTUs/ESVs are sorted by their total reads.

6) Taxonomic assignment (BLASTn via APSCALE-blast v3) – assigns taxonomy using a local reference database. The pipeline uses the standard settings of APSCALE-blast (database-specific thresholds of db_thresholds.xlsx, if available); all other options are available on the APSCALE-BLAST page of the GUI or with apscale_blast directly.

Data analysis – import the read table and the taxonomy table into TaxonTableTools2 with the import format "APSCALE".

7) Reports (python, plotly) – summary report after each run and optional quality reports.

Databases

Pre-compiled databases for APSCALE-blast are available here and are updated regularly (the same databases as in APSCALE-GUI). They are stored in APSCALE_projects/APSCALE_databases and can be downloaded directly in the GUI. Each database folder contains a citation.txt. The database path must not contain spaces.

Citation

APSCALE-Nanopore: coming soon. Until then, please cite APSCALE:

Please also cite the programs and data you used:

Reporting issues

Please open an issue or contact me via email (macher@uni-trier.de).

Metadata

Release files for apscale-nanopore 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apscale-nanopore 2.1.1
File Size Uploaded Provenance Actions
apscale_nanopore-2.1.1.tar.gz 57.2 kB Without provenance Details for apscale_nanopore-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apscale-nanopore 2.1.1
File Interpreter ABI Platform Actions
apscale_nanopore-2.1.1-py3-none-any.whl Python 3 none any Details for apscale_nanopore-2.1.1-py3-none-any.whl

Total release size: 113.5 kB

Release files / apscale_nanopore-2.1.1.tar.gz

Download URL apscale_nanopore-2.1.1.tar.gz
Size 57.2 kB
Tags Source
SHA-256 checksum
How to use checksums
21050a0242d5bd17ea32aa19e751f382c4ad512c424f9536ebe85e2095a753b6
BLAKE2b-256 checksum
How to use checksums
c43dcb779e36e4b2aaaf715e2fb8925717ded57f4098e29eee512f50de28f696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / apscale_nanopore-2.1.1-py3-none-any.whl

Download URL apscale_nanopore-2.1.1-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d7dfc369c03502901af140b5d3d0e52a4728b7d325be56656a156eecfa9d294
BLAKE2b-256 checksum
How to use checksums
063d804d128286396098bd2a9cffbb7cd6805aed73d255e14b0dbc69aee347fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Security for apscale-nanopore 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page