samtools-bam-processing

Solid

CLI toolkit for SAM/BAM/CRAM: sort, index, convert, filter, QC alignments. Core commands: view, sort, index, flagstat, stats, depth, markdup, merge. Required between alignment and variant/peak calling. Use pysam for Python-native BAM access; deeptools for normalized coverage tracks.

AI & Automation 286 stars 26 forks Updated 4 days ago NOASSERTION

Install

View on GitHub

Quality Score: 82/100

Stars 20%
82
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# samtools — SAM/BAM/CRAM Alignment Toolkit ## Overview samtools is the standard command-line toolkit for processing sequence alignment files in SAM, BAM, and CRAM formats. It handles the complete alignment file lifecycle: format conversion, coordinate sorting, index creation, quality control statistics, read filtering, duplicate marking, and multi-file merging. samtools is a near-universal component of NGS pipelines between alignment (STAR, BWA) and downstream analysis (variant calling, peak calling, coverage). ## When to Use - Sorting BAM files by coordinate after alignment (required before indexing) - Indexing sorted BAM files for random access and region queries - Converting between SAM, BAM, and CRAM formats to save storage - Generating alignment QC metrics: mapping rates, insert sizes, per-chromosome stats - Filtering reads by mapping quality, FLAG bits, or genomic regions - Marking or removing PCR duplicates before variant calling - Merging multiple BAM files from different lanes or samples - Calculating per-base depth or coverage breadth for target regions - Use `pysam` instead for Python-native BAM manipulation in custom scripts - Use `deeptools bamCoverage` instead when you need normalized bigWig coverage tracks - Use `mosdepth` instead for whole-genome per-base depth (faster, parallelized) ## Prerequisites - **Installation**: samtools 1.17+ recommended - **Input requirements**: SAM/BAM/CRAM files; CRAM requires FASTA reference - **Companion tools**: `samtools...

Details

Author
jaechang-hits
Repository
jaechang-hits/SciAgent-Skills
Created
5 months ago
Last Updated
4 days ago
Language
Python
License
NOASSERTION

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category