A comprehensive pipeline for analyzing environmental DNA (eDNA) sequences using deep learning and phylogenetic methods.
- Node.js (v18 or higher) - Download here
- Python (v3.8 or higher) - Download here
- Git - Download here
-
Clone or download the project
git clone <repository-url> cd DeepSea-AI-main
-
Run the installation script
install-deps.bat
This will:
- Install all Node.js dependencies
- Install Python dependencies
- Create necessary directories
- Set up environment configuration
-
Configure environment (optional)
- Edit
.envfile for custom settings - Add AWS Bedrock credentials for AI features
- Edit
-
Start the application
start-project.bat
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
./deepsea-ai/
├── frontend/ # React app (Vite + TypeScript)
├── backend/ # Node.js API server
├── pipeline/ # Python ML pipeline
│ ├── scripts/ # Pipeline scripts
│ ├── models/ # Pre-trained models
│ └── data/ # Raw and processed data
├── shared/ # Shared TypeScript schemas
├── docker-compose.yml # Container orchestration
└── README.md # This file
- Preprocessing & QC - Quality filtering, trimming, deduplication
- K-mer Tokenization - Convert sequences to k-mer features
- Embeddings Generation - Create dense representations using DNABERT or SVD
- VAE Clustering - Unsupervised discovery using Variational Autoencoders
- Phylogenetic Visualization - Build similarity graphs and phylogenetic trees
- Taxonomy Assignment - Hybrid workflow with representative BLAST queries
- Report Generation - Comprehensive analysis reports and visualizations
- 📤 File Upload: Drag-and-drop FASTA file upload
- 📊 Real-time Progress: Live pipeline execution monitoring
- 🔬 Results Visualization: Interactive charts and phylogenetic trees
- 🤖 AI Assistant: Query your results with natural language
- 📋 Report Generation: Automated scientific reports
- 💾 Data Export: Download results in multiple formats
- Open http://localhost:5173
- Upload your FASTA file
- Configure analysis parameters
- Monitor pipeline progress
- Explore results and visualizations
# Single command execution
python pipeline/run_pipeline.py --input pipeline/data/raw/sample.fasta
# Advanced usage with options
python pipeline/run_pipeline.py --input sequences.fasta --output-dir processed --method transformer --device cuda --k 6--input: Input FASTA/FASTQ file (required)--output-dir: Output directory (default: pipeline/data/processed)--method: Embedding method - transformer or svd (default: transformer)--device: Device for transformer - cpu or cuda (default: cpu)--k: K-mer size (default: 6)--skip-stages: Skip specific stages (e.g., --skip-stages 1 2)--blast-db: Local BLAST database path for taxonomy assignment--online-blast: Use online BLAST (slower but no local DB needed)
cleaned_sample.fasta- Preprocessed sequencesdedup_counts.csv- Sequence counts and metadataembeddings.npy- Dense sequence embeddingsclusters.csv- Cluster assignmentsnovelty_scores.csv- Novelty detection resultsumap_2d.npy- 2D projections for visualizationphylo_graph.json- Similarity graphphylo_simple.nwk- Phylogenetic treephylo_tree_colored.png- Tree visualizationcluster_taxonomy.csv- Taxonomy assignments for cluster representativessequence_taxonomy.csv- Full taxonomy mapping for all sequencesanalysis_report.md- Comprehensive analysis summarytaxonomy_abundance.png- Taxonomic composition plotsnovelty_analysis.png- Novelty detection visualizationsphylogenetic_diversity.png- Phylogenetic diversity plots
# Build and run with Docker Compose
docker-compose up --build
# Access at http://localhost:80cd frontend
npm install
npm run devcd backend
npm install
npm run devcd pipeline/scripts
pip install -r requirements.txt
python run_pipeline.py --helpYou can run individual pipeline stages:
# Stage 1: Preprocessing
python pipeline/scripts/preprocess.py input.fasta output_dir
# Stage 2: Tokenization
python pipeline/scripts/kmer_tokenize.py cleaned.fasta output_dir --k 6
# Stage 3: Embeddings
python pipeline/scripts/get_embeddings.py cleaned.fasta embeddings.npy --method transformer
# Stage 4: Clustering
python pipeline/scripts/vae_cluster.py
# Stage 5: Phylogenetics
python pipeline/scripts/phylo_vis.py
# Stage 6: Taxonomy Assignment
python pipeline/scripts/run_taxonomy.py --blast-db reference/16S_ribosomal_RNA
# Stage 7: Generate Reports
python pipeline/scripts/biodiversity_analysis.pyThe application includes an AI assistant powered by AWS Bedrock:
- Natural Language Queries: Ask questions about your analysis results
- Automated Report Generation: Generate scientific reports from your data
- Data Interpretation: Get insights about biodiversity patterns
To enable AI features:
- Set up AWS Bedrock access
- Add your credentials to
.envfile:AWS_REGION=us-west-2 AWS_BEARER_TOKEN_BEDROCK=your_token_here
Dependencies not installing:
- Ensure Node.js and Python are in your PATH
- Run
install-deps.batas administrator - Check internet connection for package downloads
Pipeline fails to start:
- Verify Python dependencies:
pip list - Check file permissions in data directories
- Ensure input FASTA files are valid
Frontend not loading:
- Check if port 5173 is available
- Clear browser cache
- Check console for JavaScript errors
Backend API errors:
- Verify port 5000 is available
- Check
.envconfiguration - Review backend logs for errors
- Check the logs in the terminal/command prompt
- Verify all dependencies are installed correctly
- Ensure input files are in the correct format
- Check file permissions and disk space
- ✅ Robust error handling and validation
- ✅ Reproducible results with fixed random seeds
- ✅ Memory-efficient processing for large datasets
- ✅ Support for both CPU and GPU acceleration
- ✅ Comprehensive logging and progress tracking
- ✅ Flexible configuration options
- ✅ Web interface for pipeline management
- ✅ Real-time progress monitoring
- ✅ AI-powered analysis assistant
- ✅ Interactive data visualizations
- ✅ Automated report generation
MIT License - see LICENSE file for details.
Contributions are welcome! Please read the contributing guidelines before submitting pull requests.
Need help? Check the troubleshooting section above or create an issue in the repository.