Metagenomics Tools Integration
Relevant source files
The following files were used as context for generating this wiki page:
- src/lib/services/service-info.ts
- src/app/services/(metagenomics)/metagenomic-binning/page.tsx
- src/lib/forms/(metagenomics)/metagenomic-binning/metagenomic-binning-form-utils.ts
- src/lib/forms/(metagenomics)/metagenomic-read-mapping/tests/metagenomic-read-mapping-form-utils.test.ts
- src/components/navbars/navbar-links.ts
The Metagenomics Tools Integration within DXKB provides a suite of bioinformatics services designed to process environmental samples. This module enables researchers to reconstruct genomes from complex microbial communities, map reads against specific gene databases, and classify organisms taxonomically.
The system integrates several high-throughput computational tools, including Kraken 2 for classification, MetaSPAdes and MEGAHIT for assembly, and KMA for read mapping. These services are exposed through a standardized user interface that supports various input types, including raw sequencing reads (FASTQ), SRA accessions, and pre-assembled contigs.
Sources: src/lib/services/service-info.ts:605-610, src/components/navbars/navbar-links.ts:133-147
Service Architecture and Components
The metagenomics module is structured into three primary services, as defined in the application navigation and service information registries:
- Metagenomic Binning: Reconstructs bacterial and archaeal genomes from environmental samples by "binning" reads or contigs into discrete genomic units.
- Metagenomic Read Mapping: Aligns reads against specific gene sets such as the Comprehensive Antibiotic Resistance Database (CARD) or the Virulence Factor Database (VFDB).
- Taxonomic Classification: Assigns reads to taxonomic bins using k-mer based exact alignment to provide a profile of constituent organisms.
Sources: src/components/navbars/navbar-links.ts:133-147, src/lib/services/service-info.ts:605-610, src/lib/services/service-info.ts:664-668, src/lib/services/service-info.ts:713-719
Data Flow Overview
The following diagram illustrates the high-level data flow for metagenomic processing:
This flow shows how the system handles different input formats and routes them to the appropriate analysis service.
Sources: src/app/services/(metagenomics)/metagenomic-binning/page.tsx:180-210, src/lib/services/service-info.ts:615-635
Metagenomic Binning Service
The Binning service supports two primary starting points: raw reads or assembled contigs. When starting with reads, the service invokes an assembly strategy before the binning process.
Assembly Strategies
- MetaSPAdes: Optimized for challenges inherent in metagenomic assembly. It is only available when a single paired-end library is provided.
- MEGAHIT: A de novo assembler designed for large and complex metagenomics data, capable of whole-data assembly without partitioning.
- Auto: Automatically selects the most appropriate strategy based on input data.
Sources: src/lib/services/service-info.ts:643-653, src/app/services/(metagenomics)/metagenomic-binning/page.tsx:132-140
Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
start_with | Enum | "reads" or "contigs". |
organism | Enum | Target domain: "bacteria", "viral", or "both". |
min_contig_len | Number | Minimum length of contigs to be included (Default: 300). |
min_contig_cov | Number | Minimum read depth coverage (Default: 5). |
disable_dangling | Boolean | If true, decreases memory use by skipping search for dangling contigs. |
Sources: src/lib/forms/(metagenomics)/metagenomic-binning/metagenomic-binning-form-schema.ts:32-40, src/lib/forms/(metagenomics)/metagenomic-binning/metagenomic-binning-form-utils.ts:10-30
Metagenomic Read Mapping
This service utilizes the KMA (k-mer alignment) tool to align reads against specific databases.
Supported Gene Sets
- CARD: Comprehensive Antibiotic Resistance Database.
- VFDB: Virulence Factor Database.
- Custom: Users can provide a specific FASTA file or a Feature Group saved in their workspace.
Sources: src/lib/services/service-info.ts:673-688, src/lib/forms/(metagenomics)/metagenomic-read-mapping/tests/metagenomic-read-mapping-form-utils.test.ts:80-110
Input Handling Logic
Taxonomic Classification
Classification is primarily performed via Kraken 2, which assigns taxonomic labels using exact k-mer alignments.
Analysis Types
The service differentiates between Whole Genome Sequencing (WGS) and 16S rRNA analysis:
- Species Identification (WGS): End-to-end pipeline using
Kraken2Uniq. - Microbiome Analysis (WGS): Uses
Kraken2followed byBrackenfor species-level abundance estimation. - 16S rRNA Analysis: Specialized for 16S sequencing, typically utilizing SILVA or Greengenes databases and performing genus-level Bracken recalculations.
Sources: src/lib/services/service-info.ts:730-760
Database Options
| Database | Sequencing Type | Description |
|---|---|---|
| BV-BRC Database | WGS | Includes RefSeq genomes for Archaea, Bacteria, Viral, Fungi, and more. |
| SILVA | 16S | rRNA genes from bacteria, archaea, and eukaryotes. |
| Greengenes | 16S | rRNA gene sequences specifically for bacteria and archaea. |
Sources: src/lib/services/service-info.ts:783-795
Summary
The Metagenomics Tools Integration provides a comprehensive framework for environmental sequence analysis. By combining assembly, binning, mapping, and classification into a unified workspace environment, it allows for seamless transitions from raw FASTQ data to identified genomic bins and taxonomic profiles. Key technical implementations include logic-based assembler selection (e.g., disabling MetaSPAdes for multiple libraries) and parameterized filtering for contig quality control.
Sources: src/app/services/(metagenomics)/metagenomic-binning/page.tsx:132-140, src/lib/services/service-info.ts:605-610