bio-alignment-amplicon-clipping
Trim PCR primers from aligned reads in amplicon-panel BAMs using samtools ampliconclip. Use when processing SARS-CoV-2 ARTIC, hereditary cancer panels, ctDNA hot-spot panels, or any amplicon assay where primer-derived bases would falsely confirm reference at primer footprints.
npx skills add BioTender-max/awesome-bio-agent-skills --skill alignment-amplicon-clipping --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: samtools 1.19+, pysam 0.22+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to 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. # Alignment Amplicon Clipping **"Trim primer-derived bases from amplicon BAM"** -> Soft- or hard-clip the 5' primer footprint after alignment using a primer BED, then repair fixmate/MD/NM tags. - CLI: `samtools ampliconclip -b primers.bed input.bam -o clipped.bam` (since samtools 1.11) - Alternative: `iVar trim`, `BAMClipper`, `fgbio ClipBam` ## Why Primer Trimming After Alignment Amplicon panels (SARS-CoV-2 ARTIC, hereditary cancer panels, ctDNA hot-spot panels, fusion panels, 16S rRNA) use designed PCR primers for enrichment. Primer-derived bases at read 5' ends do NOT reflect biological sequence -- they reflect the primer template. Without trimming: - False reference confirmation at primer footprint positions. - Varian
- Version Compatibility
- Why Primer Trimming After Alignment
- Tool Selection
- Soft-Clip vs Hard-Clip
- Basic ampliconclip Workflow
- Strand-Aware Clipping
- Both-End Clipping
- Primer BED Format
- SARS-CoV-2 ARTIC Comparison
- After Clipping: Required Re-Processing
- Why Not Markdup
- Common Errors
- Quick Reference
- Related Skills
samtools ampliconclip --both-ends --strand --soft-clip \ samtools sort -n clipped.bam | \ samtools fixmate -m - - | \ samtools sort -o sorted.bam - samtools calmd -b sorted.bam reference.fa > clipped_final.bam samtools index clipped_final.bam
What does the bio-alignment-amplicon-clipping skill do?
Trim PCR primers from aligned reads in amplicon-panel BAMs using samtools ampliconclip. Use when processing SARS-CoV-2 ARTIC, hereditary cancer panels, ctDNA hot-spot panels, or any amplicon assay where primer-derived bases would falsely confirm reference at primer footprints.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill alignment-amplicon-clipping --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
