SKILL.md
Version Compatibility
Reference examples tested with: Kraken2 2.1+, MetaPhlAn 4.1+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Kraken2 Classification
"Classify what organisms are in my metagenomic sample" → Assign taxonomic labels to sequencing reads using exact k-mer matching against a reference database for fast initial classification.
- CLI:
kraken2 --db db --paired R1.fastq R2.fastq --report report.txt
Basic Classification
# Classify reads against standard database
kraken2 --db /path/to/kraken2_db \
--output output.kraken \
--report report.txt \
reads.fastq.gz
Paired-End Reads
kraken2 --db /path/to/kraken2_db \
--paired \
--output output.kraken \
--report report.txt \
reads_R1.fastq.gz reads_R2.fastq.gz
Common Options
kraken2 --db /path/to/kraken2_db \
--threads 8 \ # CPU threads
--confidence 0.1 \ # Confidence threshold
--minimum-base-quality 20 \ # Quality filter
--output output.kraken \
--report report.txt \
--use-names \ # Add taxon names to output
--gzip-compressed \ # Input is gzipped
reads.fastq.gz
Memory-Efficient Mode
# For systems with limited RAM
kraken2 --db /path/to/kraken2_db \
--memory-mapping \ # Use disk-based database
--output output.kraken \
--report report.txt \
reads.fastq.gz
