Genomics 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/(genomics)/genome-alignment/page.tsx
- src/lib/forms/(genomics)/blast/tests/blast-form-utils.test.ts
- src/lib/forms/(genomics)/genome-alignment/tests/genome-alignment-form-utils.test.ts
- src/lib/forms/(genomics)/similar-genome-finder/similar-genome-finder-result-utils.ts
- src/lib/forms/(genomics)/genome-annotation/tests/genome-annotation-form-utils.test.ts
- src/components/navbars/navbar-links.ts
Genomics Tools Integration within the DXKB platform provides a suite of bioinformatics services designed to analyze bacterial and viral genomic data. These tools facilitate primary analysis tasks such as sequence searching (BLAST), whole-genome alignment, automated annotation, assembly, and similarity estimation. The integration architecture focuses on providing a unified interface for submitting complex bioinformatics jobs to specialized back-end engines like BV-BRC.
The core services included in this module are:
- BLAST: Basic Local Alignment Search Tool for sequence matching.
- Genome Alignment: Whole-genome comparison using progressiveMauve.
- Genome Annotation: Feature identification using RASTtk (bacteria) or VIGOR4 (viruses).
- Genome Assembly: Reconstructing genomes from raw sequencing reads.
- Similar Genome Finder: Rapid distance estimation using Mash/MinHash.
Sources: src/lib/services/service-info.ts:39-145, src/components/navbars/navbar-links.ts:60-91
Service Architecture and Data Flow
The genomics tools are structured as React-based front-end services that capture user parameters through schema-validated forms (TanStack Form). These parameters are transformed into specific JSON payloads required by backend analysis services.
General Analysis Workflow
The following diagram illustrates the standard data flow from user input to job submission for a genomics service.
A typical workflow involves capturing sequence data (pasted FASTA or workspace files), selecting algorithmic parameters, and defining output locations.
Sources: src/app/services/(genomics)/genome-alignment/page.tsx:55-75, src/lib/forms/(genomics)/blast/tests/blast-form-utils.test.ts:117-135
Core Genomics Services
BLAST (Basic Local Alignment Search Tool)
The BLAST service allows searches against public or private databases using DNA or protein queries. It supports four primary programs: BLASTN, BLASTX, BLASTP, and tBLASTn.
| Feature | Description |
|---|---|
| Input Sources | Sequence text, Workspace FASTA files, or Feature Groups. |
| Databases | Reference genomes (Bacteria/Archaea/Virus), Taxons, or custom genome lists. |
| Database Types | Genome Sequences (NT), Genes (NT), and Proteins (AA). |
| Parameters | Max hits, E-value cutoff, and specific search programs. |
Sources: src/lib/services/service-info.ts:39-106, src/lib/forms/(genomics)/blast/tests/blast-form-utils.test.ts:137-185
Genome Alignment (Mauve)
The Genome Alignment service utilizes the progressiveMauve algorithm to produce whole-genome alignments of two or more genomes. This is essential for identifying homologous regions and DNA recombination events.
The alignment process requires at least 2 genomes and supports up to 20 total. Users can manually set "Seed Weight" (minimum weight of seed pattern) and "Weight" (minimum Locally Collinear Block score).
Sources: src/lib/services/service-info.ts:111-136, src/app/services/(genomics)/genome-alignment/page.tsx:28-40
Similar Genome Finder
This service provides rapid distance estimation between a query genome and reference databases using the Mash/MinHash algorithm.
Key Parameters for Similarity Search:
- Distance: Mash distance estimating sequence mutation rates.
- P-Value Threshold: Maximum allowable p-value for the Mash Jaccard estimate.
- Scope: Limitation to Reference/Representative genomes or all genomes.
- Max Hits: Caps the number of returned matching genomes.
Sources: src/lib/services/service-info.ts:258-289, src/lib/forms/(genomics)/similar-genome-finder/similar-genome-finder-result-utils.ts:89-115
Data Models and Transformation
Jobs submitted via the UI require strict transformation from form state to API-ready payloads. For example, transformGenomeAnnotationParams ensures that scientific names, taxonomy IDs, and contig paths are correctly mapped before submission to the RASTtk or VIGOR4 engines.
Transformation Logic Example (Genome Annotation)
// Derived from src/lib/forms/(genomics)/genome-annotation/__tests__/genome-annotation-form-utils.test.ts
const transformedPayload = {
contigs: "/path/to/contigs.fa",
recipe: "default",
scientific_name: "Escherichia coli",
taxonomy_id: "562",
my_label: "annotation-run-1",
output_file: "coli annotation-run-1",
output_path: "/workspace/user/output"
};
Sources: src/lib/forms/(genomics)/genome-annotation/tests/genome-annotation-form-utils.test.ts:11-30
Result Parsing (Similar Genome Finder)
Results from services like Mash/MinHash are often columnar or nested JSON-RPC responses. The system utilizes utility functions to flatten these into row-based arrays for UI consumption.
| Field | Source | Type | Description |
|---|---|---|---|
genome_id | Minhash | String | Unique identifier for matching genome. |
distance | Minhash | Number | Probabilistic mutation rate estimate. |
pvalue | Minhash | Number | Significance of the similarity estimate. |
counts | Minhash | String | K-mer matches (e.g., "0/1000"). |
Sources: src/lib/forms/(genomics)/similar-genome-finder/similar-genome-finder-result-utils.ts:11-35
Integration with Workspace
All genomics services are tightly integrated with the DXKB Workspace. Users can select input files (FASTQ, FASTA, Contigs) directly from their workspace and define an output folder where the analysis "job" will place results (e.g., annotated genomes, alignment files, or BLAST result tables). Once a job completes, results appear in the workspace for download or for use in secondary comparative tools.
Sources: src/lib/services/service-info.ts:140-145, src/app/services/(genomics)/genome-alignment/page.tsx:250-265
Genomics Tools Integration provides a comprehensive pipeline for sequence analysis, from initial assembly and annotation to comparative alignment and similarity searching, leveraging standardized bioinformatics algorithms and a robust workspace-integrated submission system.