[Music] I'm Jared Simpson I'm a principal investigator at the Ontario Institute for cancer research in Toronto uh my research group develops um algorithms for for processing DNA sequencing data of the type that that you've all heard about today um with a particular focus on uh denovo genome assembly um so this part of the course is going to be a little different than than the previous sessions today in that this is only going to be a lecture there's there's no Associated um practical session um but if you have any questions about choice of assemblers or or
how to run genome assemblers feel free to ask either during the next hour um after the course or or or email me my my email address is on the last slide here um now in this talk I I'm going to go through really genome assembly from both a technical level in what's happening under the hood in genome assemblers how they're taking a set of sequencing reads directly off um off a DNA sequencer and and putting together that genome um that'll be the first part of the talk and and the reason I go into the details
of of how the algorithms work for genome assembly is that it's still quite a diffult process to assemble a genome and often when you'll take your own data try to assemble it you get results that aren't as good as you'd expect um and really key to troubleshooting assemblies and understanding how it's gone wrong is this understanding of of what's going on under the hood um so the first part I I'll talk about that exactly that what's going on inside the genome assembler I'll then walk through an example assembly pipeline of starting from the raw reads
going all the way to sets of conts and scaffolds um and then finally I'll go through some examples of these problems that can come up what are different features of a genome what are characteristics of of the data that might give you problems uh when running a genome assembly and hopefully this will allow you to have a better understanding when you go off and run assembly on your own um so just to put us all on the same page what is genome assembly what do we mean when we talk about genome assembly well it means
just taking a genome and here I'm just representing a genome as a set of colored bars um where the genome's a mixture of unique sequences which is this green blue um light blue and and purple bar here and repetitive elements the repetitive elements are these blocks of seum that have been duplicated um within that genome and these repeats are what cause trouble for the genome assembler there are sequences that look identical and if your read link isn't long enough you can't resolve where to place one repeat uh versus another so I'm just going to depict
a genome like this and I'll come back to this question of of how it repeats affect uh assemblers throughout the talk um right so we sequence a genome and and from the standpoint of the genome assembler um the sequencing reads are just an unordered sample of fragments of the genome so you've just randomly select in positions from The genome put them into a bag and then uh the genome assembler has to vers this process and put the genome back together hopefully end to end um into whatever that original Source sequence was that you sampled all
these reads from right so first I'll talk about assembly graphs which are the data structures we use um to work with sequencing reads then I'll talk about this example example assembly pipeline then some of the features that make uh genome assembly difficult and finally I'll end with um talking about genome assembly with long reads like you get from pack bio sequencers or like what you get from an oord nanopore sequencer and how that makes the problem a little bit easier um due to the read length right so key to understanding how genome assemblers work are
is understanding this concept of an assembly graph um now an assembly graph is used to represent the relationships between uh the reads that you've sequenced um so if two reads overlap we might want to record the information that this pair of reads overlap um and the genome assembler will use this to try to figure out what the correct sequence of the genome is so I'll be coming back to this picture uh a little bit later on um but when we're working with these genome assembly graphs uh usually a sequence read is a vertex in the
graph and if two sequence reads overlap uh they make an edge in this graph now there's two types of graph that are used by uh genome assembly software there's What's called the de BR graph which breaks all the reads into short fragments called cers um if you sequence a 100 base pair read the assembler might break that read up into 61 base pair substrings construct a graph of those substrings I'll give an example of just of this in just a few minutes and when we're building Assemblies of illuminant data uh most of the algorithms are
based on this de brown graph model uh the reason being that it's extremely fast fast and efficient to work with these short fixed length substrings rather than um complete reads and inexact overlaps between reads um so the first type of graph is this the brown graph which is based on cers and then the other type of graph is called a string graph where we keep the reads intact every read is a vertex in the graph and if two reads overlap we connect them with an edge um so I'll give an example of this uh overlap
based graph now so here we have a single read which we'll call read one it's about 40 bases in length we're going to add a Vertex into the graph for that read if we sequence another read called a read two We'll add another vertex into this graph and since the start of read two is the same sequence as the end of read one we connect them with an edge here so this we're just going to progressively build up this assembly graph so now we've got two vertices connected by an edge if we SE as a
third read then um it the end of H so the beginning of read three matches the end of read two and it also matches the end of read one so we add this vertex into the graph and we connect it to Ed with edges to the two previous two vertices then if we sequence a fourth read here we're going to add another vert text to the graph and connect it with edges to all the reads that it overlaps so just this the the beginning of some reads matches the end of another read That's what we
were talking about when we refer to overlaps between reads just that a suffix of a read matches a prefix of another read now we've labeled all of the edges in this graph with the overhanging string between the reads so when we connected this uh Edge between read two and read one the overhanging part of read two is this string TC so we've labeled The Edge as the string Tac now what the genome assembly software is trying to do is it's going to try to find a path through this graph which is just a sequence of
vertices that are visited and concatenate all of these Edge labels together just joining them together into a string that spells the original sequence of the genome so all the assembler is trying to do is build up this graph which we call a string graph and then find a path through it and then the the the string that that path spells is the sequence of the genome so that's really the the high level technical part of how how gome assemblers are running now I'm going to use um an example assembly pipeline to illustrate these Concepts further
so this is what an assembly pipeline might look like your the assembly software that you download from GitHub or somewhere on the internet um it will Implement these steps um and and take the data from your raw fast Q format all the way through to a fasta file with conts and scaffold um so the first thing we might do is um some clean up of the data to get rid of sequencing errors sequencing artifacts by either trimming the reads or filtering them out we'll then try to correct uh sequencing errors in the read we'll build
one of these assembly assembly graphs clean up the graphs of additional artifacts um build conts from the graph scaffold them together and finally try to SK fill in the gaps uh in the scaffold and I'll go through all of these stages uh individually so the first one and actually one of the more important stages is just cleaning up your data before you give it to the assembler um often times when you get an aluminous sequencing run if you if there was some processing artifact like you've concatenated uh adapters onto the end of the sequence and
the sequen are read into the adapter sequences if you don't get rid of those adapters they can look like very high copy repeats to the assembler and what'll happen is that the assembler will just stop at the position of of wherever it finds these adapters so this is an example run so you guys all saw igb uh in in the last module this is an example of a sequencing run that had a lot of adapter contamination and all of these colored bars here these are soft CLI reads all of these colored bars are an adapter
sequence it was on the end of one of the reads now I tried to assemble this data and the assembly completely failed because of the fact that 40 to 50% of the reads had these sequencing adapters on them if you then run uh an adapter trimmer I've listed some of them on this slide here Kraken tromatic and Scythe um they will get rid of those adapters on the three prime end of the uh of the reads present just genomic reads to the genome assembler and and everything will work a lot better um so this is
an incredibly important step if you do have adapter contamination another way that you might want to trim your reads is just if you have lowquality bases at the end so you might have seen an aluminate erir profile and I'll show it a little later where the air rate increases at the 3 Prime end of the read um if that air rate error rate increases quite drastically you you often want to trim the read back just in uh to get rid of those bad bases that makes it a little easier on the assembler um right here's
actually a slide with with the air rate for six different sequencing runs um so this is this was part of an assembly competition that I'll talk about a little bit later we sequence a yeast uh fish which was Lake Mala cichlid boa constrictor human genome parakeet and an oyster and this is the air rate as a function of the position in the read for these six different data sets as you can see for this uh this parakeet bird data set they sequence 150 base pair reads and the air rate increased to about 3% of three
prime Ang of this is a little bit higher than we're usually comfortable with so you'd probably want to trim that back um about to about a 100 bases just to get rid of those extra airs um as an alternative to air air trimming is we can perform error correction um and this is where instead of just getting rid of all of that sequence that might be bad we'll try to fix it to be what the true genomic sequence was at that position um and how we do that is we use what's called CER based error
correction and to illustrate this um here's a single read where this position was miscalled there was a sequencing error here where the sequencer said there was a c and and how we're going to do this is we're going to exploit the redundancy and sequence it usually when you sequence a genome you'll sequence it to 30 to 40x which means each base in the genome is covered 30 to 40 times um per read so if we have um if we take a substring of one of these reads and count how many times it was seen in
other reads um the substrings that are true genomic sequence will be seen A Lot the things that are caused by sequencing errors like this substring that contains a c will be seen very few times so what we want to do is we want to compare the number of times we see the genomic substrings see the number of times we see the the substring of Errors to identify where the sequencing errors occur so an error correction algorithm will do exactly that you will take um every substring starting from the first and going to the last and
it'll count how many times that's see we'll get a coverage profile that looks like this for the true genomic sequence where it balances between 20 to 30 and then when we hit a sequencing error we see that the coverage drops to one that's the the algorithm will then say okay I think there's a sequencing error it will then try to correct that error by just trying different substitutions of that position and if it finds one that corrects the count profile up to this range of about 20 to 30 times it would then make that that
fix and say it's corrected that c to a t or whatever the true base was so this this idea of CER based air correction uh has been quite popular and there's a lot of software that implements this idea um some genome assembly packages that you can download will have algorithms built in to do the air correction others you can download an external package that only does error correction uh some of the most popular ones are listed here like Quake um SGA a software package I wrote uh soaped inovo BFC BL blast lighter musket are all
camera Base air correction uh programs an alternative way of doing air correction is finding overlaps between reads like I showed before so you find where the end of one read matches the the beginning of another if you find a lot of overlapping reads you can then calculate a consensus sequence for the reads um this works very well and it can handle and it can handle different types of errors in CER based correction but it's typically too slow to run on very large genomes so if you sequence a human genome you might have a billion reads
um finding overlapping pairs uh out of a set of a billion reads takes a lot of compute time so typically we use this this faster CER based air correction uh for very large genomes right so once we've cleaned up the data a little bit um we want to build the assembly graph so one of the popular ways of doing this is building into a brown graph which I mentioned before and again this is built on the idea of fix length strings which we call cers so here's an example of what a ground graph looks like
um for a camer size of four from these five different sequency reads which are length six so what we're going to do is we would take every four Bas a substring of these reads and we put it as a vertex in gra so the first four bases of this read CC GT is a vertex here then the second one cgtt is a vertex here so we put all of the formers that are present in any one of these reads into the graph and then we connect them by an edge if they're adjacent in a read
so we've connected ccgt with cgtt because they come next to each other in this read when we build up the graph from all the reads it looks like this and we see that this substring cgtt is present twice in the reads once followed by gtta one followed by gttc this causes a branch in the graph and it's the assembler job to try to figure out what the sequence of the genome is when accounting for this Branch so here there's actually a unique solution it can go from here to here follow this Branch around go down
back up to here and then follow there and that's a super string that spells every one of these reads in this this little example now a quick detour into type of research that that my group does um so for a long time I focused on trying to make genome assemblers very fast and memory efficient um when we first got aluminous sequencing um in say around 2008 2009 you could only sequence about 36 base pair reads um when you try to sequence a human genome with that you'd use a CER size of about 27 and if
you tried to store one of these de brown graphs I just showed you with 27 mge for a human genome um it would take maybe a terabyte of memory now typically people didn't have a terabyte of memory to use on genome assemblers you might um have to go to a superc Computing Center where they'd have very large memory machines uh to do your assembly but since this since we've started working with alumin data um we've developed new algorithms and new compressed representations of these graph-based data structures um and have gotten that to down to about
10 gabyt of memory to do human genom assembly now um so this is after about seven eight years of of Fairly different Al difficult algorithmic work um that we've get gone to a point where we can do fairly routine genome assemblies um from for humans off of alumin data um if anybody's interested in in the computer science of how this works and how we're able to do these uh assemblies so efficiently um I'm happy to answer any questions about that okay um now after we've constructed a graph we're not quite ready to build contigs yet
um and what we want to do is a step called graph cleaning and this is an additional data cleanup step where we try to get rid of different types of artifacts that appear in the assembly graph so the first type of artifact is what we call tips um and these artifacts are caused by uncorrected sequencing errors now when I showed the brown graph before we had a Vertex for every CER again we're working with the same type of graph but I'm just representing the cers as these uh gray ver circles here and when you get
a sequencing error you still put the CER for that position into the graph but since errors tend to be rare and only occur say once or twice what happens is that causes this Spur off the graph where it has a couple connected nodes that then ends up going no and we've got an error here that causes this spur or what we call tip and this eror here causes this we call Tip as well um so if your assembler is coming or along and it's trying to assemble the genome it might get confused by these two
alternative paths that go nowhere so what the assembler wants to do is get rid of these erroneous branches um that are just caused by sequencing errors so that's one of the type of of graph artifacts the other is something that we call Bubbles which are caused by heterozygosity um so if you sequence a Diplo genome you're you're going to sample cers from either of the alals C covering heterozygous sites so here we have a CG heterozygote and what happens is when you sample cers from those two alals it causes I I Divergence in the graph
where you can either follow a path for AO one at the top or a two at the bottom and this is a very distinctive structure um where it's this Divergence and then coming back together the assembler can actually efficiently identify these positions and and say okay I think there's a hetera snip here do you have a question why is the fob showing four there's only one yeah uh it's a good question so you'll let's say we we're working with fairly short CER so this camer TC Gat is shared by both two ilal so that would
be here then if you slide it one base over there's a CER CG atg and CG ATC so that's the first point of Divergence and that's this pair of nodes if you slide it over again we have GT uh g g g that's these two and then it's just you keep sliding over so you have multiple um nodes for that that point than you're first it'll be EXA of your it's exactly camera yeah no you don't um you do get them you don't expect them to naturally occur but if you have a sequencing eror that
that's um recurrent it happens four or five times that might give you enough coverage such that you don't get this tip structure but rather it it rejoins and you can have it like an artificial bubble because of that um also if you have diverged copies of repeats um you'll get bubbles as well just because of paralogous sequence variant okay so after the after the uh assembler built a graph it might look like this um and and figuring out what the genome sequence is from this graph um is probably fairly difficult so the assembler is going
to try to identify these tips and Bubbles to make the graph simpler so it'll start by finding all of the branches that are only connected on um one end it will then walk those back to see where they rejoin the graph and get rid of them that simplifies the graph quite a bit it will then try to find these divergences where the bubbles occur it will walk to see when they rejoin uh the graph and then collapse them down to just a single Al that will be represented uh in the final assembly it will then
um try to build contigs which typically is just trying to find the largest unbranching segments of the graph so it'll compact all those nodes here then it sees there's a branch here that can't be resolved it will compact all those nodes here here and so on until it's just merged everything can be merged together without introducing any misassemblies now how long are these contigs um typically for an alumina uh sequencing run of a bacterial genome the contigs will be around 100,000 bases in length if you sequence a large eukariotic genome like say a human genome
they might be uh 10 to 20,000 bases in length if you do pack bio sequencing long read sequencing um you can get contig sizes in the mega bases um and that's something I'll return to a little later on now finally once we've got our contigs um if we've sequenced paired ends we're not done yet and we can build what are called scaffolds and scaffolds are just a higher order structure where you try to link conts together by paired ends that map between them um and you you separate the conts with a gap which is just
unknown sequence that you don't um that you can't figure out in between the conts and we call that higher order structure of linked contigs with gaps uh scaffolds so the way we build scaffolds is that we map param reads to the contigs and then we identify where a group of pairs Maps the end of one cont and their mates maps to the end of different cont so I've color code from here so these blue pairs map here and then blink here then we have red here and here this is hard to see but it's purple
here and here then green here and here so we would just link up those conts by paired ends and we build what we call a scaffold graph which is really similar to these read graphs I've been talking about before um and and we construct the scaffold from those we can use the uh paired and insert size distribution that we learned um that we learned about in the previous modules to estimate how far apart these conts are in the scaffolds um and then you just fill in the sequence with NS representing the uncertainty uh of that
sequence between the conts um there's uh a set of programs which are called Gap fillers which will take those scaffolds and then try to do local assembly which is um not as strict to try to fill in what the sequence is now those gaps are caused usually by two things either repetitive sequences that are too uh too difficult for the assembler to resolve or just drops and coverage because you had either you didn't sequence your genome deeply enough or perhaps there was some GC bias in that region that didn't allow it to be covered by
um by reads um if you have long reads to augment your short read assembly there's programs that will allow you to use the long reads to fill in the gaps um which is especially helpful for highly repetitive regions okay so I'm gonna is there is there any questions about that part because I'm going to move into now what are some of the difficulties for for assemblers yeah um so so it will it will select a CER size and then every CER will become a vertex in the graph and then when it's trying to do the
compaction where it's finding the paths in the in the graph it will usually just pick a node at random um but it actually doesn't matter no matter what node you pick you'll arrive at the same set of Contex and is there any sort of scoring you might have some graphs that result equally well sort of scoring that helps to resolve two possible paths that could be resolved yeah that's a good question um there is some body of research on trying to find the genome assembly that maximizes the likelihood of the read data so this is
like a very principled framework for trying to find you know the best reconstruction of the genome those algorithms tend to be quite heavy because you're doing a lot of these calculations you're looking at um like a lot of different alternative path a lot of different alternative paths through the graph and then pick whichever One's best um you have to use hidden Mark of models things like that to score the sequences so they tend to only be used on very small genomes um usually when we're doing Human Genome size assemblies we're we're working so hard to
get it to run quickly enough that we just do very simple things take the cones that are 10,000 15,000 bases in length and then and then and then that's the result right so in 2013 there was um an assembly competition which aimed to figure out what the best performing genome assemblers were um genome assembly has been incredibly popular research topic to work on I worked on it for for quite a few years many other uh researchers have worked on it and there's probably been 10 15 maybe even 20 assembly software packages developed uh in the
last decade so big question was what assemblers work best um what genomes do they work well on and um why do some genomes assemble very well um whereas others have problems so this competition which was called assembleon to uh really aim to to address this question um and there's a quote here from the lead author Keith Bradman who um who really summarized what the field of assembly was in 2013 By saying don't trust the results of a single assembly if possible generate several assemblies with different parameters and uh and different assembly software and then select
whatever the best one is um for your purpose I think this really underscores the state of the field in that there's a lot of uncertainty in genome assemblers we're relatively happy with read mappers now where you can use bwa and it's going to give you a pretty good job that's not quite the case with assemblers and it's much more specific to the genome that you're trying to assemble um now on this slide I'm just trying to summarize some of the factors that make a given assembly difficult so I've touched on the idea of sequence repeats
as being one of the key factors um if there's high levels of heter zygosity so if you're um if you have these bubble structures occurring in multiple places in genome quite often that can confuse the assembler if your genome's not covered very well that causes breaks in the contigs because you just don't have sequence reads there that that allow you to to to link reads together um if you're sequencing is highly biased if you sequence something that's either at Rich um or GC Rich you might not cover the genome completely in reads and that can
cause problems with the assembler of course if your reads have a lot of errors or there's chimeric reads where you've joined up different places of the genome um into a read that causes problems with a graph mention sequencing adapters if your samples are contaminated or if you've sequenced multiple individuals rather than a single individual uh these are all factors that make it more difficult uh for the assembler um so what I wanted to do after this assembl on paper was put together a package of tools that could measure all of these factors about how a
given assembly might go wrong uh automatically without any input from the users they could just take a fast two file it will then measure if your coverage is good enough to do an assembly how repetitive The genome is how heter uh heterozygous it is as a way of giving the user information about how difficult that that assembly is going to be in the next few slides I'm I'm going to explain how this program works and go over some examples of the reports that it generates which is just a PDF file which allow to explore the
properties of the genome you're trying to sequence and choose an appropriate assembly strategy uh um so I'm going to go back to this slide which I showed at the very beginning and essentially how the program works is it's going to analyze the structure of this assembly graph to estimate how difficult it is uh going to be to assem so what we're going to do is we're try going to try to identify how often these branches occur due to sequencing errors how often branches occur due to hetera Snips and indels and repeats as well and the
way that we do this is we analy ize how often these cers occur in the reads so just like I was saying when we when we're talking about air correction um when you've sampled genomic cers you you usually see them 30 to 40 times if you if you've sequenced the uh the genome quite deeply and we can use that information to um learn about the error rate and and in particular the heterozygosity of uh of the genome so if we we draw a histogram of the number of times a 51 where so just a fixed
length string of 51 bases occurs we get a plot that looks like this for a human genome Peaks around 28x and that reflects the fact that we've sequenced a genome fairly deeply now if we show the same histogram for a highly heterozygous genome like the oyster genome the histogram looks like this and what's happening here is that we have this botal distribution and the reason for this is that the oyster genome has a snip around one in0 bases so a lot of the iners are coming from are covering heterotis Snips and indels and it's from
this peak and then another population of Cam are from just homus position that are present on both chromosomes and this sort of distribution causes a lot of problems for genome assemblers they want to treat the genome as being just a single string they don't want to see a lot of these bubbles forming so this oyster genome will definitely cause a lot of problems when you put it into a genome assembler just because of this High heterozygosity and the level of heterozygosity is so high it's readily apparent just looking at this count this CER count distribution
so now we can formalize this concept by just calculating how often these different types of uh branches occur within the graph um and in a paper I published in 2014 we have a statistical model for for taking an arbitrary branches happened in the graph and classifying it into either a sequencing err um whether it came from a heteroa snip or indel whether it came from a repeat and this is just based on these coverage counts that I talked about I'm not going to go into the math of how this works but essentially what we get
out is a prediction of how often um there's heterozygosity within the genome so this is these six genomes I showed before three of them are part of this asson competition and we see that the branch rate for the oyster genome is predicted to be about one in 100 phases and this is just reflecting this high level of heterozygosity within the oyster genome for the human genome which is in that this uh this color here it's around one and a th bases which is also reflective of of the diversity we expect when we sequence Human Genome
um as a negative control we sequence a haid genome we predicted about um I think 13 to 1 140,000 rate of heteros see in that that's just these bubbles I was talking about that are caused by recurrent sequencing R effects so that gives us a lower bound on the sensitivity of predicting heter zygosity by analyzing this assembly graph we can also do this for for predicting the frequency of repeats um again for the oyster genome we see very High rate of repeats for Human Genome we see high rate of repeats as well this is what
we expect we know human genome is large and repetitive and what we get from looking at these PR pictures is a measure of how difficult the graph is going to be to resolve for the assembl so what you want when you sequence your genome and you put it onto one of these plots is for its Branch rate to be down here like this yeast genol which is relatively simple to ass uh this program will also predict the genome size for you so here is just a prediction of genome size for these six test genomes Human
Genome comes out to be about three gigabases what we expect yeast genome's tiny down here at about 12 megabases um the program will also assess the quality scores of your reads so just plots the mean quality score by position just like when we looked at the air rate these six data set you see that the bird data set has problems at the three prime end might need a bit of trimming there um and we'll also predict the error rate as well for you uh now the question of GC bias uh came up a few times
I I heard dur in the previous module and this program will also allow you to measure GC bias so now we're looking at a 2d histogram of coverage versus GC concept coverage is on Y axis GC concept is on the X so this is for the fish data set and we see that it there's no real um coverage is relatively independent of GC in this case this is what we want we want to see most of the genome covered uniformly independent of what the GC content is if we look at the yeast data we start
to see that there's this trend downwards in coverage uh for higher GC so by looking at these plots you can start to see whether your um your sequencing coverage was biased for this run uh again we go back to this oyster data set which is very problematic and we see that this this has actually split just because of this high level of heteros whereas all of this density has come from ptis positions this part of the density has come from homus positions and the program will also predict what the fragment size distribution is for your
parad and reads um allowing you to check whether this me uh matches what you expect from um your library prep so here again we have variety of data sets for the snake data which is constrictor the insert size distribution was around 350 360 bases for the bird genome was around 500 B and finally the assembler will actually run a simulated assembly for you in in just a few hours rather than having to wait multiple days to run the assembly um to give you a measurement of how long it thinks your contigs will be as a
function of this CER size for the Brown graph so we'll just sample paths through the graph look to see how branching they are and then tell you how long the ques are now point I was trying to get out through these last 10 slides is that this yeast genome which is very easy to assemble you're going to get very long contigs no matter what Hamer size you pick but for this oyster data set which was extremely hard to assemble you're always getting fairly short cont so this program will give you an answer in about six
hours total run time um that gives you a measure of how difficult your assembly is going to be um if your assembly then turns out to look very poor you can go back through these other slides say okay maybe my coverage isn't so good maybe the error rate's too high maybe might have too many branches in this genome um and that helps you troubleshoot your assembly um so here's the link to the code I won't read this out since it's all on your printed out slides um it really just takes three commands to run you
build an index from your fast Q data you then run this pre QC program which computes all these metrics and then you run a program which prints out um a PDF report for your genome okay in just the last few minutes um I'm going to talk a little bit about long read assembly so this has become a really prominent research Direction probably the last four years um since long read sequencing has become more available so the pack bio guys really deserve a lot credit for um for building this field as maybe five years ago it
was considered that the airor rate within long sequencers was too high to do to do genome assembly so if you sequence with pack bio the air rate will probably be between 15 and 20% and as I said before trying to find overlaps between um reads is computationally difficult and that is just compounded by high error rates you have to search very hard to look for read that have a true overlap um when they when there there's such a high error rate in the reads but the engineers of pack bio mainly led by Jason Chin um
they developed very fast ways of calculating overlaps and they developed ways of air correcting pack bio reads uh such that they can give very high quality genome assemblies um of course the reads are much longer than luminum reads they're on you can get 10,000 base reads on average versus 100 base reads for alumina and this gives you gives you a lot more information about um how the the repeat structures of genomes are compared to the short alumin um so as I said pack bio really developed this field more recently Oxford nanopore reads which develop this
uh Oxford nanopores develop this miniaturized USB powered uh DNA sequencer which has similar properties pack by reads are now are now starting to be used for for genome assembly as well now the assembly pipeline for long reads looks very similar to to short reads with a few notable exceptions um here instead of doing camer based correction we typically use overlap based correction for long reads um it tends to be computationally much more expensive the reason we don't use camer based air correction is that um the air rates too high to have perfect camers in your
reads they're usually interrupted by an error um and so You' need to use a very short camer if you want to use camera based methods and finally the last step is typically uh um polishing the consensus sequence so when you take your your long error prone reads through this assembly pipeline the final conts that you get will often have quite a high error rate because there's so many errors in the reads um so what we do is we do this step called polishing where we use uh fairly statistic uh fairly sophisticated statistical models of how
the sequencer works as a way of of accurately correcting um the the final assembly and generating better consensus sequence um this slide has just a few papers that are are noteworthy to read if you're interested in Long read assembly um this paper in nature methods three years ago this one I was talking about P bio first demonstrated you can get complet e cololite genome assembled into a single cont using their sequencing data um we're recently out philipp's group has done great work on speeding up overlap uh calculation for long reads and um paper on bioarchive
I think it's now a major biotechnology that you can read and this is a paper from my group uh just showing you can do complete genome Assemblies of eoli uh using auxer nanoport data as well right so final slide is just some recommendations for long read assemblers um luckily if you do have long reads and I should caution that it is more expensive to obtain than short reads but you tend to get much higher quality data and one of the benefits of sequencing with long reads is that the pipelines are a lot more stable and
they're a lot easier to run unlike alumina where you have this laundry list of problems that can happen when you sequence a genome um a lot of those problems go away when you have very long reads so I can make a recommendation of just two pipelines uh for long reads so for pack bio um use canoe to build contigs follow by quiver to polish the genome um and for ox nanoport data use canoe to build kigs followed by nanop polish uh to build the consensus sequence and as I've said typically the results are far better
than when you get short read assemblies I think the best human genome assembly with aluminum data had conts around 30 KB for pack bio they're around 20 megabases so you just got much much longer conts it aren't really comparable if you're doing serious genome assembly where you want to produce a reference genome for something that's very important is definitely worth it to pay pay for very long reads just because the quality assembly is so much higher right so as I said there's no tutorial but feel free to ask me questions and and here now or
or just email me if anything else comes up I haven't uh that's a very good thing to bring up um so the question is whether I've tried 10x genomics technology so this is a new way of doing Library prep where you can tag very long fragments of DNA hundreds of KB um such that you know that all of the short reads came from the same 100 KB molecule um through this Library prep and this gives you much longer range information than just mate pairs or or any sort of paired ends and it's becoming a very
popular way of getting more information out of out of short read sequencing um so while I haven't done it I I know people are getting megabase size assemblies from using the sort of tagged information so that's a good one to to look into as well uh I think it's cheaper than pack bio sequencing but the drawback is you're still using basing it off short reads so if you have very locally repetitive sequence it it it'll struggle to assemble that but you you will have a lot of long range information yeah in your program there was
one of the factors for the coverage you had different SI of and then the length of the when you do your assembly after do you choose your size based on that yeah usually so so the traditional way of doing an assembly is you would just do a sweep over the camers you you submit 50 jobs to your cluster with different camer sizes and then youd pick whatever one gives you long as con takes um that takes a lot of time if you're doing if you're assembling a very large genome you're going to spend just hours
and hours doing that um exactly why I wrote this program is that you could just narrow it down so rather than say you know these cers are always giving you fairly short values you might not try them you might just narrow down to this range which is giving you giving giving you the best assemblies so well it's not going to predict exactly the optimal one it should narrow this the the choice down to to a smaller range okay and could you just re explain the n25 n50 n75 I know it's with length of your add
your and but I never understand that yeah so n50 is is the length of the contig such that half of the genome is in that length or larger okay so you can think of like a we weighted median of of this the distribution of cont did you have one yeah if so we usually shoot for when we do n sequencing 8 KB um for bacterial genome that that works very well at least in ecoli the longest repeat is I think um 6kb which is rival RNA now if you could only sequence say 3,000 base pair
reads just because you don't have enough DNA you would probably give you a better assembly than an alumin assembly but it wouldn't be as good as as sequencing the 10K 8 8 to 10 KB rep yeah or at least the dominant repeat like for human genomes Alo repeats which are 400 bases they cause a lot of the problems within the assembly graph so you can get for pieces that are longer than that you you'd be in quite good shape um if you want a complete genome which even for for human genomes isn't isn't really feasible
just because the centr is so repetitive um even you would you'd max out to say megabase size conts if you only had 3,000 bit per but yeah it's it's going to be a tradeoff one thing that a lot of people do is if if you're sequencing something like like say drof where you can't very small you can't get a lot of DNA they might pull multiple individuals to get to more DNA but that's generally a bad idea because then you're sequencing population there's a lot more diversity and it causes just all these branching structures in
the graph so as much as possible you want to sequence isolated bits and then and yeah talking about yeah you have typically um you'd want to try PCR free libraries so that just so there's always going to be this bridge amplification PCR that happens on the flow cell you can't get around that but to make the library you can remove the PCR step of course this requires a lot of DNA um if you're not doing the PCR but that's that's the number one thing for getting rid of minimizing GC buys at least um other than
that that's that that's all you can do yeah I uh actually forgot the name for what this is but I saw this thing where they were um some I just saw they were talking about graph based reference where there' be multiple possibilities I'm sort of curious the advantages of that just having say yeah so the interestes in graph based assemblies is um mainly what when we when we map a read to the reference genome we're just treating as a linear sequence with no diversity if you if if that read came from something that's very different
than the reference it's not going to map very well say we came from some novel sequence and there's a lot of Novel sequence that's not present in human reference that read is going to go unmapped if it has a very long insertion deletion uh in it with respect to the reference it might not map very well so the idea is if we can build these reference graphs which incorporate all that known po polymorphism it would map to one of the alternative branches better than just the linear sequence so rather than losing that information we'd be
incorporating it directly within the reference um it's that's really The Cutting Edge of algorithm design right now is graph based reference genomes it's not really in a state where people can use it but it's an incredibly hot area res yeah I was just curious what the uses of that yeah it's mainly just so we don't lose we want to use as much information as we can when placing reads into the reference yeah we're quite good at accounting for like just sequencing errors you when it's just single base edits if it's larger edits like insertions and
deletions if that information is in the graph and it becomes like yam said a much simpler problem but I guess there's not that much tools that use these there's not yet but there it's growing at Le especially in the last year there's there's a um an organization called GA for GH Global Alliance for genomics and health um and they're pushing forward the use of these graph-based algorithms there's five or six groups who are all actively developing methods around this idea and and everybody expects that to be the next generation of mapping and varing calling tools
just about C correction so to me that sounds like using consensus Data before assembly is that just a like is that a computational trick to make assembly easier because the same data in the end will be used to generate a consensus right yeah it's a good question would like something we've we've worried about a lot is the size of these assembly graphs if you have a human genome assembly graph it can have 10 billion vertices that's quite a lot it takes a long time to work with a lot of memory so if you correct the
errors up front it just shrinks the size of the graph down and makes it much more manageable to work with so it's mainly a data reduction approach conservatively you would want toate yeah exactly you typically be very conservative so you don't generate a lot of artifacts you don't want to make like the the overriding goal in assembly is like don't make errors because you know if you make an ER and reference genome it goes into some database and then it's there forever Le that's that's how I've always designed my programs um if if the genome's
fragmented because you're too conservative you can then add in Long reads later fix it up get longer conts but it's typically a lot harder to fix misassemblies y yeah so so usually what you'll do um so when you when you pick your camera parameter say here you want to pick something that's high enough such as you're getting around a lot of repeats but you don't want to pick a camera that's so high that um right this isn't my computer um you don't want to pick a camera that's so high that you're not covering the genome
in in in in these camers you need much higher coverage if you're using a long camer SI I don't know if that was clear um but but because of the fact that there's this tension between using long cammers to resolve repeats and and and short camers to have high c coverage if you pick a value that's too high you just get coverage breaks and what you can do is when you find that that there's a gap you can use a shorter camer to try to fill in that Gap um if the Gap is caused by
repeat you might use a longer camer but allows you to just adapt the parameters such that you can fill in that exact uh that exact sequel yep still anal I feel yeah that's something my group works on quite a lot is that an alternative to using reference graphs is to just do everything in denovo assembly and then compare the assembled sequence to to the reference genome afterwards which tends to be easier um the main problem with with denovo assembly based variant calling which so to give you a concrete example we triy to do find sematic
mutations some mutations that are only occurring in a tumor not in a Norm in in individual's normal genome um by comparing the the reads in a in an assembly graph that works very well for long indels which are a weakness for mapping based approaches but unless you have very high coverage you might not see the variance so the drawback of denova assembly based variant colon is you just need much higher coverage and you have slightly lower power in repetitive regions because of these problems I talked about of having these branching structures Y is there any
difference between your director gen yeah so this program which which will do a simulated assembly to let you pick cers that's doing a very similar thing to CER so G CER is trying to predict the best K as well yeah all right there's no more questions as I said my my emails on the last slide here um feel free to email me questions if if you have any problems with your assemblies happy to answer [Music] those