BIOINFORMATICS / RESEARCH SOFTWARE
AQUADEX
An eDNA analysis pipeline combining Kraken2 taxonomy, DNABERT-S sequence embeddings, exact FAISS L2 retrieval and density-based clustering.
Reference classification meets representation learning.
Environmental DNA contains mixed, noisy sequence reads whose organisms may be poorly represented in reference databases. Aquadex couples conventional taxonomic assignment with a second, representation-based retrieval path: quality-filtered and dereplicated sequences are embedded, anchored to reference vectors and ranked by distance-derived novelty. Per-run HDF5, TSV, Newick and JSON artifacts connect the analysis stages to a dashboard for quality control, diversity and candidate inspection.
Reference neighbours
Default exact-search neighbourhood in FAISSAnchoring.
Vector storage
Reference embeddings are stacked into a dense FAISS matrix.
Novelty transform
Applied to the nearest squared-L2 reference distance.
Nearest-reference novelty
z is a query sequence embedding and rⱼ a reference embedding. IndexFlatL2 computes squared Euclidean distance; the minimum distance feeds directly into the NoveltyScorer distance metric.
Reference anchoring confidence
FAISSAnchoring averages the retrieved neighbour distances before exponentiation. This distinguishes a close single neighbour from the broader local reference neighbourhood. Both formulas are implemented in the pipeline source.
02 / THROUGH THE SYSTEM
INPUT → OUTPUT- 01
Prepare
FASTQ input passes through fastp quality control, then sequence conversion and vsearch dereplication.
- 02
Classify
Kraken2 compares reads with a reference database to attach taxonomic assignments.
- 03
Embed
Locally loaded DNABERT-S converts sequences into vectors; FAISS searches their nearest reference neighbours.
- 04
Explore
Distance-based novelty scores, dimensionality reduction and clustering organise unfamiliar sequences for inspection.
- 05
Inspect
The dashboard connects quality, diversity, taxonomy and embedding views with downloadable run artifacts.
FASTQ preprocessing and artifact isolation
The tool-backed path runs fastp for read filtering, seqtk for sequence conversion and vsearch for dereplication before Kraken2 assignment. Run-specific directories separate intermediate files from final reports. A background worker advances the pipeline while status endpoints expose progress, streaming completed artifacts directly to the client.
DNABERT-S → float32 vectors → IndexFlatL2
DNABERT-S generates sequence representations locally. Reference embeddings are loaded from HDF5, stacked as float32 arrays and inserted into FAISS IndexFlatL2. Each query returns five nearest reference identifiers and squared Euclidean distances. Exact flat search avoids an approximate-index recall parameter; the search work scales with the number and dimension of reference vectors.
03 / SELECTED EVIDENCE
03 FRAMES
Read retention and base-quality distribution
QC output is the first diagnostic boundary, summarizing retained versus removed reads and adapter quality before downstream taxonomic classification.

Alpha-diversity aggregation
The aggregator exposes richness, Shannon-derived diversity and community summaries calculated directly from abundance tables across sampling sites.

Sequence embedding projection
A low-dimensional projection exposes neighbourhoods and cluster assignments from the embedding path. Projection proximity is an exploratory view; reference ranking uses the original vector-space distances.
Novelty scoring and latent-space structure
The novelty scorer maps the minimum reference distance through 1 − exp(−d). A separate anchoring score uses exp(−mean(d)) across retrieved neighbours. UMAP or PCA projects vectors for inspection and HDBSCAN identifies density-connected groups, prioritizing candidate sequences with the highest reference divergence.
Diversity aggregation and reproducible inspection
The results layer computes community summaries from abundance data, including Shannon-derived effective diversity and Hill-number views. HDF5 retains embeddings, TSV preserves sequence-level outputs and Newick represents the generated tree. The interface links quality, taxonomy, diversity and sequence projections with direct artifact downloads.
04 / BUILT WITH
TOOLS & THEIR PLACE- 01Python 3.11Pipeline orchestration & analysis
- 02DNABERT-SSequence representation learning
- 03FAISS IndexFlatL2Exact vector retrieval
- 04Kraken2Reference taxonomic assignment
- 05fastp / vsearchQC & dereplication
- 06UMAP / PCADimensionality reduction
- 07HDBSCANDensity-based clustering
- 08HDF5 / h5pyEmbedding artifacts

