411 REFERENCE · Wikibooks
Next Generation Sequencing (NGS)/Alignment
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Next Generation Sequencing (NGS) Alignment Pre-processing DNA Variants
List of sequence alignment software
Given sequencing data (reads) and the reference sequence for the species, comparing the reads to the reference is an easy way to detect small variations in the sequenced sample, such as SNPs and short InDels.
Introduction
Alignment, also called mapping,Sense from sequence reads: Methods for alignment and assembly Nature Methods Flicek, P.; Birney, E. 6 11 Suppl S6–S12 2009 10.1038/nmeth.1376 19844229 of reads is an essential step in re-sequencing. Having sequenced an organism of a species before, and having constructed a reference sequence, re-sequencing more organisms of the same species allows us to see the genetic differences to the reference sequence, and, by extension, to each other. Alignments of data from these re-sequenced organisms is a relatively simple method of detecting variation in samples. There are certain instances (such as new genes in the sequenced sample that are not found in the existing reference sequence) that can not be detected by alignment alone; however, while other approaches, such as de novo assembly, are potentially more powerful, they are also much harder or, for some organisms, impossible to achieve with current sequencing methods.
Next-generation sequencing generally produces short reads or short read pairs, meaning short sequences of <~200 bases (as compared to long reads by Sanger sequencing, which cover ~1000 bases). To compare the DNA of the sequenced sample to its reference sequence, we need to find the corresponding part of that sequence for each read in our sequencing data. This is called aligning or mapping the reads against the reference sequence. Once this is done, we can look for variation (e.g. SNPs) within the sample. This poses a number of problems:
The short reads do not come with position information, that is, we do not know what part of the genome they came from; we need to use the sequence of the read itself to find the corresponding region in the reference sequence.
The reference sequence can be quite long (~3 billion bases for human), making it a daunting task to find a matching region.
Since our reads are short, there may be several, equally likely places in the reference sequence from which they could have been read. This is especially true for repetitive regions.
If we were only looking for perfect matches to the reference, we would never see any variation. Therefore, we need to allow some mismatches and small structural variation (InDels) in our reads.
Any sequencing technology produces errors. Similar to the "real" variation, we need to tolerate a low level of sequencing errors in our reads, and separate them from the "real" variation later.
We need to do that for each of the millions of reads in our sequencing data.
Short reads
Raw short reads often come in (or can be converted into) a file format called FASTQ.The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants Nucleic Acids Research Cock, P.J.; Fields, C.J.; Goto, N.; Heuer, M.L.; Rice, P.M. 38 6 1767-71 2010 10.1093/nar/gkp1137 20015970 PMC2847217 It is a plain text format, containing the sequence and quality scores for every read, where each single read normally occupies four consecutive lines:
@Read_id_1
CTGATGTGCCGCCTCACTTCGGTGGT
+
@@@DDDDDH8<BAHG@BHGIHIII>(
@Read_id_2
TGATGTGCCGCCTCACTACGGTGGTG
+
FHHHHHJIJIJIJIIIJJIIJGIGII
@Read_id_3
...
The four lines are:
The name/ID of the read, preceded by a "@". For read pairs, there will be two entries with that name, either in the same or a second FASTQ file.
The sequence of the read.
A "+" sign. In very old FASTQ files, this is followed by the read name from the first line. Today, this line is present for historical reasons backwards compatibility only.
The quality scores of the bases from line 2. The scores are generated by the sequencing machine, and encoded as ASCII (33+score) characters. The line should have the same length as line 2, as there is one quality score per base.
Alignment
For each of the short reads in the FASTQ file, a corresponding location in the reference sequence (or that no such region exists) needs to be determined. This is achieved by comparing the sequence of the read to that of the reference sequence. A mapping algorithm will try to locate a (hopefully unique) location in the reference sequence that matches the read, while tolerating a certain amount of mismatch to allow subsequence variation detection. Reads aligned (mapped) to a reference sequence will look like this:
GCTGATGTGCCGCCTCACTTCGGTGGTGAGGTG Reference sequence
CTGATGTGCCGCCTCACTTCGGTGGT Short read 1
TGATGTGCCGCCTCACTACGGTGGTG Short read 2
GATGTGCCGCCTCACTTCGGTGGTGA Short read 3
GCTGATGTGCCGCCTCACTACGGTG Short read 4
GCTGATGTGCCGCCTCACTACGGTG Short read 5
You can see the reference sequence on the top row, and five short reads stacked below; this is called a pileup. While two of the reads are a perfect match to the reference, the three other reads show a mismatch each, highlighted in red ("A" in the read, instead of "T" in the reference). Since there are multiple reads showing the mismatch, at the same position, with the same difference, one could conclude that it is an actual genetic difference (point mutation or SNP), rather than a sequencing error or mismapping.
Mapping algorithms
There are several alignment algorithms in existence; you can find an (incomplete) list further down in software packages. Some notes on mapping algorithms:
The reference sequence, the short reads, or both, are often pre-processed into an indexed form for rapid searching. (See BWT)
Sources of errors
There are several potential sources for errors in an alignment, including (but not limited to):
Polymerase Chain Reaction artifacts (PCR artifacts). Many NGS methods involve one or multiple PCR steps. PCR errors will show as mismatches in the alignment, and especially errors in early PCR rounds will show up in multiple reads, falsely suggesting genetic variation in the sample. A related error would be PCR duplicates, where the same read pair occurs multiple times, skewing coverage calculations in the alignment.
Sequencing errors. The sequencing machine can make an erroneous call, either for physical reasons (e.g. oil on an Illumina slide), or due to properties of the sequenced DNA (e.g., homopolymers). As sequencing errors are often random, they can be filtered out as singleton reads during variant calling.
Mapping errors. The mapping algorithm can map a read to the wrong location in the reference. This often happens around repeats or other low-complexity regions.
Alignment types
Alignments can be used for different purposes:
Whole-genome sequencing. This would be the "default" use; sequence all DNA from an organism and map it to the appropriate reference sequence, to find genetic variation.
Exome sequencing. For large genomes (e.g., human), capture just the exomic DNA before sequencing. This will return sequencing data for most of the genes, at a fraction of the cost.
Transcriptome sequencing (RNA-Seq). Sequencing of the transcriptome, that is, of the RNA present in the sample. This can show which genes are transcribed in the sample, and help fine-tune gene annotation (exon boundaries etc.). Mapping can be done either to the full reference sequence, or to a special "transcriptome reference".
ChIP-Seq (Protein-DNA interaction).
The SAM/BAM format
SAMtools
The SAM/BAM format has emerged as the de facto standard format for short read alignments. SAMhttp://samtools.github.io/hts-specs/SAMv1.pdf PDF Sequence Alignment/Map Format Specification The SAM/BAM Format Specification Working Group GitHub 16 18 November 2015 28 April 2016 is the plain-text version of the binary, compressed BAM format. They can be converted into one another by the name-giving samtoolshttp://samtools.github.io/ Samtools organisation and repositories GitHub 28 April 2016 command-line tool. BAM (without alignment position data) is increasingly used as a space-saving alternative to FASTQ files for containing the short raw read data, and all current alignment software can generate SAM/BAM as an output format. Once in BAM format, the file can be indexed, giving quick access to any region of the reference sequence. Subsequently, using samtools or other software, BAM files can be analysed (e.g. for quality control), modified (removal of PCR duplicates, local realignment, base quality recomputation), or used to call variation, either small (SNPs, short InDels) or large (inversions, tandem duplications, deletions, translocations). BAM files can be visualised using tools like Artemis, ACT, or LookSeqLookSeq: A browser-based viewer for deep sequencing data Genome Research Manske, H.M.; Kwiatkowski, D.P. 19 11 2125-2132 2009 10.1101/gr.093443.109 19679872 PMC2775587. Last but not least, alignments in BAM format can be used to "morph" the reference sequence to correspond to the short read data with ICORNhttp://icorn.sourceforge.net/ ICORN: Iterative Correction of Reference Nucleotides SourceForge 28 April 2016; this can be useful to get an actual DNA sequence for a sample, or to construct a new reference sequence based on a closely related species.
Other useful SAM/BAM-related software includes:
Picardhttp://broadinstitute.github.io/picard/ Picard GitHub Broad Institute 28 April 2016
Bio-SamToolshttp://search.cpan.org/~lds/Bio-SamTools/ Bio-SamTools Stein, L.D. CPAN Perl.org 12 February 2016 28 April 2016
SAM/BAM tools examples
Convert SAM to BAM format:
samtools view -bS aln.sam > aln.bam
Sort BAM file according to position on reference sequence
samtools sort aln.bam aln_sorted.bam
Index BAM file (needed for visualising the alignment)
samtools index aln_sorted.bam aln_sorted.bai
Extract the header information from a BAM file
samtools view –h aln_sorted.bam > aln.sam
Generate a FASTQ file from a BAM file
bam2fastq -o aligned.fastq --no-unaligned aln.bam
Software packages
SoftwareTypeSupportedtechnologiesInterfaceNotesPartekCommercialAllGUIFree trial
Easy to use, no command line
Vast choice of publicly available aligners recommended by Illumina & Life Technologies, Ion Torrent
Guidance on alignment choiceBWAFast and accurate short read alignment with Burrows–Wheeler transform Bioinformatics Li, H.; Durbin, R. 25 14 1754-1760 2009 10.1093/bioinformatics/btp324 19451168 PMC2705234Free softwareIlluminaSOLiD454Command lineThe SAM/BAM output adhere to SAM format, contains mapped and unmapped data, easy to parse
Not fully threaded. sampe and samse can only utilize 1 CPU. bwasw (454 longer reads) can be fully threaded, though
Not as sensitive as Stampy and Novoalign
May be outperformed by BWA-MEM for 70-100bp Illumina reads.BowtieUltrafast and memory-efficient alignment of short DNA sequences to the human genome Genome Biology Langmead, B.; Trapnell, C.; Pop, M.; Salzberg, S.L. 10 3 R25 2009 10.1186/gb-2009-10-3-r25 19261174 PMC2690996Free softwareIlluminaSOLiDCommand lineDiscussed in the SeqAnswers forum
Fast
No mapping quality reported
Not as sensitive as Stampy and NovoalignStampyStampy: A statistical algorithm for sensitive and fast mapping of Illumina sequence reads Genome Research Lunter, G.; Goodson, M. 21 6 936-939 2011 10.1101/gr.111120.110 20980556 PMC3106326Free softwareIlluminaCommand line Balance of speed and sensitivity
Can be slow even using BWA as premapperSHRiMP2Free softwareIlluminaCommand lineHigher sensitivity than BWA
One step mapping, Indexing of genome is not needed
Alignment can take less time than BWA is the reference sequence is short, e.g. mapping of reads against a targeted region
Alignment speed is slow IF mapping is done onto a large genomeTMAPFree softwareIonTorrentCommand line Uses a selection of algorithms to balance speed and sensitivitySNP-o-maticSNP-o-matic Bioinformatics Manske, H.M.; Kwiatkowski, D.P. 25 18 2434-2435 2009 10.1093/bioinformatics/btp403 19574284 PMC2735664Free softwareIlluminaCommand lineVery fast, especially on genomes <100mbp
No/limited de novo variation discovery
Also works as a genotyperCLC workstationCommercialAllGUIEasy to use
Expensive
Alignment is spurious based on our dataset
Alignment speed is NOT impressive at all compared to BWA or Bowtie (i7 860 + 16GB memory, windows 2008 R2-64bit)NextGenMaphttp://cibiv.github.io/NextGenMap/ NextGenMap GitHub Cibiv 28 April 2016Open sourceIllumina, Ion TorrentCommand LineFast and accurate. Self adjusting to the underlying data. Robust for high polymorphism
Easy to use
Fast and accurate
Robust to SNPs
Self adapts to the data set.NovoalignCommercial for multi-threaded version. Single threaded version is freeIlluminaCommand LineFast and accurate. Probably the best aligner as of 2013.GSMapperCommercial 454GUI/SSAHA2Free software454Command lineFast and accurate for all reads it can mapBLATFree software454Command lineNot designed for NGS data.MosaikFree softwareAllCommand lineTedious steps. Alignment speed can be slow. Huge memory requirement.BWA-SWFast and accurate long-read alignment with Burrows–Wheeler transform Bioinformatics Li, H.; Durbin, R. 26 5 589-595 2010 10.1093/bioinformatics/btp698 20080505 PMC2828108Free software454, IonTorrentCommand lineFor long sequences ranged from 70bp to 1Mbp.
Authors recommend to use BWA-MEM (which is the latest) instead of BWA-SW.BWA-MEMAligning sequence reads, clone sequences and assembly contigs with BWA-MEM Preprint Li, H. 1–3 2013 http://arxiv.org/abs/1303.3997Free software454, IonTorrentCommand lineFor long sequences ranged from 70bp to 1Mbp.
Newer version of BWA-SW, so recommended to use instead of BWA-SW.
May outperform BWA for 70-100bp Illumina reads.
May outperform Novoalign for variants call http://bcbio.wordpress.com/2013/05/06/framework-for-evaluating-variant-detection-methods-comparison-of-aligners-and-callers/ Framework for evaluating variant detection methods: Comparison of aligners and callers Chapman, B. Blue Collar Bioinformatics 6 May 2013 28 April 2016Bfasthttps://sourceforge.net/projects/bfast/ Blat-like Fast Accurate Search Tool SourceForge Homer, N. 28 April 2016Free softwareSOLiDCommand LineSpeed of alignment may be too slow for large NGS data http://massgenomics.org/short-read-aligners Aligners Koboldt, D. MassGenomics 3 July 2011 28 April 2016Tophathttp://ccb.jhu.edu/software/tophat/index.shtml TopHat Johns Hopkins University Center for Computational Biology Kim, D.; Salzberg, S. 23 Februart 2016 28 April 2016Free softwareIlluminaCommand LineTranscriptome data onlySplicemapFree softwareIlluminaCommand LineTranscriptome data onlyMapSpliceFree softwareIlluminaCommand LineTranscriptome data onlyAbMapperFree softwareIlluminaCommand LineTranscriptome data onlyERNE-map (rNA)rNA: a fast and accurate short reads numerical aligner Bioinformatics Vezzi, F.; Del Fabbro, C.; Tomescu, A.I.; Policriti, A. 28 1 123-124 2011 10.1093/bioinformatics/btr617 22084252Free softwareIlluminaCommand lineSensitive and efficient
Can be paired with an independent trimming module (ERNE-filter) and a bisulfite-treated-specific read aligner program (ERNE-bs5)http://erne.sourceforge.net/ Welcome to ERNE 2! SourceForge 29 September 2014 28 April 2016
Slow when dealing with gapped alignmentsmrsFAST-UltramrsFAST-Ultra: A compact, SNP-aware mapper for high performance sequencing applications Nucleic Acids Research Hach, F.; Sarrafi, I.; Hormozdiari, F.; Alkan, C.; Eichler, E.E.; Sahinalp, S.C. 42 W1 W494-W500 2014 10.1093/nar/gku370 24810850 PMC4086126Free softwareIlluminaCommand line / GUIFull sensitivity
Fast and efficient
Multi-threaded
An exhaustive list of NGS aligner is maintained at HTS mapper
Based on personal experience and prevalence and based on literature data on the performanceEvaluation of next-generation sequencing software in mapping and assembly Journal of Human Genetics Bao, S.; Jiang, R.; Kwan, W.; Wang, B.; Ma, X.; Song, Y.Q. 56 6 406-14 2011 10.1038/jhg.2011.43 21525877http://lh3lh3.users.sourceforge.net/NGSalign.shtml NGS Alignment Programs Li, H. SourceForge 19 November 2009 28 April 2016http://lh3lh3.users.sourceforge.net/alnROC.shtml NGS mapper ROC curves Li, H. SourceForge 19 November 2009 28 April 2016, a quick primer on when to use which software:
If only speed matters use bowtie.
BWA is a bit slower but more sensitive.
If sensitivity and specificity is needed, try NextGenMap, Stampy, Novoalign, or SHRiMP 2.
Furthermore a framework (Teaser) was proposed that automatically benchmarks several mappers within minutes.http://teaser.cibiv.univie.ac.at/ Teaser: A tool for fast personalized benchmarks and optimization of NGS read mapping CIBIV University of Vienna 9 January 2016 28 April 2016
References
32em