SPAdes (St. Petersburg genome assembler) is a genome assembly toolkit integrated into the ATHENA bioinformatics pipeline. SPAdes is designed for single-cell and multi-cell bacterial genomes, plasmids, and metagenomic assemblies, making it an ideal choice for comprehensive NGS data analysis workflows.
- High-Quality Assembly: Produces contigs and scaffolds for bacterial genomes
- Automatic Parameter Selection: Optimized k-mer selection for different data types
- Memory Management: User-configurable memory usage for different system capabilities
- Multi-threading Support: Parallel processing for faster assembly
- Pipeline Integration: Seamlessly uses trimmed reads from ATHENA's preprocessing steps
- Comprehensive Output: Generates contigs, scaffolds, assembly graphs, and detailed logs
./athena spades [OPTIONS]-1, --input1 FILE: First input FASTQ file (for paired-end data)-2, --input2 FILE: Second input FASTQ file (for paired-end data)-o, --output DIR: Output directory for SPAdes results
-r, --report: Generate and display assembly statistics in the terminal-v, --verbose: Enable verbose output for debugging and monitoring assembly progress
./athena spades -1 sample_R1.fastq -2 sample_R2.fastq -o assembly_output/./athena spades -1 trimmed_R1.fastq.gz -2 trimmed_R2.fastq.gz -o assembly_output/./athena spades -1 sample_R1.fastq -2 sample_R2.fastq -o assembly_output/ -v./athena spades -1 sample_R1.fastq -2 sample_R2.fastq -o assembly_output/ -rSPAdes is automatically executed in the ATHENA pipeline through the start command:
./athena start -1 input_R1.fastq -2 input_R2.fastq -o output_directory/- Quality Assessment: FastQC analyzes raw reads
- Read Preprocessing: Trimmomatic cleans and filters reads
- Post-Trim QC: FastQC validates trimmed read quality
- Genome Assembly: SPAdes assembles the cleaned reads
- Assembly QC: QUAST evaluates assembly quality
When running SPAdes, ATHENA prompts for configuration:
Enter number of threads (default 4): 8
Enter memory limit in GB (default 16): 32
SPAdes automatically selects optimal k-mer sizes based on:
- Read length
- Coverage depth
- Data quality
- Assembly complexity
Typical k-mer ranges: 21, 33, 55, 77, 99, 127
- Error Correction: BayesHammer corrects sequencing errors
- K-mer Graph Construction: Builds de Bruijn graphs for multiple k-mer sizes
- Contig Assembly: Generates initial contigs
- Scaffolding: Links contigs using paired-end information
- Gap Filling: Fills gaps in scaffolds when possible
output_directory/04_spades/
├── contigs.fasta # Final assembled contigs
├── scaffolds.fasta # Scaffolded sequences (with gaps)
├── assembly_graph.gfa # Assembly graph in GFA format
├── assembly_graph_with_scaffolds.gfa # Scaffolded graph
├── spades.log # Detailed assembly log
├── params.txt # Assembly parameters used
├── dataset.info # Input dataset information
├── input_dataset.yaml # SPAdes configuration file
├── corrected/ # Error-corrected reads
├── K21/ # K-mer specific directories
├── K33/
├── K55/
├── K77/
├── K99/
├── K127/
├── misc/ # Miscellaneous files
└── tmp/ # Temporary files
- Description: Final assembled contigs without gaps
- Content: High-confidence assembled sequences
- Usage: Primary assembly output for downstream analysis
- Quality: Usually higher quality than scaffolds
- Description: Scaffolded sequences with gap regions (N's)
- Content: Contigs linked by paired-end information
- Usage: Provides longer sequences with gap information
- Quality: May contain gaps but gives better genome structure
- Description: Assembly graph in Graphical Fragment Assembly format
- Content: Graph representation of the assembly
- Usage: Visualization and analysis of assembly complexity
- Tools: Can be viewed with Bandage, AGB, or other graph viewers
- Description: Comprehensive assembly log
- Content: All assembly stages, statistics, and potential issues
- Usage: Troubleshooting and assembly quality assessment
- Information: Memory usage, timing, k-mer statistics
- Total contigs: Number of assembled contigs
- Total length: Total assembled genome size
- Largest contig: Size of the longest contig
- N50: Statistical measure of assembly contiguity
- GC content: Overall GC percentage
- Coverage depth: Average sequencing coverage
- Assembly completeness: Percentage of genome assembled
- Misassemblies: Potential assembly errors
- Gaps: Number and total length of gaps in scaffolds
- Bacterial genomes: 4-16 GB RAM typically sufficient
- Large genomes: May require 32-64 GB RAM
- Metagenomes: Can require 100+ GB RAM
- User configuration: Adjustable during execution
- CPU cores: Scales well with available cores
- Optimal range: 4-16 threads for most datasets
- Diminishing returns: >16 threads may not provide significant speedup
- Memory bandwidth: Can become limiting factor
- Small bacterial genomes: 10-30 minutes
- Large bacterial genomes: 30-120 minutes
- Complex assemblies: Several hours
- Factors: Genome size, coverage, complexity, system specifications
- Use trimmed reads: ATHENA automatically uses Trimmomatic output
- Quality filtering: Remove low-quality reads before assembly
- Coverage assessment: Optimal coverage is 30-100x for bacterial genomes
- Read length: Longer reads generally produce better assemblies
- Memory allocation: Set to 70-80% of available system RAM
- Thread count: Use number of available CPU cores minus 2-4
- k-mer selection: Let SPAdes auto-select for best results
- Always run QUAST: Automated in ATHENA pipeline
- Check assembly statistics: Review N50, contig count, total length
- Validate with reference: If reference genome available
- Look for contamination: Unusual GC content or phylogenetic markers
Error: Not enough memory allocated
Solution: Increase memory allocation or use a system with more RAM
Warning: Low coverage detected
Solution: Check input data quality, consider additional sequencing
Warning: High number of short contigs
Solution:
- Verify input data quality
- Check for contamination
- Consider different assembly parameters
Error: SPAdes terminated unexpectedly
Solution:
- Check spades.log for specific error messages
- Verify input file integrity
- Ensure sufficient disk space
Enable verbose mode (-v) to monitor:
- Assembly progress in real-time
- Memory usage patterns
- K-mer statistics
- Error correction results
- Detailed timing information
The spades.log file contains:
- Command line parameters
- Input data statistics
- Error correction results
- Assembly stage progress
- Final assembly statistics
- Warning and error messages
When used in the ATHENA pipeline, assemblies are automatically validated using QUAST, which provides:
- Assembly statistics comparison
- Misassembly detection
- Gene prediction and annotation
- Comparative analysis with reference genomes
Additional validation can be performed using:
- BUSCO: Assess completeness using universal single-copy orthologs
- CheckM: Estimate genome completeness and contamination
- Kraken2: Taxonomic classification and contamination detection
- Bandage: Assembly graph visualization
For advanced users, SPAdes parameters can be customized by modifying the source code in src/spades/spades.cpp:
// Example parameter modifications
std::string spades_cmd = "spades.py --pe1-1 " + input1 + " --pe1-2 " + input2;
spades_cmd += " -o " + output_dir;
spades_cmd += " --threads " + std::to_string(threads);
spades_cmd += " --memory " + std::to_string(memory);
// Add custom parameters here
spades_cmd += " --careful"; // Reduces mismatches and indels
spades_cmd += " --cov-cutoff auto"; // Automatic coverage cutoffSPAdes supports various specialized modes:
--isolate: For bacterial isolate genomes--sc: For single-cell assemblies--meta: For metagenomic assemblies--plasmid: For plasmid assemblies--rna: For RNA-seq assemblies
ATHENA automatically runs QUAST on SPAdes output for:
- Assembly quality assessment
- Statistical analysis
- Comparative genomics (if reference provided)
- HTML report generation
SPAdes outputs are compatible with:
- Annotation tools: Prokka, RAST, NCBI PGAP
- Comparative genomics: MUMmer, progressiveMauve
- Phylogenetic analysis: FastANI, dDDH
- Visualization: IGV, Artemis, JBrowse
- Minimum required: SPAdes v3.13.0
- Recommended: SPAdes v3.15.x or newer
- Compatibility: ATHENA works with all modern SPAdes versions
- FASTQ: Compressed (.gz) and uncompressed
- FASTA: For preprocessed reads
- Quality encoding: Phred+33 (standard Illumina)
- Read types: Paired-end, mate-pair, single-end
For additional information about SPAdes capabilities and advanced usage:
- Official SPAdes documentation: http://cab.spbu.ru/software/spades/
- SPAdes manual: https://github.com/ablab/spades/blob/main/README.md
- ATHENA project documentation
- Assembly best practices guides
This documentation covers SPAdes as integrated within the ATHENA pipeline. For standalone SPAdes usage with custom parameters, refer to the official SPAdes documentation.