Protein & Utility Tools
Relevant source files
The following files were used as context for generating this wiki page:
- src/app/services/(utilities)/fastq-utilities/page.tsx
- src/lib/services/service-info.ts
- src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-schema.ts
- src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-utils.ts
- src/lib/forms/(protein-tools)/proteome-comparison/proteome-comparison-form-utils.ts
- src/constants/datafields/protein_structure.ts
- src/constants/datafields/protein_feature.ts
- src/components/navbars/navbar-links.ts
Introduction
The Protein & Utility Tools module within the DXKB project provides a suite of specialized services for analyzing protein sequences and managing genomic raw data. These tools are designed to facilitate comparative proteomics, sequence alignment, and quality control of high-throughput sequencing data. The module is divided into two primary categories: Protein Tools, which focus on functional and structural analysis (such as MSA, SNP analysis, and Proteome Comparison), and Utilities, which provide essential pre-processing capabilities like FASTQ file manipulation.
These services leverage established bioinformatics algorithms including BLASTP, Mafft, and Muscle to deliver high-fidelity research data. All tools are integrated into the DXKB workspace, allowing users to select inputs from existing database records, uploaded FASTA files, or manual keyboard inputs.
Sources: src/lib/services/service-info.ts:717-724, src/components/navbars/navbar-links.ts:108-142
Protein Tools
Protein tools focus on the comparative and structural analysis of viral and bacterial proteins. Key services include Multiple Sequence Alignment (MSA), SNP analysis, and bidirectional proteome comparison.
Proteome Comparison Service
This service performs protein sequence-based genome comparison using bidirectional BLASTP. It allows researchers to compare up to eight genomes against a reference genome to identify homologous proteins and visualize them in an interactive circular genome view.
- Logic: The service calculates similarity based on three primary metrics: Minimum % Coverage (default 30%), Maximum BLAST E-value (default 1e-5), and Minimum % Identity (default 10%).
- Data Flow: Parameters are transformed into an API-ready format where the reference genome is assigned a 1-based index in a combined list of genomes, user-uploaded FASTA files, and feature groups.
MSA and SNP Analysis
This service provides Multiple Sequence Alignment and identifies variations (SNPs) across sequences. It supports both unaligned and pre-aligned input sequences.
| Parameter | Description | Supported Options |
|---|---|---|
| Aligner | The algorithm used for alignment | Mafft, Muscle |
| Strategy | Specific execution mode for Mafft | auto, fftns1, fftns2, fftnsi, einsi, linsi, ginsi |
| Alphabet | Sequence type detection | DNA, Protein |
| Reference | Sequence to compare against | None, First, Feature ID, Genome ID, Custom String |
Sources: src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-schema.ts:16-52, src/lib/services/service-info.ts:717-729
Protein Data Models
The system maintains structured data for protein features and structures, used for table rendering and metadata tracking.
- Protein Structure Fields: Tracks PDB IDs, organism names, taxon IDs, and experimental details like resolution and method (e.g., X-ray crystallography).
- Protein Feature Fields: Maps functional annotations including RefSeq locus tags, Interpro IDs, and evidence codes for specific protein products.
Sources: src/constants/datafields/protein_structure.ts:1-125, src/constants/datafields/protein_feature.ts:1-168
Utility Tools
Utilities focus on the raw data level, specifically handling FASTQ files from high-throughput sequencing platforms like Illumina and Nanopore.
FastQ Utilities Pipeline
The FastQ Utilities service allows users to define a multi-step pipeline for processing sequence reads. Actions are performed in the order they are added to the pipeline.
Supported Pipeline Actions
- Trim: Uses Trim Galore to remove adapters and low-quality bases.
- Fastqc: Generates quality control reports for raw or processed data.
- Align: Uses Bowtie2 to align reads to a target genome and generates BAM files/SamStat reports.
- Paired Filter: Uses Fastq-Pair to synchronize paired-end files and ensure every read has a matching mate.
Sources: src/app/services/(utilities)/fastq-utilities/page.tsx:188-232, src/lib/services/service-info.ts:1148-1185
Input Library Management
The system utilizes a shared library selection logic (useTanstackLibrarySelection) to handle three types of sequencing inputs:
- Paired-end Reads: Requires two files (Read 1 and Read 2).
- Single-end Reads: Requires a single FASTQ file and platform specification (Illumina, Nanopore, IonTorrent, etc.).
- SRA Accession: Allows direct import from the NCBI Sequence Read Archive using SRR numbers.
Sources: src/app/services/(utilities)/fastq-utilities/page.tsx:143-186, src/lib/services/service-info.ts:9-35
Technical Implementation Details
Parameter Transformation
Before submission to the backend, form data is sanitized and transformed. For instance, in the msa-snp-analysis tool, the alphabet is auto-detected from FASTA headers or file types if not explicitly set by the user.
// Example transformation logic for MSA SNP Analysis
if (!params.alphabet) {
if (data.fasta_files && data.fasta_files.length > 0) {
const firstFile = data.fasta_files[0];
params.alphabet = firstFile.type.includes("protein") ? "protein" : "dna";
}
}
Sources: src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-utils.ts:153-162
Form Validation
The tools implement strict validation via Zod schemas and custom utility functions:
- FASTA Validation: Ensures nucleotide-only input for certain tools and checks for a minimum number of sequences (e.g., minimum 2 for alignment without a reference).
- Library Validation: Prevents duplicate SRR accessions or file paths from being added to the same job.
- Pipeline Constraints: Limits the FastQ Utilities pipeline to a maximum of 5 concurrent actions.
Sources: src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-schema.ts:193-195, src/lib/forms/(protein-tools)/msa-snp-analysis/msa-snp-analysis-form-utils.ts:74-87
Conclusion
The Protein & Utility Tools provide a robust infrastructure for both low-level data processing and high-level proteomic analysis. By integrating standard bioinformatics workflows into a unified workspace, the DXKB project enables researchers to transition seamlessly from raw sequencing reads to detailed comparative protein studies.