QONTAS (Quantification of ONT Amplicon Sequences) is a tool designed to take amplicon sequencing reads and generate a clean table of unique variants, their counts, and relative abundances. It uses a "Cookie Cutter" approach to bin, clip, and denoise data based on specific genomic regions of interest.
- Per-Region Length Filtering: Filters reads based on their original length before clipping, allowing for diverse amplicon panels.
- Direct Variant Calling: Extracts standard variant notation (insertions, deletions, and SNVs) directly from the CIGAR and MD tags of the alignments.
- Fast One-Pass Parsing: Bypasses intermediate clustering algorithms and temporary file generation by tallying variants directly from the BAM file in memory.
- Multi-Platform Support: Optimized alignment presets for Oxford Nanopore (
ont), PacBio (pb), and Illumina (illumina) sequencing data.
git clone https://github.com/cazzlewazzle89/Qontas.git ./QONTAS
chmod +x ./QONTAS/qontas.pymamba create -n qontas -c bioconda -c conda-forge minimap2 samtools pysam pandas
conda activate qontasQONTAS is run using the qontas.py script. It supports multi-region amplicon panels via a single BED file.
The BED file should be tab-separated. Columns 5 and 6 are used to define the expected length of the original read for that specific target. For example:
#Chrom Start End Name MinLen MaxLen
chr1 1658 1717 geneA 600 650
chr1 2500 3100 geneB 1100 1250
python qontas.py -i sample.fastq.gz -r ref.fa -b regions.bed -s SampleName -p ont -o Qontas_Out| Flag | Name | Description | Default |
|---|---|---|---|
-i |
Input | Sequencing reads in FASTQ format (can be gzipped) | Required |
-r |
Reference | Reference sequence in FASTA format | Required |
-b |
BED | BED file defining regions and length constraints | Required |
-s |
Sample | Sample name used for subdirectory and file naming | Required |
-o |
Outdir | Parent directory for results | Qontas_Out |
-c |
Mincount | Minimum reads per variant to be retained | 10 |
-t |
Threads | Number of threads for Minimap2 mapping | 4 |
-p |
Platform | Sequencing platform (ont, pb, or illumina) |
ont |
Because Qontas requires reads to fully span the target coordinates defined in your BED file, paired-end Illumina reads must be merged prior to running the pipeline.
We highly recommend using fastp for this preprocessing step, as it handles both adapter trimming and paired-end merging simultaneously.
Example fastp merging command:
fastp -i R1.fastq.gz -I R2.fastq.gz -m --merged_out sample_merged.fastq.gzBED Region Length Constraint: When using the -p illumina flag, ensure that the genomic regions defined in your BED file are shorter than your expected merged read length. If the BED coordinates exceed the length of the merged read, the read will be successfully mapped but subsequently discarded by Qontas for failing to span the full target window.
For each sample, QONTAS generates a dedicated folder containing a TSV file for each region defined in the BED file:
Qontas_Out/
└── SampleName/
├── geneA.tsv # TSV with Variant_Name, Count, and Relative Abundance
└── geneB.tsv # TSV with Variant_Name, Count, and Relative Abundance
QONTAS includes a utility script qontas_merge.py to combine all individual sample/region TSVs into a single feature table.
Command Line Usage:
Simply point the script at your main Qontas output directory (the folder you specified with -o in the main script):
python qontas_merge.py -d Qontas_Out/ -o qontas_table.tsvOutput Format: The script produces a Long Format (Tidy) table. This structure is ideal for downstream analysis and plotting.
| Sample | Region | Variant_Name | Count | RelAbund |
|---|---|---|---|---|
| Sample1 | geneA | WT | 500 | 95.0 |
| Sample1 | geneA | A45G | 25 | 4.75 |
| Sample2 | geneA | WT | 600 | 98.0 |
- Multi-Sample: Script to merge individual
.tsvfiles into a single master feature table.