+ - 0:00:00
Notes for current slide

Presenter notes contain extra information which might be useful if you intend to use these slides for teaching.

Press P again to switch presenter notes off

Press C to create a new window where the same presentation will be displayed. This window is linked to the main window. Changing slides on one will cause the slide to change on the other.

Useful when presenting.

Notes for next slide



Deeper look into Genome Assembly algorithms



last_modification Updated:   purlPURL: gxy.io/GTN:S00029

text-document Plain-text slides |

Tip: press P to view the presenter notes | arrow-keys Use arrow keys to move between slides
1 / 48

Presenter notes contain extra information which might be useful if you intend to use these slides for teaching.

Press P again to switch presenter notes off

Press C to create a new window where the same presentation will be displayed. This window is linked to the main window. Changing slides on one will cause the slide to change on the other.

Useful when presenting.

Requirements

Before diving into this slide deck, we recommend you to have a look at:

2 / 48

question Questions

  • What are the main types of assembly algorithms?

  • How do they perform with short and long reads?

  • How to improve assemblies using other technologies?

3 / 48

Different types of input data

  • Short reads (Illumina): numerous 👍, high quality 👍, cheap 👍, short 👎
  • Long reads (PacBio, Nanopore): longer 👍, fewer 👎, (many) more errors 👎

Genome Assembly can be done with:

  • only short reads
  • only long reads
  • both (hybrid assembly)

Specific algorithms for each

4 / 48

Genome Assembly algorithms

Detect overlaps between reads to build the longest possible sequences

Algorithms use graphs to represent overlapping reads/words

Two steps:

  • Build a (huge) graph while reading the input data
  • Try to find the longest paths traversing the graph

Two main types of algorithms:

  • Short reads: de Bruijn Graphs
  • Long reads: OLC (Overlap Layout Consensus)
5 / 48

OLC (Overlap Layout Consensus)

The older, first used for Sanger sequencing

Compare all reads, look for read overlaps

If a suffix of one read is similar to a prefix of another read...

TCTATATCTCGGCTCTAGG <- read 1
||||||| |||||||
TATCTCGACTCTAGGCC <- read 2

...then they may overlap within the genome.

6 / 48

Directed graphs

We build a directed graph where directed edges connect nodes representing overlapping reads: Image showing example reads represented as nodes, and an overlap between two reads as an edge

Directed graph representing overlapping reads. (Image from Ben Langmead).

7 / 48

Directed graphs

For example, consider these 15 three letter reads:

TAA AAT ATG TGC GCC CCA CAT ATG TGG GGG GGA GAT ATG TGT GTT

We're lucky, we know the corresponding genome sequence is TAATGCCATGGGATGTT

So the 15 reads can be represented as the following directed graph:

A graph representing the 15 overlapping example reads

8 / 48

However, in real life we do not know the actual genome! All we have is a collection of reads. Let's first build an overlap graph by connecting two 3-mers if suffix of one is equal to the prefix of the other:

All possible overlap connections for our 3-mer collection

Overlap graph. All possible overlap connections for our 3-mer collection. (Fig. 4.7 from CP)

So to determine the sequence of the underlying genome we are looking for a path in this graph that visits every node (3-mer) once. Such path is called Hamiltonian path and it may not be unique.

9 / 48

For example for our 3-mer collection there are two possible Hamiltonian paths:

First possible Hamiltonian path Second possible Hamiltonian path

Two Hamiltonian paths for the 15 3-mers. Edges spelling "genomes" TAATGCCATGGGATGTT and TAATGGGATGCCATGTT are highlighted in black. (Fig. 4.9. from CP).

10 / 48

The reason for this "duality" is the fact that we have a repeat: 3-mer ATG is present three times in our data (green, red, and blue). Repeats cause a lot of trouble in genome assembly.

11 / 48

Limits of OLC

  • Computationally intensive
  • Doesn't perform well with Illumina (massive amount of short reads)

=> deBruijn Graphs

12 / 48

de Bruijn Graphs

Based on a counter-intuitive idea

  • Hash all reads in overlapping fixed-length words
  • Words = k-mers of size k
  • Build a directed graph where nodes are k-mers and edges represent overlaps between k-mers
13 / 48

What are K-mers?

K-mers are subwords of length k of a string

14 / 48

K-mers de Bruijn graph

Example with 4 english words

15 / 48

K-mers de Bruijn graph

Example with 4 english words

16 / 48

K-mers de Bruijn graph

Example with 4 english words

17 / 48

K-mers de Bruijn graph

Example with 4 english words

18 / 48

The problem of repeats

Example with a word containing repeats: Mississippi

19 / 48

The problem of repeats

Example with a word containing repeats: Mississippi

20 / 48

The problem of repeats

Example with a word containing repeats: Mississippi

21 / 48

The problem of repeats

Example with a word containing repeats: Mississippi

22 / 48

Different k

Effect of the size of k

23 / 48

Different k

Effect of the size of k

24 / 48

Different k

Effect of the size of k

25 / 48

Different k

Effect of the size of k

26 / 48

Choose k wisely

  • Lower k

    • More connections
    • Less chance of resolving small repeats
    • Higher k-mer coverage
  • Higher k

    • Less connections
    • More chance of resolving small repeats
    • Lower k-mer coverage

Optimum value for k will balance these effects.

27 / 48

Read errors

Example of english words with errors Example of english words with errors

28 / 48

Read errors

Example of english words with errors Example of english words with errors

29 / 48

Read errors

Example of english words with errors Example of english words with errors

30 / 48

Read errors

Example of english words with errors Example of english words with errors

31 / 48

Coverage (or sequencing depth)

The number of unique reads that contain a given nucleotide in the reconstructed sequence.

Aligned reads showing the notion of coverage

Source: Wikimedia

Estimated coverage

(number of reads x read length) / estimated size of the genome

1,000,000 reads x 150bp / 10Mb = 15X

32 / 48

More coverage

  • Errors won't be duplicated in every read
  • Most reads will be error free
  • We can count the frequency of each k-mer
  • Annotate the graph with the frequencies
  • Use the frequency data to clean the de Bruijn graph

More coverage depth will help overcome errors!

33 / 48

Read errors revisited

Graph annotated with coverage

34 / 48

de Bruijn graph assembly process

  1. Select a value for k
  2. "Hash" the reads (make the kmers)
  3. Count the kmers
  4. Make the de Bruijn graph
  5. Perform graph simplification steps
  6. Read off contigs from simplified graph
35 / 48

Make contigs

  • Find an unbalanced node in the graph
  • Follow the chain of nodes and "read off" the bases to produce the contigs
  • Where there is an ambiguous divergence/convergence, stop the current contig and start a new one.
  • Re-trace the reads through the contigs to help with repeat resolution
36 / 48

Assembly in real life

In this topic we've learned about two ways of representing the relationship between reads derived from a genome we are trying to assemble:

  1. Overlap graphs - nodes are reads, edges are overlaps between reads.
  2. De Bruijn graphs - nodes are overlaps, edges are reads.
37 / 48

Overlap graph

An example overlap graph

38 / 48

de Bruijn Graph - same data

An example de Bruijn graph

39 / 48

Whatever the representation will be it will be messy:

An example of a real-life, noisy graph

A fragment of a very large De Bruijn graph (Image from BL).

40 / 48

There are multiple reasons for such messiness:

Sequence errors

Sequencing machines do not give perfect data. This results in spurious deviations on the graph. Some sequencing technologies such as Oxford Nanopore have very high error rate of ~15%.

Zoom on graph region containing sequencing errors

Graph components resulting from sequencing errors (Image from BL).

41 / 48

Ploidy

As we discussed earlier humans are diploid and there are multiple differences between maternal and paternal genomes. This creates "bubbles" on assembly graphs:

Impact of diploid genome sequencing on graphs

Bubbles due to a heterozygous site (Image from BL).

42 / 48

Repeats

As we've seen the third law of assembly is unbeatable. As a result some regions of the genome simply cannot be resolved and are reported in segments called contigs:

Impact of repeats on graphs

The following "genomic" segment will be reported in three pieces corresponding to regions flanking the repeat and repeat itself (Image from BL).

43 / 48

What to do with my reads?

  • Short reads => DBG assemblers (e.g. Spades, ABySS, DISCOVAR, Velvet, ...)
  • Long reads => OLC assemblers (e.g Canu, Falcon, Hgap4, ...)
  • Short + Long reads => hybrid assemblers (e.g. Unicycler, ...)

Hybrid assembly: long reads to resolve repeats, short reads to correct errors

Other data and tools for polishing (scaffolding, gap filling, ...)

44 / 48

Other data: Optical maps

Optical mapping workflow (Source: Wikimedia)

Use for scaffolding by comparing the restriction map with the predicted restriction sites in the contig sequences

45 / 48

Other data: Hi-C

Hi-C sequencing workflow (Source: Dovetail genomics)

Sequence chunks of genome colocalized

46 / 48

Other data: Linked-Reads

Linked-Reads workflow (Source: 10X)

Reads grouped by physical regions on the genome thanks to barcodes

10X Genomics (discontinued in 2020)

47 / 48

Thank You!

This material is the result of a collaborative work. Thanks to the Galaxy Training Network and all the contributors!

Galaxy Training Network

Tutorial Content is licensed under Creative Commons Attribution 4.0 International License.

48 / 48

Requirements

Before diving into this slide deck, we recommend you to have a look at:

2 / 48
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow