Samtools: Extract Reads

Extract reads from a specific genomic region.

Accepted: .sam, .bam, .cram

Extract Reads

Function:

Extract Reads is used to retrieve sequencing reads mapped to a specific genomic region from SAM, BAM, or CRAM alignment files. This tool enables researchers to focus on particular chromosomes, genes, loci, or regions of interest without processing the entire alignment dataset.

Input Format:

  • SAM File (.sam)
  • BAM File (.bam)
  • CRAM File (.cram)

Users must specify:

  • Chromosome Name (e.g., chr1, chr2, chrX)
  • Start Position
  • End Position

Output Format:

  • Alignment records corresponding to the selected region.
  • Output may be in SAM, BAM, or text format depending on the workflow configuration.

Example Usage:

# Extract reads from chromosome 1
samtools view sample.bam chr1

# Extract reads from a genomic region
samtools view sample.bam chr1:100000-200000

# Save extracted reads
samtools view -b sample.bam chr1:100000-200000 > extracted.bam

Applications:

  • Investigate specific genomic regions.
  • Analyze candidate genes and mutations.
  • Visualize local alignments in genome browsers.
  • Prepare region-specific datasets for downstream analysis.
  • Validate variant calling results.
  • Perform targeted sequencing analyses.

Output Example:

Read001  99  chr1  105432  60  100M
Read002 147  chr1  105560  60  100M
Read003  99  chr1  105721  60  100M

Each record represents a sequencing read aligned within the selected genomic interval.

Advantages:

  • Faster analysis of specific genomic regions.
  • Reduces processing time and memory usage.
  • Facilitates focused investigation of variants and genes.
  • Useful for targeted sequencing workflows.
  • Supports SAM, BAM, and CRAM formats.

Suggested Reading:

Official Samtools Documentation: Samtools View Manual

Citation:

Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., et al. (2009). The Sequence Alignment/Map (SAM) format and SAMtools. Bioinformatics, 25(16), 2078–2079. DOI: 10.1093/bioinformatics/btp352