590 likes | 598 Views
Learn about mapping reads to a reference genome, read file formats, genome rearrangements, and sequencing platforms. Understand DNA sequencing, error profiles, reference mapping issues, paired reads, SAM/BAM formats, and alignment quality. Run a mapper and rearrangement caller in bioinformatics analysis.
E N D
Canadian Bioinformatics Workshops www.bioinformatics.ca
Module 3 Mapping and Genome Rearrangement Jared Simpson, Ph.D. Bioinformatics for Cancer Genomics May 30 – June 3, 2016 from: doi:10.1038/nmeth.2258
Learning Objectives of Module • Understand mapping reads to a reference genome • Understand the FASTQ and SAM/BAM file formats • Learn common terminology used to describe alignments • Learn how to find genome rearrangements using read pairs • Run a mapper and rearrangement caller
Sequencing platforms 14TB/run $ 600Gb/10d 100Gb/15d 120Gb/1d 90Gb/10d Increasing Data Per Run 150Mb/3h 2Gb/27h 700Mb/23h $ 100Mb/1h Increasing Run Time
Basecalling • Prediction of the DNA sequence from the images
Error Profiles • Illumina • Low error rate (~0.5%), mainly substitutions • 454/Ion Torrent • Mainly insertions/deletions in homopolymer runs • Pacbio and Oxford Nanopore • Single molecule sequencers • Higher error rate, mixture of insertions, deletions, substitutions
What is a FASTQ file? • Read name
What is a FASTQ file? • Basecalled sequence
What is a FASTQ file? • Quality separator
What is a FASTQ file? • Base quality scores
What is a base quality score? • Phred quality scores: • Estimate of probability the base call is incorrect
Reference Mapping Why do we map reads to the reference? By comparing the reads from a sequenced individual to a reference genome we can identify variants like SNPs, and rearrangements To do this we need to identify where in the reference genome that a readmight have come from
Reference Mapping Issues The genome is very large and repetitive The mapping program must be efficient and tolerant of repetitive sequences Mappers like BWA using an index of the reference genome to rapidly identify possible mapping locations
Reference Mapping Issues The reads contain sequencing errors The mapping program must tolerate differences between the reads and the reference Typically the mapper will find exact-match seeds then refine the seed alignments using dynamic programming Mapping reads with many errors or insertions/deletions is much harder
Reference Mapping Issues Short read sequences produce huge amounts of data The mapping algorithm must be extremely efficient while accounting for the issues discussed above
Choosing a Mapper Needs to be accurate Misaligned reads are a source of false positive variant calls Needs to be sensitive Must allow for differences between the individual and reference Needs to be fast
Reference Mapping Reference genome Sequence read ?
Reference Mapping Reference genome x x x Sequence read
Mapping Quality • Phred-scaled estimate of the probability that the chosen mapping is wrong • 1 in 1000 reads with “Q30” alignment will be placed incorrectly • What causes mapping errors? • High error rate • Repetitive sequence • Differences between the reference and sequenced sample
What are Paired Reads? DNA fragment ATCAAGA CTACATG Insert size (IS) Slides by M. Brudno
Paired Reads Reference genome ? Sequence read pair
Paired Mapping Reference genome x x Sequence read pair
Paired Mapping Reference genome x x x x x x x x Sequence read pair
Sequence Alignment/Map Format • SAM/BAM is a format for working with mapped reads • SAM is tab-delimited text representation • BAM is a compressed binary representation SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77
SAM Format SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77 Flag Read ID • Flag indicates the reference strand, pairing information
SAM Description SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77 Chromosome Position
SAM Description SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77 Mapping Quality
SAM Description SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77 CIGAR Ref ACGATACATAC Ref GACA-AACC Read ACGA-ACATAC Read GTCATAACC CIGAR: 4M1D6M CIGAR: 4M1I4M
SAM Description Mate chromosome, position Insert size SRR013667.1 99 19 8882171 60 76M = 8882214 119 NCCAGCAGCCATAACTGGAATGGGAAATAAACACTATGTTCAAAGCAGAGAAAATAGGAGTGTGCAATAGACTTAT #>A@BABAAAAADDEGCEFDHDEDBCFDBCDBCBDCEACB>AC@CDB@>>CB?>BA:D?9>8AB685C26091:77 ATCAA CTAAG Insert size (IS)
Resources samtools: toolkit for working with SAM/BAM files Convert between SAM/BAM Sort alignments Extract alignments for a given genomic location SAM/BAM specification: http://samtools.sourceforge.net/SAM1.pdf Questions/Help https://lists.sourceforge.net/lists/listinfo/samtools-help http://www.biostars.org/ http://seqanswers.com/
Types of variation Single Nucleotide Variants (SNVs) Insertions/deletions (INDELs) Structural variations Large insertions and deletions Inversions Translocations Copy number variation
Structural variants using paired-end reads Genomic DNA Fragmentation and size selection (200-500bp) Add sequencing adaptors Sequence both ends
Read pair orientation Reference read pair • Expected orientation: • one read on the forward strand, one read on the reverse strand
Fragment size distribution from: doi:10.1038/ng.3121 • Fragment/insert size is determined by library preparation • Pairs that match the expected orientation and distance are called concordant • Discordant read pairs give evidence of structural variation
SV Signatures: Deletion sample reference Slides by M. Brudno
SV Signatures: Deletion sample reference Signature: mapped insert size larger than expected Slides by M. Brudno
SV Signatures: Insertion sample reference Signature: mapped insert size smaller than expected Slides by M. Brudno
SV Signatures: Tandem Duplication sample reference Signature: wrong orientation