SKILL.md
Version Compatibility
Reference examples tested with: 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.
Methylation Calling
"Extract methylation calls from my Bismark BAM" → Generate per-cytosine methylation reports (CpG, CHG, CHH contexts) from aligned bisulfite sequencing data.
- CLI:
bismark_methylation_extractor --bedGraph --cytosine_report sample.bam
Basic Extraction
# Extract methylation calls from Bismark BAM
bismark_methylation_extractor --gzip --bedGraph \
sample_bismark_bt2.bam
Paired-End Extraction
bismark_methylation_extractor --paired-end --gzip --bedGraph \
sample_bismark_bt2_pe.bam
Common Options
bismark_methylation_extractor \
--paired-end \ # For paired-end data
--gzip \ # Compress output
--bedGraph \ # Generate bedGraph file
--cytosine_report \ # Genome-wide cytosine report
--genome_folder /path/to/genome/ \ # Required for cytosine_report
--buffer_size 10G \ # Memory buffer
--parallel 4 \ # Parallel extraction
-o output_dir/ \
sample.bam
CpG Context Only
# Most common - extract only CpG methylation
bismark_methylation_extractor \
--paired-end \
--no_overlap \ # Avoid double counting overlapping reads
--gzip \
--bedGraph \
--CX \ # Also extract CHG/CHH (optional)
sample.bam
