SKILL.md
Version Compatibility
Reference examples tested with: Bowtie2 2.5.3+, MetaPhlAn 4.1+, minimap2 2.26+, pandas 2.2+, scanpy 1.10+
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.
MetaPhlAn 4 Profiling
"Profile the species composition of my metagenome" → Determine species-level relative abundances from shotgun metagenomic reads using clade-specific marker gene alignment.
- CLI:
metaphlan sample.fastq --input_type fastq -o profile.txt
MetaPhlAn 4 uses ~5M clade-specific markers from 26,970 species-level genome bins. Supports both short reads (bowtie2) and long reads (minimap2).
Basic Profiling
# Profile single sample
metaphlan sample.fastq.gz \
--input_type fastq \
--output_file profile.txt
Paired-End Reads
# MetaPhlAn processes PE as single file or concatenated
metaphlan reads_R1.fastq.gz,reads_R2.fastq.gz \
--input_type fastq \
--output_file profile.txt \
--mapout sample.map.bz2
Save Mapping Output for Reuse
# First run - save intermediate mapping
metaphlan sample.fastq.gz \
--input_type fastq \
--mapout sample.map.bz2 \
--output_file profile.txt
# Rerun with different settings without realigning
metaphlan sample.map.bz2 \
--input_type mapout \
--output_file profile_v2.txt
Long-Read Support (MetaPhlAn 4+)
# Long reads automatically use minimap2 instead of bowtie2
metaphlan long_reads.fastq.gz \
--input_type fastq \
--output_file profile.txt
