Module 3 Genome Alignment

Lecture

Lab

1. Purpose

We will practice genomic alignment tool, BWA, and post-alignment tool, Picard and SAMtools, with whole genome sequencing data.

2. Dataset

SRX4728544: Whole Genome Sequencing of CRL-2324 breast cancer cell line
Due to huge size of the original data, please use the following small datasets.
* SRR7890824_10M_1.fastq.gz * SRR7890824_10M_2.fastq.gz
Tang et al., Establishing community reference samples, data and call sets for benchmarking cancer mutation detection using whole-genome sequencing, Nat Biotechnol. 2021 Sep;39(9):1151-1160. doi: 10.1038/s41587-021-00993-6. Epub 2021 Sep 9

3. Workflow

1.Download human referecne genome

wget https://hgdownload.gi.ucsc.edu/goldenPath/hg38/bigZips/hg38.fa.gz
  1. Indexing human reference genome. This process may takes 1 hour.
bwa index hg38.fa.gz
  1. Check output
ls

bwa index will generate the following five files.

  1. Perform genomic alignment
bwa mem hg38.fa.gz SRR7890824_10M_1.fastq.gz SRR7890824_10M_2.fastq.gz -t 4 > SRR7890824_10M.sam

If more multithreds are available, increase number of -t option. For example, -t 8.

  1. Add RG (read group information) for subsequent analytic tools and convert SAM format to BAM format.
picard AddOrReplaceReadGroups \
      INPUT=SRR7890824_10M.sam \
      OUTPUT=SRR7890824_10M.rg.bam \
      RGID=group1 \
      RGLB=lib1 \
      RGPL=ILLUMINA \
      RGPU=unit1 \
      RGSM=sample1 \
      VALIDATION_STRINGENCY=LENIENT
  1. Sort BAM file
picard SortSam \
      INPUT=SRR7890824_10M.rg.bam \
      OUTPUT=SRR7890824_10M.sorted.bam \
      SORT_ORDER=coordinate \
      VALIDATION_STRINGENCY=SILENT
  1. Mark duplicate
picard MarkDuplicates \
      INPUT=SRR7890824_10M.sorted.bam \
      OUTPUT=SRR7890824_10M.dedup.bam \
      METRICS_FILE=metrics.txt`
  1. Make BAM index
samtools index SRR7890824_10M.dedup.bam
  1. Finally, you will obtain the following BAM and BAM index files.