Read Mapping and SAM BAM - iffatAGheyas/bioinformatics-tutorial-wiki GitHub Wiki
Read Mapping & SAM/BAM
-
Overview
What is read mapping and why we use SAM/BAM formats -
- Downloading or building a FASTA reference
- Indexing with BWA/Bowtie2/minimap2
-
- BWA-MEM
- Bowtie2
- Minimap2
-
- Mandatory fields (QNAME, FLAG, RNAME, etc.)
- SAM FLAG bits explained
- CIGAR strings (matches, insertions, deletions)
- Optional tags
-
- Converting SAM → BAM (
samtools view
) - Sorting (
samtools sort
) - Indexing (
samtools index
) - Quick statistics (
samtools flagstat
,samtools idxstats
)
- Converting SAM → BAM (
-
samtools depth
bedtools genomecov
-
- Removing PCR duplicates
- Filtering by mapping quality / FLAG
-
- Loading BAM in IGV or Tablet
-
- Map simulated (or real) reads
- Generate & index BAM
- Evaluate mapping rates, coverage and QC metrics