Bonjour. Comment ça va? Ça va bien? So my name's Ben, and I'm here to talk about JavaScript errors. Really, this is kind of a deep dive into the error object and how stack traces are generated. And a whole bunch of that so we can come away, hopefully learning a little bit more about how errors work so we can use them more effectively in our own applications. I work for a company called Sentry. We're one of the sponsors here today. Sentry is a mostly open source platform, web service and client library collection for servicing errors from many different platforms, be they Node.js, or Ruby, or Unreal Engine, or iOS. Obviously, here to talk about JavaScript. If you are curious, it's very simple. You just sort of NPM install a library. Initialize that in your Express application or browser JavaScript application. And once you do that, once any kind of errors are thrown, you kind of get these really nifty dashboards that give you stack trace with surrounding source code, event volume, et cetera. It's on GitHub. You can run it yourself. I'll talk a little bit more about it at the end. Oh, there's some other screenshots. So if you've ever struggled with situations like the following, where maybe you're looking on your console or an error tool at Sentry and you see uncaught object object, what does that mean? Not very helpful. Or maybe you've got an error and it's just a message and there's no stack trace. Very frustrating. Don't understand how that happened. Or you've seen this. This is like a browser JavaScript error called script error, in which you know something's wrong, but that's pretty much as far as it goes. If you're suffering from some of these symptoms, I'm hopeful that we can learn some things to fix that. So in this talk, I'm going to talk about the error object itself, how you can extend that to create custom errors. The stack property and how stack traces are generated, what does it mean to throw other objects besides errors? And then a little bit about now that you know how the error object works and how you try and catch on all this jazz, how can you report on those errors to like a logging facility or some other tool? So if this doesn't interest you at all, you should make way right now. So the error object itself, where it all begins. So this is from MDN, the error constructor creates an error object. Instances of error objects are thrown when runtime errors occur. The error object can also be used as a base object for user-defined exceptions. Pretty concise, really want to focus on that. Instances of error objects are thrown when runtime errors occur. So what that means is that, let's say that you have code like the following. It's written sort of backwards, that's intentional, but just take a moment to read it. It's kind of like this cascading waterfall of function calls, where A calls B, B calls C, and then C calls this function D, which doesn't exist. And as we all know, that's probably not gonna work. Something's gonna happen. And it's gonna look like this. Uncover reference error, D is not defined. This is what you'd see, maybe your node application will just stop and throw this out, or you'll see this in the browser console. Thing is, is in the background, if you were to do this instead, you can actually throw your own reference error. There's nothing special about that. It's an error object that exists or is subclass from error, and you can throw it. And if you did this, you actually, it's the exact same stack trace. You wouldn't know the difference, okay? So all this is to say is that when you actually, throw a runtime error like this because your code doesn't execute, behind the scenes it's really just creating an error object and instantiating it, and then throwing it. So you don't have to, obviously, you don't have to throw reference errors. You can throw the base error object itself. And if you do that, you can see how the output is a little bit different. In this case, you see uncut error. This is super broken, but the same stack trace generates from that point. The error object has three major components. In my mind, it has the names. That's like, just as we saw reference error, that's the name of the error. That's actually a property on the error object that you can inspect. There's the message, and that's the first parameter that you pass to the error constructor. And then the stack is also a property. And these are actually values that you can inspect on the error object itself. So if I went back to that example, and if instead of throwing the error and sort of letting that bubble up to, letting the program crash, I instead try and catch it, I can inspect the values of that error object and output them to the console, and you can see that they look like this. So just that you know that these are things that you can navigate and inspect yourself. There's a bunch of standard errors that are kind of built into JavaScript. I don't know if all these are in Node. They certainly are in the browser, right? For example, URI error, that probably exists. Not sure, but these all derive from errors and they sort of are built into the runtime, some of which you may have not seen before. Internal error is when the actual underlying JavaScript engine has exploded in a way that it doesn't quite understand. So if you do see that, it means that V8 is not happy. Eval error happens if you try to run Eval in the global scope, things like this. You could use these yourself if you wanted to. Again, they're not protected in any way that you could throw them yourself. What is perhaps more practical though is to sort of extend the error class yourself to create your own custom error classes that might actually add more contextual information that you might wanna add. So in this very simple, super simple example, all I'm doing here is extending the error object. Just giving it a different name. You actually have to overwrite that name property. JavaScript doesn't magically know to look at that class variable and to sort of transport that to the name properties, so you have to declare it yourself. And now you can throw this error and it will operate the same way as every other error example we've seen, okay? This example right here doesn't really do much other than to create a new name of an error that could be useful. Maybe a more useful example is if you were building an API and you could create your own error class called the API error class and you can augment that at a status code. Maybe you could add some headers or some other values. And the reason you would do that is that maybe when you're inspecting these values later in your application, you're dumping them, you're console logging them, you can actually output that information which could tell you a little bit more than just sort of a stack trace. Below, this is sort of an example where you can try some code, you can catch it and you actually see if it's an instance of this API error in which case you can sort of like, you know that you can carefully extract that status property that wouldn't otherwise exist. Okay, so that's just the error object. It's not too, nothing too crazy. I think the most interesting part is the stack trace. It's the most useful thing. It shows us what were the frames that were executing before the thing broke. It's the thing that's gonna tell you where your application stopped working. So like I mentioned, it is like a property on the error object. It's actually like a prototype property. So how does a stack trace get generated? Some people, I don't know, if you're not aware, the stack trace is actually generated at the moment at which the error object is instantiated. Some people might believe that it's actually when you throw the exception as in the examples that we had. So if you have this example, it looks like earlier, the difference here is that I'm creating an error and then I'm returning it through the function waterfall all the way to the top and then throwing it there. The throw point doesn't matter because the error was created in that C function, the stack trace that you can see there in the bottom right still kind of cascades the same way. So the big takeaway is that it's on error creation is when the stack trace is generated. But that means that this is a pattern that sometimes we use in application development which is just sort of like catch a generic error and because we know more about it, we might re-throw one of our customers. So for example, what if I caught an error and I re-threw my API error and I want to add like a status code. If you do that, oops, sorry, getting out of myself, if you re-throw an existing error, you won't actually change the stack trace, right? So I can catch it, I can throw it again and there's no problem, it'll look exactly the same. So you can catch and throw and catch and throw, the stack trace will still originate. This is what it's getting into which is if you re-throw this as a new error object, right, like my custom error, it's getting out of myself, sorry. In this case, you actually generate a new stack trace and that's because you've created a new error object and instantiated that point and this can be problematic if you're doing this like not carefully, because you're actually eliminating all that original context that you were catching. So something to be aware of if you've ever dealt with a stack trace and you feel like it's missing frames, this is a possibility. What you can do instead is that if you are throwing your own custom errors, you can actually copy over the original error stack trace onto that new like custom error object that you've created in this case of calling it like original stack.  You get the stack trace leading up to your custom error but you also get that original stack trace that bubbled up. You can also just completely overwrite it if you want, there's nothing stopping you from doing that. Everybody following so far? I'm going too fast, okay, a lot on it, good. Yeah. So everything that we've been talking about so far are these synchronous code examples but we all know the JavaScript has like a lot of asynchronous code and it's one of the things that makes it cool, challenging. One problem with that is that the stack property, it really only bubbles up to like the top most asynchronous frame. So let's say that we have the same example, A calls B, B calls C but then C kind of breaks out this set timeout function which queues up a call that gets executed asynchronously and then in that function that gets executed we now try to call the function D which doesn't exist. In this example, unfortunately, you just get this, okay? The fact that there was this sort of like cascade of function calls that queued all this code up, it's lost and that really stinks, very frustrating. This is something you should keep in mind. Now, you might be thinking, this is a node conference, I've heard a lot about node 12, it has asynchronous stack traces as a thing. Full disclosure here, I'm not like a full time node developer, it's more of a curiosity for me, I'm mostly like a browser JavaScript developer but I was playing around with this and this example, this example right here, if you try this in node 12, you'll actually get the same result. You've lost sort of like that, the outer context calling that set timeout but there are some patterns in that you can use in node 12 which actually give you like a full, like asynchronous stack trace, so if you're using promises, you're using async await and you have this example which is a little, it's actually very subtly different from the other one. Node 12 will sort of provide you this asynchronous call stack. It doesn't capture every sort of asynchronous call stack, there's just sort of like particular patterns that it's aware of in which it can generate this and it's usually using async and await. Chrome, however, if you have DevTools open and you use that earlier example that I had, this example doesn't try catch the run time error, it instead just lets it explode. If you run this in Chrome today in DevTools, you actually get this really nice output that is pretty handy, it has a different format but it shows you these sort of asynchronous calls and this is really great, this gives you kind of everything you need to figure out why the code was broken. A challenge here though is that this is actually just like the developer console, it isn't actually, even though Chrome and VA kind of has all the information it needs to sort of augment that error object with a stack property that would have this information, it doesn't. This is strictly just what you get in the console output and if you were sort of like logging this in the example that I had before, you'd lose these frames. This is all really silly, okay? So like different, obviously like different run times interpret error stack traces in different ways and that's because this property, this stack property that's so useful that we've depended it on, it's actually non-standard. The presence of it, the idea that it exists, that there is some property named stack, that is standardized but what is inside of it is sort of like a free for all, it's not defined. So perhaps in the future, all those asynchronous sort of like patterns will emerge or they'll get like extended onto the stack property for the error object and that would be fine because it's not standardized so there's nothing really saying that it can't. What that means today is that if you look at stack traces from different sort of like browsers and different JavaScript run times, they all kind of output these stack traces in different ways. So Chrome, V8 sort of output for example, they redundantly output the error name and the message on top of the stack. So this is me just outputting the stack property it includes that redundant information. Safari omits that information, has a different way of sort of like showing you frames. Firefox is another way as well. What this means is that if you're doing sort of like error reporting and you want to kind of like group different errors together, you have to do a whole bunch of like regex massaging and things if you were so inclined. So stack property, couple key takeaways, it's generated instantiation, rethrowing the new error, the same error will not generate a new stack trace but if you create a new error, obviously you will. The first frame is the top most asynchronous execution except for in some cases, it's just a string, right? So everything I've shown you, this is not some clever way or like array that you can manipulate, it's just all string data as non-standard. So so far I've been showing these examples where we throw errors, which is like the really good way of throwing things if you want to stop execution. In other languages, if you try to throw or raise an exception using a non-error object, that act in of itself will create an exception. So in this example with Python, if I try to raise a string, it basically is like, whoa, whoa, whoa, you can't do that. That's not how this language works. JavaScript, however, is perfectly quite content to let you throw anything. So in this example, similar as before, functions A, B, and C and then I throw this string called oops at the very top. If I do this and I try to catch it and I try to log it, you just get this. You just get the string oops. There's no stack trace, there's no message, there's no nothing. And so if you've ever been logging errors and you see just random strings or things that you don't understand, oftentimes this is the case. It doesn't have to be a string, it could be an object. It's like any non-error object or nothing but the stack property, you'll get something like this, object to object. Now it's not very common for people to say, throw a string. What I think is more common that I've seen is that when people are doing promise rejections, they might say, hey, I'm gonna reject this promise with a null value or a negative one or something. And if you do that, it's the same story.  So if you are working with promises and you have an opportunity, you should create error objects as opposed to just resolving things with like primitive values or you know, you don't know. There are global like promise handlers that can help you find things that don't resolve. So that's only gonna be a useful utility for you if you actually have a stack trace to help you understand where those rejections occurred. If you know that this is happening in your code, you'd like to stop it. There are actually some like ESLint rules that you can add to your software, code repository right now that'll look for these patterns and encourage you to resolve promises with error objects. And if you're interested with that, there's no throw literal that's preventing you from like throwing strings and objects and then prefer promise reject errors is another rule you can use to stop that. So earlier we learned about how you know, you can use this fact that when you create an error object or you instantiate it, you actually get a stack property. You can use that in useful ways. So in this example, let's say that you know that you have a string that's thrown somewhere and this is really challenging because you don't know where it is, right? This is a very contrived example where I'm throwing a literal value, but what if you're throwing some variable that's being passed around, right? Very hard to track down. A technique that you can use is that you can try and catch some problematic code. And if you know that this error is not an instance of an error, you can actually throw a new error at that point in time, in which case to kind of like generate what I call like a synthetic trace where you create a stack trace up to the point where you caught it. And that's not obviously like, it's not gonna get you all the way to the root of your problem, but it at least gives you kind of like a starting place. And from there, you can kind of like add more try-catch statements with these synthetic traces to kind of get you closer to the problem. There's other useful ways of using this like stack property. Like if you just want to, you don't have to throw an error, right? You can just create an error object, console log the stack or put the stack properties, preserve it in a way that is useful for you and toss the error away. That's perfectly valid as well. So non-error exceptions, they're causing you to throw any non-error. They make determining root cause difficult because you got no stack trace, promises, common source of them, and you can use this error object to help you out. So up until this point of kind of talking about the error object, ways to use it a little bit more effectively or at least understand how it's operating so you know what you're looking at. And I talk really briefly and just like, what if you want to report on those errors? Here's a really contrived example, like if I try some code, problematic code, it blows up, I can catch it and then I can use fetch or node fetch to send some data to an error reporting endpoint. This could be a logging endpoint or something you've stood up. I'm not gonna go into the details of that. Of course, you don't really want to pepper your code with try catch statements, especially because we try catch only works on asynchronous boundaries, you'd have to do it all over the place. So most JavaScript runtimes provide you like global error facilities, error collecting facilities that you can use to collect them. And node, you can use process.on uncaught exception and you can use that, catch an error, try to make a HTTP request somewhere. But if you do this, you should be really painfully aware that this actually subverts your program halting. So you have to do it yourself and the docs will tell you that you should really only run synchronous code in this error handler because if it doesn't exit, there's a chance that your application might be still running in some sort of like undefined state while you're trying to do cleanup. So something to keep in mind, like I would argue even this really contrived example I wrote is not very safe because it's basically saying, okay, the program halted, I'm gonna just get to send this error report somewhere. And while I'm waiting for that to return, my application is gonna run in undefined state and then I'm gonna process exit. But I just wrote this as just like a really contrived example because dealing with this in a safe way is too complicated for one slide. Similarly, there is, you can use that same sort of event handler for unhandled rejection. The callback for this is it takes a reason, which is why was this actually, why was this promise rejected, which is typically an error. And if it is an error, you can of course extract it and send it just like in the example before. In this case, this doesn't halt operation of your program so you can kind of do this much more safely. In browser world, it's a little trickier. Browser world has this window.onair global handler that is really like a relic that dates back all the way back to the 90s. And so it's sort of just kind of been, we've just been tacking on parameters until it's been useful. So in order to preserve backwards compatibility, so that's why it has all these arguments. So if you're curious, the very first iteration just took like a message and then it took a URL, then it took a line. Then we're like, yeah, column would be useful too. Let's throw that on there. And then finally, we just sort of added this like final fifth error object that actually contains everything. So just like before, you can on window.onair, you can kind of send this data somewhere. The browser also has an unhandled rejection, global error or global rejection handler. It has a little bit different signature than what we saw earlier. It takes like a promise event and on that event, there is a reason value that hopefully is an error object and you can report on it that way. And also what's really cool about this is Firefox in the last couple of months just added support for this. So it's actually a relatively newer thing, but now every browser supports all of these global error tools, which is pretty cool. One quick example, I do want to bring up that in node world listen, you run your whole environment. It's very easy.  Browser world is a little tougher. Here's an example of like actually using this on air handler where I'm loading a script with my example code. And very importantly, this is coming from a CDN. So I'm pointing, it's very common for us to publish static code onto CDNs these days whether that's Netlify or something else. And if you do this this way, you might come into this problem where if I throw some code, instead of getting the stack trace on this cool like error object that we were talking about, you don't get anything, you just get script error, okay? This is a problem that a lot of people run into when they're configuring this. So I think it's always like worth taking a minute to talk about. It's very challenging because it is basically omitting everything. So that null object that I've kind of highlighted in the output, that's the error object. So the browser has actually said like, you can't see this. I'm not even gonna show you what the error is in this situation. And the reason it's doing that is because of the same origin policy. So same origin policy is this sort of policy that makes it so windows and tabs can't communicate between domains. You don't wanna like leak information from your bank website to some other website. And this actually extends all the way to global errors. And this kind of makes sense if you think about it because what their fear is is that if you can load a script from another website and you're actually authenticated on that website then it's possible that an error might be thrown from that website that contains private information about your account, right? Like, you know, uncaught error, user Ben Vinegar whose account details are one, two, three, four, five, six, seven, eight, nine. You know, this is their password. It's obviously like super contrived. I don't imagine that would happen but it is a possibility. And so for that reason, if there's an error that would come from a script that's hosted on another domain it actually gets sort of like basically blanked out with the script error. The way to get around it is you use cores if you're familiar with it, cross origin, resource sharing. You have to do it in two ways. If you're requesting this script from a CDN you have to set this attribute called cross origin equals anonymous. That's actually a signal to the browser to say this is like, the expectation is that this is sort of like a cookie list domain. You can just request this. There's no session information. And I believe the browser literally doesn't send cookies if you sort of like request a resource this way if it's set up this way. And then on the other side from your CDN or whatever's, you know, web server that's returning this script you have to actually declare that any origin can request this, right? So you say access control our origin asterisk or you can lock it down to a set of domains that are trusted.  The browser is saying, I'm not gonna request anything with session information. And the server is also saying I have no expectation that there will be any session information here as well. And once both of those things have to happen then this example that I showed you earlier it'll work. You get to actually see errors that come from other domains. So just something to keep an eye out for. So it's kind of like the end. What did we learn? That's a good question. I don't know. You can use custom errors to add meaning to failures if you're not already. You should keep in mind how stack traces are generated because if you're logging them you might have a better idea now of kind of like why does it have this shape and where did the error like occur from? Don't throw strings, objects are the non errors because you'll find yourself in this very problematic situation where you don't know what's going on. And you can use global exception handlers to report errors if you want to. This is of course the part where I suggest that you shouldn't do that at all. You should just use like a tool that does it for you because it's really complicated. And I don't have enough time to go over the ways in which it is complicated. So Sentry is, this is kind of what we do and it's a source available software. So that's basically, it's like fully permissible for you to run, modify yourself, you can run on your own servers. It is on GitHub on github.com slash get sentry slash sentry. Gives you cool error reports like this. I usually don't mind pitching this because like the whole idea here is that you can run it yourself. And here's a kind of an example of that it exists. We have a booth here and if you're curious to see what it looks like I'd love to talk about it. If you thought any of this was interesting you wanna learn just go a little bit further into how does our Sentry JavaScript library work? You can go ahead and take a look at the source code over here. If you are curious more about the script error thing or you wanna do your own error collection over in some blog posts that you can check out. So that's it for me. I hope this was okay. Thanks so much for being here. Merci beaucoup. Thank you.


To keep an open-minded, an open-minded position, nowadays the supply chain for posts and for customs, me being from World Customs Organization of course, we have new challenges every day and our standards of service have increased and this is because open markets have been also demanding us this and this requires not only to have more resources financially and human resources, but also it requires to have a more control and access to information and today we see that not only the public sector is controlling this information, but actually most of the information and data that we need to change comes from private sector. So I would just recommend GPU to keep an open mind on this, to keep a target on the benefits that we can get as operators of cross-border trade, but also to seek for innovative and new ways of adapting to this change.


As I didn't realise at the time that that sort of high and low was going to be for the rest of my life. Once benones to me I think I've been bipolar all my life. I just wish I could cry. I'm actually on 17 tablets a day. No Galaga. This is drug taking. ydw nid o gyfu myfwyr yw ddiw hwnnw. Mae hynny'ch asiwyd yn edrych. Maen nhw ddod yn ein gweithio. Yn y gweithio? Oni, mae'n gweithio fel mae'n o'r swydd, mae'n ddod. Mae hynny'ch ei wneud yn ymgylchol yn 1995. Mae'r gwneud yn gourfynu desol. I can of worse since 1995, but I didn't actually get diagnosed until about 97. My understanding as we sit here now is it takes an awful long time to get a diagnosis with bipolar. OK Nick, well here doing this photographic study, what's bipolar? I think the very best way of describing it is to say that our brains all the time are trying to keep our mood within normal levels. We're having things happen to us and just random changes going on. Everyone's mood can be up one day, down a bit another day. But normally our brains keep the mood within normal levels. By polar disorder what's happening is the person's brain. Can't maintain those normal levels and they can either go excessively high or deeply low. That may either just come out of the blue due to random changes or it may be an overreaction to something that's making them feel good or low. But in addition to those extremes of mood people can often experience delusions where they believe things aren't true or hallucinations when perhaps they hear things aren't happening or see things aren't happening. Often there are episodes that occur either high or low and between that the person's relatively well. But in other people the mood may be changing continuously so-called cycling. So it can be very different in different people. Or bollocks, bollocks, bollocks, bollocks. Prior to the diagnosis I think I was being treated for just depression. But they put me on a medication called Seroxat and I went completely off the scale. I flew to Seattle to see Jimi Hendrix's grave. I thought I could communicate with Wales because at the time I used to play guitar and charted a boat and went to Fino which is on Vancouver Island, British Columbia. I wanted to see the killer whales in their natural environment so that was 97 and obviously the psychiatrist then had the evidence that I went high and low. I think generally speaking people don't go to a medical professional when they're high because that's something that you don't tend to do. You only get involved in medical services in a high when it becomes into the psychosis and the dangerous element of the illness. OK, are you recording? OK, so we're on the way to Cardiff. Is everybody in shot for the crew? OK, so here's to our adventure.  Good gig, good gig, good gig. In the general population the risk of the most severe sort of bipolar disorder is about 1 in 100. If you've got a parent who's had bipolar illness the risk increases from 1 in 100 to about 1 in 10. But it doesn't mean you'll definitely get the illness but it's a signal really to be more careful about the things we know that might trigger illness. What you have to remember is that 9 times out of 10 the child will not develop bipolar. That's what I put to my kids. Instead of being the increased risk it's the fact that even though it might be an increase it's still 10 chances of possibly getting it or 90 chances of not getting it. Exactly, yes. The second commons are going to happen and I'm going to be the second commons so I got in touch with the chief rabbi and tried to convince him to teach me how to read and write Hebrew. So I could read the Bible in its native tongue because I figured if I was going to be the next Jesus I would need to know these sort of things. At that time you were so serious and you could get yourself into a lot of problems. When I've been in Main Yeeve I've never gone to the doctor. It's always been because of the depravities of elements because I have a lot of problems with suicide isolation which it becomes an ideal. It becomes the only solution and after four attempts I know what it's like to be in that particular frame of mind and it is not pleasant. What do you think causes bipolar? It's absolutely all to do with both the genes that we inherit that make our brain and behaviour go in a certain way and also the various experiences and life events that we have that impact us. I don't think it's all to do with genes and biology and it's not all to do with life events and experiences but it's that combination of the things. So in bipolar what are the big fundamental questions that we need to get answers? The most fundamental questions are pinning down exactly which brain systems are important and exactly which environmental experiences and triggers are most important. Because really what we want to do is to be able to make a difference to people with illness to be able to make diagnoses more rapidly and accurately and then to get people on the very best sorts of help that we can offer. It might be medications but it also might be lifestyle advice or it might be particular sorts of talking treatment. But without knowing in detail the brain mechanisms and the specific environmental triggers we can't really give that excellent advice we want to give in the clinic. The key message is that actually people vary enormously and no simple answer fits everybody. There is no one size all and for bipolar disorder there is no one size fits all treatment. Different people respond to different treatments and that's why it's really important that people with illness go and get professional help. They get a full assessment and then they get the advice and help treatment that's focused on them as an individual rather than thinking it would just be the same thing for everybody. The music is, I'm fairly confident about the music and the performance because I know we can play these songs. Whether we play those songs and we get enthusiastic response at the gig it's a different matter. I mean I didn't really understand it at first. I think a lot of people find that they don't really understand what's going on. I just sort of bumped into him as an old mate and fixed up from there. Not really realising it exactly what had happened to him. What's happened over the course of the film and perhaps it's part of the rehabilitation thing that I've been going through is I've bounced back and that's a huge benefit for me.


Good morning, everybody. So it's my pleasure to start the first bit of science here for the course of this week. So as I mentioned, all these slides are available under Creative Commons. And the condition here is that you give credit to whoever helped make these slides. And here's my bit of credit. So I've benefited from some great teaching materials by my colleague Ben Langmeade. Solve his slides are here at this URL on his lab website and also for my friend Erin Quinlan, who slides up on GitHub. So we're reusing a bit of material for both of those. So this is the first module of the entire Weklont workshop. And the goal of this module is really to give a foundation for what we're going to talk about for the rest of the week. And this is going to be an introduction to how high throughput sequencing works, so what the sequencing instruments are actually doing, how they generate data, what the data looks like, and some of the caveats and challenges of working with these very large data sets. I have around maybe 40, 45 minutes of content to talk about. I think we're scheduled here for a full hour. So please ask questions as we go. I like to be interrupted by questions. It makes the flow a little bit easier. And it makes sure that I know that I'm giving the right information for you guys. So please interrupt. As Ann mentioned, one of the big benefits of CVVW is you get to interact with the instructors who have been working on this for a very long time. I've been in bioinformatics and genomics for around 10 years now. But I'm only going to be here for the first two days. So if you have any questions about DNA sequencing or how these algorithms work really at a low level computer science way, please ask me. But just get your questions out in the next couple of days. So we're going to start with a bit of basic biology to motivate why we want to sequence genomes. Many of you know this in your heart just because you have background in biology. But the central idea here is that we want to understand the information that's encoded in genomes and how that gives rise to different phenotypes, phenotype to being the observable characteristics of individuals. So we've known since the 20th century that DNA is the storage of information within the cell. That information gets transcribed into various levels of different molecules. Central dogma says that DNA gets transcribed into RNA, which encodes protein sequences that get translated into these amino acid sequences that then go and fold and carry out their biochemical function. Now throughout this week, we're going to hear about all these different levels. So in the first two days, we're going to hear about DNA. We're going to understand what genomes are and how we sequence genomes. And then when Obi Malachi come on Wednesday and Thursday, they're going to talk about RNA, how we analyze these actual RNA molecules. And then we'll hear a little bit about proteins later on in the week and how we actually link these different data sets together into a unified picture of how cells and how organisms work. So DNA, this is going to be really the focus point for my lecture in the next two days. So everybody's probably familiar with the DNA structure. So it's quite interesting to give this talk at Cold Spring Harbor because Jim Watson, obviously, with Francis Crick discovered this structure that we're looking at today. I don't think he's here. I don't know how much he spends his time at Cold Spring Harbor these days. But really, we're all benefiting from Jim Watson and Francis Crick's work here. So DNA is a double helical structure, has a sugar phosphate background backbone, which gives structure to the molecule. And then the individual rungs here on the DNA ladder, if you'd like, are made up of the four nucleotides, A, C, G, and T. And they're linked together, linking these two complementary strands. Now, genomes are quite large. These are incredibly large biomolecules. The smallest genomes that we work with, viral genomes, are maybe around 10,000 to 20,000 bases. Bacterial genomes are on the order of megabases, millions of bases. But the human genome, and the very large genomes that we work with, are around three gigabases. This is an incredible amount of information. It's incredibly long molecule. The human genome is actually packed into the cell by wrapping around nucleosomes made up of hitstones. And they get compacted into these fibers that are then wound together and packed into the divisible chromosomes that you see if you looked at a microscope during metaphase. But we're really interested now in just what the sequence of these genomes are. What are the order of these four nucleotides, A, C, G, and T? And what do they tell us about how that cell functions? So we're going to be trying to figure out the sequence of individual genomes. And why we want to do that is because variation within the genomes will give rise to variation within phenotypes. So phenotype can be something like hair color or eye color, or it can be more complex traits like your height or your predisposition to getting certain diseases like cancer. Now, we sequenced the human genome as a field about 15 years ago. And again, being a cold spring harbor, that sort of brings the history into it. Because if you go to the bar at Cold Spring Harbor, where the reception is tonight, there's a guitar signed by all the people who are involved in sequencing the human genomes. Have a look at that later for a bit of history. But since we sequenced that human genome and finished it, there's been this explosion of data where we wanted to sequence more and more people such that we can understand all of the diversity within the human population and figure out how the differences between individual genomes give rise to these observable characteristics of the phenotypes. So one of the types of variation we're going to hear about are single-nucleotide polymorphisms. Matthew is going to talk about this, I think, later on this afternoon. These are just single bases that differ between two genomes. So if you compare the two genome sequences, they're going to be identical over very long stretches broken up by these places where there's just a single nucleotide that's different between the two individuals. And if those differences are an important region, like they change the coding sequence of a gene, or they're in some sort of regulatory region that changes how much a gene is expressed, or whether it's expressed in a certain cell type, that might then go on to change these observable characteristics through this messenger RNA. So that's really why we want to sequence genomes. There's larger types of variation as well, like structural variation where there's big rearrangement changes between genomes. Again, we're going to hear about that in the first two days. But first, what I really want to talk about is how we sequence genomes and how the sequence technology has changed really over the last 10 years to allow us to sequence human genomes at very large scales where we can sequence now 10 to 20,000 human genomes in a single research institute per year. And to talk about DNA sequencing, let's go back to the structure of DNA. So DNA is a directional molecule. We have what we call a 5-prime end of DNA and a 3-prime end of DNA. So the 5-prime end is denoted by a phosphate here. And the 3-prime end is noted by this hydroxyl here attached to this sugar. Now, this alternating lengths of phosphates in these sugars, which are deoxyribose, give us this backbone of DNA, which allows it to have this helical structure. And then in the interior here, we have the actual nucleotides, A, T, C, and G, and they're complementary. So A minus A, T, G minus A, C, and vice versa. So these are on the interior structure of the DNA and they're linked along this backbone here. Now, we're going to color the nucleotides here just to identify them. Green is A, purple is T, red is C, and this blue is G. Now, the first technology, the first sequencing was developed by an English biochemist named Fred Sanger. So Fred Sanger is notable for actually having won two Nobel Prizes. He invented protein sequencing in the 1960s, followed it up later by inventing DNA sequencing. We're going to talk about DNA sequencing here and go into the details of how this method works. Now, appropriately, it's called Sanger sequencing after the inventor of it. And the way that it works is that it uses a lot of the machinery that is in the cell that replicates DNA, but it modifies it chemically such that we can figure out what the sequence is. And crucially, it uses an enzyme called DNA polymerase which copies a strand of DNA using the complementary strand. So if we have our template strand here, DNA polymerase comes in and then it will find the complementary base to the next one and then add it into this growing chain by linking up these phosphate and sugar molecules that make up the individual nucleotides. So it would come in here. It would find the complementary base to T, which is an A. Add it here after the C. Then it would find the complementary base to the C, which is G. And add it here, synthesizing this complementary strand in the 5 prime to 3 prime direction. Now, how Sanger sequencing works is that when you add your nucleotides into your reaction mixture, such as DNA polymerase, can find them and add them to this growing strand, Sanger noticed that if you chemically modify the nucleotides to make what are called di-deoxynucleotides, where rather than a hydroxyl at this position of this sugar, there's just a hydrogen, that will actually inhibit the elongation of this chain. So what you can do is you can take a mixture of normal nucleotides, and you can spike in a low concentration of these chain-inhibiting nucleotides, the di-deoxynucleotides. And if one of those chain-inhibiting nucleotides gets added in, it will just stop progression of that DNA sequence. So whenever one of those gets added, we stop here at this G, and you can no longer progress. That chain is not going to grow anymore. So what Sanger did is he noticed that if you do four separate reactions, one for each of the di-deoxynucleotides, so one reaction for di-deoxy-A, T, G, and C, then you use standard molecular biology technique called gel electrophoresis to sort those DNA strands by size. You can then read off the sequence by looking at the pattern of these bands here. So we know in this case that the shortest DNA sequence in this collection was in the reaction tube where we used DDC. And we know that the last base of that sequence therefore must be C, because that was in the reaction where we terminated the strands with C. Now, if we move to the next shortest, we see that it's in the G column here. And we know that this DNA molecule ended with a G. We know the next two in size order are T, T, and then A, and then T, C, T, T. So essentially by setting up these four reactions, copying DNA, using these chain-enhibiting nucleotides where we know what the last base they're going to incorporate is and then sorting them by size, we can just read off essentially by eye the sequence of these nucleotides. And that's how Sanger sequencing works. It's brilliant, and he got a Nobel Prize, and it revolutionized pretty much all of molecular biology. Now, while Sanger sequencing was brilliant, it's what we now would think of as a pretty low throughput technique. To do Sanger sequencing, a technician or a graduate student or a postdoc would have to run these four reactions, run these gels to separate them by size, and then read off the bands of sequence here. And you might be able to sequence a few hundred bases of DNA, but as we already talked about, the human genome is incredibly large, three billion nucleotides in length. So we want to be able to sequence that entire thing, and you're not going to be able to do that 500 bases at a time with a single grad student. So over the last, so Sanger invented DNA sequencing and the 20 years since, there was a lot of movements towards automating this chemistry and making it so that we can do this at very high scale. And this is one of the sequencers that was produced to automate this technology. And the key innovation is rather than using four separate reactions and reading the bands off like this, they invented fluorescently labeled nucleotides where if you shine a laser on the nucleotide, it will emit some light. And if you use four different fluorophores of four different colors, one for each nucleotide, and then separate them in a capillary tube instead of a gel, you can just go along what's called this trace, look at the color of each one of these peaks to figure out what that DNA sequence was. So here's a timeline of how DNA sequencing progressed. So Fred Sanger invented this in 1977. And as I said, one hardworking technician or grad student might be able to sequence around 700 bases per day. And if you divide the size of the human genome by 700, it would take about 120,000 years to sequence the human genome. And obviously that's not a very practical amount of time. You'd need quite a lot of grad students to do that. In 1985, the first automated sequencer came out. This was called the ABI 370. That could sequence around 5,000 bases per day. So just automating a lot of this chemistry got quite far, but still it'd take around 16,000 years to sequence the human genome, not really practical yet. In 1995, the ABI 377 came out. This had a lot of improvements, bigger gels, better chemistry and optics, more sensitive fluorophores, these colored nucleotides and faster data processing. This now went up to 19,000 bases per day, around 4,400 is the human genome. And then finally, the workhorse, the main sequencer that we used to sequence the human genome, the ABI 3700, which multiplexed 96 reactions. You could do 96 sequencing runs at the same time, in 96 different capillary tubes. That could sequence 400,000 bases per day, almost half of a megabase, and get the time to sequence human genome down to around 200 years. We then, as a field, many of these in places like Cold Spring Harbor or the Broad Institute, the Sanger Institute, to sequence the human genome, which took around, I think, maybe 10 years of data production for cost of around $3 billion. Okay, the human genome was revolutionary. We realized that we drastically overestimated the number of genes that was gonna be in the human genome. There's quite a famous contest where people tried to predict how many genes were encoded in the human genome. I think the low estimates were something like 80 to 100,000. And then when they sequenced it and they ran their gene-finding algorithms on the human genome, it came out to be around 20,000. That number keeps being revised up, but we understood that there are many fewer genes that expected, and a lot of complexity in human genomes comes from things like alternate expression, alternate splicing, and different isoforms of the same genes. Something we also learned is that, while there's a lot of variation in the human genome, to really understand the full picture of how human phenotypes arise, we need to sequence a lot of genomes. And sequencing a genome at $3 billion per genome isn't really practical. So people worked really hard on developing new technology that would drive the cost of sequencing down. And in the next bit of this lecture, I'm gonna talk about some of the technologies that were developed in really the last 10 to 12 years that have driven the cost of sequencing down to a point now where we're sequencing human genomes for around $1,000 per genome. So the first high throughput sequencer, and one we're not gonna talk about in detail is called the 454 instrument, which was eventually acquired by Roche. But in 2006, the main sequencer that is nearly ubiquitous and almost all sequencing data that's now generated came out, that's called the Selexa sequencer. It's now called Illumina, Illumina acquired Selexa some around 2009. The other two that we're gonna talk about in some detail are the Pacific Biosciences sequencer that came out in 2011. And the technology that I work with quite a lot in my lab is a nanopore-based sequencer, which is from Oxford Nanopore Technologies. Just for completeness though, the ABI Solid in 2007 was another short read sequencer that offered very high throughput, as was the complete genomic sequencer that came out in 2010, and the Ion Torrent sequencer also in 2010. We're not gonna talk about the 454, the solid, complete genomic trying Torrent as being short read sequencers, they essentially got outcompeted by the Illumina sequencers and nearly all short read data is now Illumina. So we're gonna focus on that one, but we're gonna talk about the long read sequencers as they have some unique properties and unique applications that we're gonna wanna talk about. So key to Illumina sequencing, just like Sanger sequencing, is the use of DNA polymerase to copy a strand of DNA from a template. So here's how it looks again, we've got our single strand of DNA template, we've got free-floating nucleotides in solution, we use DNA polymerase, it finds a complementary nucleotides and synthesizes this complementary strand in the five prime to three prime direction. Now, one of the reasons that Sanger sequencing was low throughput and you could kind of max out after 20 years of development to add a half a megabase throughput per day is that you're imaging individual reactions in say a capillary tube. Now, what Illumina did or what Selexa did, it was the founders of Selexa, is that rather than using capillary tubes to separate them by size, they developed what they call cycle by cycle chemistry where they're going to image a huge array of sequencing reactions that are all happening simultaneously, a single base at a time. Now, the way that this works is you take your DNA sample, which includes many copies of the genome, you chop this DNA sample up into single stranded fragments and these fragments are typically in the range of say three to 400 base pairs. You then attach these templates to the surface of what we call a flow cell, which is essentially a microscope slide. You attach them by using linker molecules that are bound to the surface of the microscope slide and then the templates come in and bind to these linker molecules. We then perform PCR polymerase chain reaction, which is a way of amplifying DNA to take those molecules that are bound onto the slide and create what we call clusters of those molecules. So here we're going to have an example, we're going to sequence two DNA fragments, this one here, this one here. So after the second step where we attach these DNA molecules to our flow cell, we then run PCR in place, which just amplifies that into many copies of that same molecule in this region of the flow cell. So here we've now got six copies of this one, six copies of this one. This is just to enhance the signal that we're going to eventually observe from the sequencer. Now just like Sanger sequencing, we're going to use color labeled nucleotides. These are fluorescently labeled nucleotides that will emit light when you shine a laser on them. We're gonna have one color per base. And what happens is that in the first cycle of sequencing, we flow these colored nucleotides, we add them to the flow cell, we add DNA polymerase. And just like Sanger sequencing, it's going to find the nucleotide as complimentary to this red base, which is green here, that's A. And it's gonna find the nucleotides complimentary to this blue base, which is this yellow one, which is G. We're then gonna shine a laser on them. They're gonna emit light and that's gonna be captured by camera that's observing this microscope slide from above. And this is a very expensive digital camera looking down a microscope, but it's able to take this very large image of all of these reactions that are happening on the flow cell. Now the difference with the Sanger sequencing chemistry is that this inhibiting group is reversible in the selection sequencing. So what you can do is then after you've imaged the first base, you add a chemical in there that cleaves off the inhibiting group and then the reaction can proceed to the second base. And each one of these chemistry steps where you add in the nucleotides, you shine a laser on it to emit light and then cleaving off this inhibiting base is what we refer to as a cycle in aluminum terminology. So after we sequence the first cycle, you then repeat the procedure, you add new nucleotides, shine a laser on them, capture the image, then you remove that inhibiting group, move on to the third cycle. So we're reading this sequence base by base with each one of these cycles. And this is what the actual output of the sequencer looks like. So we're imaging these clusters from the top down. They look like circles here. At the first cycle, we observed green for this one, yellow for this one. Second cycle, we observe red and red, third one, yellow and blue and so on. Yeah. Good question. What makes sure that the complementary base you attach to is at the very top of the first and second cycle? So in the first cycle, so DNA polymerase goes from five prime to three prime. So the first one, you can only add it to that base. And then when you remove that inhibiting group, you can then add it to the second one. But there is a catch, which I'm not gonna go into yet, but in the next slide, I'll explain the catch. So when we get these images, we need to translate these colored circles into the actual base called sequence. And the software that does this is what we call a base collar. It just takes these images, does some feature detection to figure out where these clusters are and how the clusters correspond across the different images. We've captured one image per cycle. And then it looks at the color and tries to predict what that base was, just using the color here. So in this case, we had a five base pair read with five nucleotides here. We captured five images across the five cycles. And we translated that into the complementary sequence, T-A-C-A-C, which is what you actually get from your sequencer. So this would be in a FASTQ file, which we'll talk about, which is what we call the sequencing read or just the read for short. So in this simple example, it was only five nucleotides in length for real sequencing data, usually it's around 100 nucleotides for the Illuminous Sequencer. Okay, so here's the catch. We have this chemistry operating on these clusters of molecules, but this chemistry isn't perfect. These enzymes, these chemicals that cleave off this inhibiting group may not cleave off it for some of the molecules in the cluster, or they might, when we flow these nucleotides in there, it might not actually have an inhibiting group on it, which means that the molecules in the cluster might get out of sync. So let's say we're on the second cycle for sequencing this cluster. So two of the DNA templates in here are on schedule. They're on the second cycle. One of them is lagging behind. It maybe didn't have it. It's inhibiting group cleaved off and one of them has jumped ahead. Okay, so in this one we sequence two bases this cycle, this one we sequence one, this one we sequence zero. Now, this causes uncertainty in the image that we capture. When we take this microscope image after using the laser to make these fluoresce, we see that two of the molecules are red. One is green and one is yellow. And this gives a mixed signal that the base color needs to try to deconvolve informatically. And usually they're pretty good at doing this, especially near the first cycle. So the chance that these molecules get out of phase or out of sync increases as the reaction proceeds. There's more chances for them to get out of sync. So what we say is that the signal purity goes down as a function of the cycle level. And that means that sequencing areas for luminous sequencing are more common in the later cycles of your sequencing run. Yeah, so usually it's a good question. Usually the way the chemistry is set up is that a single DNA molecule will seed that cluster and then get amplified into this bundle of say 10,000 molecules. Ideally all of those have identical sequence. Now you can't have errors in PCR where the PCR particularly if it happens in very early stage. It can amplify into a cluster with mixed identity. And like you said, it would be a mosaic of different molecules there. Then it would look like an impure signal as well where for some cycles it's mixed, a mixture of red and green. And that can lead to base calling problems as well. But usually that's quite rare in only some motifs you get these PCR artifacts. And the usual error mode is that they get out of sync like this. Now the sequencer will helpfully try to quantify how certain it is that the base call is correct and reports what we call a quality score, which is a confidence level or it's a probability associated with each nucleotide that is the machine's estimate of whether that nucleotide is correct or in error. And later on when we talk about genome assembly tomorrow we're gonna see a profile of the error rate along the sequencing reads. And you'll see the error rate goes up and the quality scores go down as you get towards the end of the read. Now why I'm going into the data in detail like this is that if everything in bioinformatics just worked first time it would be easy. We wouldn't need courses like this. And a lot of the difficulty in bioinformatics is when something doesn't go right try to figure out what happened. Just like when you're in the lab if your PCR doesn't work, your gel doesn't run you need to figure out why. In bioinformatics when your analysis doesn't work you need to figure out why. And I feel that to figure this out you need to have an understanding of how the data is generated and all the processes that can go wrong during data generation. And when you're looking at say IGV plots genome alignments and you're trying to figure out in case if you're looking at cancer genomes if a mutation is true or not you'll be looking at sequencing reads you'll be looking at their quality scores and having this intuitive understanding of how the data is generated is quite important. All right, let's summarize aluminum sequencing. So the advantage of aluminum sequencing is it has by far the best throughput. I have up on this slide here the single aluminum run will give you 600 gigabases of data over an eight day run. This slide's a bit out of date now and one of the problems with giving these talks is that the sequencing technology progresses so fast that I always am updating this talk. So we're teaching this course again in two months I'm probably gonna have to update these slides in two months just because the sequencing technology will have improved by then. For aluminum technology, let's say for now it gives you something like 600 gigabases to a terabase of data per run for a cost of around $10,000 per run. It has the best accuracy. So this error rate that we just talked about these base substitutions caused by these mixed signals happens at a rate of around, let's say one in 200 bases. So maybe you're a single hundred base pair read has between zero and one errors, which is very, very good. We're gonna talk about some sequencers that aren't as accurate next. And for any of these really high throughput short read sequencers, it had a better read length than the complete genomics and the solid sequencer, which is one of the reasons these combinations is why Illumina came to become the dominant player in sequencing technology. Also just library preparation is fast and very robust. The chemistry for just taking extracted DNA, adding all the adapters and all the preprocessing you need to do to put the molecules onto the sequencer works very well now and you have very few run failures. The disadvantage of Illumina sequencing is that because we're sequencing cycle by cycle there's this inherent limit to the length of the reads you get. The longest Illumina reads you'll get is around 150 to 200 bases. And while that's good for a lot of work that we're gonna hear about, if you're trying to do de novo genome assembly, which is where my big interest is for large genomes which have a lot of repeats, this read length is really limiting. The dominant repeat in human genomes are the Alu family of ruptured transposons. Their length is around 350 bases. That's longer than the read length of an Illumina read. So these repeats will cause you to have uncertainty in your genome assembly. They'll be ambiguity in your assembly graph and you won't be able to get around these read lengths due to this, sorry, these repeats to this short read. All right, so I'm gonna talk now about some of the long read sequencers. So the first one that came out was called the Pacific Biosciences Sequencer. It's quite neat technology. It's based on fluorescence and DNA polymerase, like the other technologies that we talked about, but it's doing what we call single molecule sequencing. So unlike Illumina, which amplifies the original template DNA molecules into clusters, the PAC bio sequencer is just imaging off of a single molecule at a time. And this allows it to sequence much longer pieces of DNA. So the way the PAC bio works is that DNA polymerase is embedded at the bottom of a well here and single stranded DNA can come in here, get captured by DNA polymerase, and then the polymerase will synthesize the complementary strand. And our fluorescently labeled nucleotides are just free floating in solution and they're gonna diffuse into this well and the microscope that's capturing this, the fluorescent signal is just measuring how much fluorescence there is in this individual well. Now they're gonna diffuse in here and when the complementary base gets captured by polymerase, it takes some time to incorporate that nucleotide into this synthesized strand of DNA. So it gets held there for the polymerase and what we see is this peak where we see a jump in the fluorescence for the color of the nucleotide that's getting incorporated into that growing strand. So here's what it looks like, the signal trace over time for two incorporation events. So the intensity is this low background rate from nucleotide that's just diffusing in and out of the well. But then when there's a true capture event for an A, we see this jump here and then for some amount of time over a few milliseconds say, we see this long A signal. Then when the incorporation is complete, the fluorophore gets cleaved off and it diffuses out of the well, drops back down to the background, background intel here, then a T comes in, gets incorporated, we see a jump in the T signal, then it gets cleaved off and go like this. Now because this isn't this blocking cycle by cycle chemistry, it's all happening in real time, we don't have this limit of read length. If you put 10,000 base pair fragments of DNA, the Pac-Bio sequencer will read those 10,000 base pair fragments of DNA. The caveat of this is that the signal isn't as clean as what we're seeing here and it can be difficult in some cases to see whether there's a true incorporation event or a molecule had just diffused into the well and lingered for longer than you expect by chance. So the error rate in the Pac-Bio sequencer is around 10 to 15% and the throughput when compared to Lumina is quite a bit lower. Now it's around five gigabases per run for the Pac-Bio. At fewer data, it has a higher error rate but you get much longer reads. Here's just a view of what the read length looks like. So this is a project that we collaborated with Cold Spring Harbor to sequence a breast cancer cell line with Mike Schatz's lab and this is a histogram of the read lengths for this breast cancer run. We see that there's quite a lot of sequences that are longer than 10,000 bases and even 20,000 bases with the longest read that we often this data set around 71 kb. This is much better if you want to resolve repetitive genomes because you don't have this problem of these short ALU repeats or other type of repeats in the human genome confusing your algorithms. So tomorrow I'm going to talk more about assembling data with long reads and we're gonna actually have it in the tutorial section. You'll have a chance of taking Pac-Bio data and assembling it using a program called Canoe but just a plug for how much better this is for doing assembly. This is a paper that was published in genome research last year of assembling a human genome using Pac-Bio data and they show just how much better the assembly is than if you did the same thing with short reads but we'll go into that more tomorrow. Okay, the last sequence we're gonna talk about is the nanopore sequencer is interesting in that it's a portable genome sequencer. It's small enough that you can take it really anywhere where you want to apply the sequencing rather than bringing your sample to these large genomics facilities that have these large Illumina Pac-Bio instruments set up within them. So I was involved in a project of taking this portable sequencer, this is the nanopore device here, to Africa to perform infield surveillance of the Ebola outbreak. So probably a lot of you should be able to get the Ebola outbreak in West Africa from 2012 to 2014. This is a guy who worked on the project Joseph Bohr, he's running an experiment, a sequencing run here. We took the nanopore sequencer into these field clinics and field hospitals, amplified the virus and then sequenced it directly in the field to give the epidemiologists who were trying to control the outbreak some view of how the outbreak was spreading in essentially real time. We can get the results back to them in a few days because of the fact that we take the sequencer directly to where it was needed. It doesn't use the DNA polymer to the sequence. It's more of a biophysical device rather than a biochemical. And the way that it works is that we have a protein nanopore, which is a protein with a channel running through the center of it, which is embedded within a membrane which is shown in black here. Now this channel in the protein nanopore allows charge carrying ions like calcium ions to pass from one side of the membrane to the other. And this flow of ions is inducing an electric current and this current is being measured at around four kilohertz or 4,000 samples per second. Now this channel is wide enough that single-stranded DNA can pass from one side of the membrane to the other and as this single-stranded DNA passes through this constriction in the pore, it partially blocks this flow of current and the instrument records how much current is flowing and we see the passage of this DNA molecule as a decrease in current. And the amount of current that is flowing through here depends on the properties of this DNA sequence that's in. Now something that my lab works on is taking the measurements from this device and then trying to predict what the DNA sequence was just using these current samples. So here's what the data generation process looks like. At some time, T zero, we have a sequence in the nanopore, which is G-C-T-A-C and we see a current signal of around 60 picoamps for a duration of about a half of a second. Now what we hope to see is as the DNA sequence moves through the pore by a single base, new sequence comes in, C-T-A-C-G and we see a drop in the current depending on the new properties of this DNA. So now with the currents has dropped around 45 picoamps and this DNA continues to slide through the pore, new sequence in here, T-A-C-G-A, current changes again and again and again. So are there constants for each base pair? It's not quite each base pair. So if we go back to this schematic, there's the depth of this channel is around five bases and the signal that you see is dependent on what those five bases are, which makes life for the informaticians quite a bit more difficult because you're not reading single bases at a time, it's this convolution of bases and it's not really like a linear function where an A adds so much signal, there's interdependencies between the different nucleotides which makes it quite hard to model. So the way that we model it is that we sequence DNA with known nucleotide sequence and then we say, okay, when the sequence A-G-G, T-A-G passes through the pore, we think this current signal should be drawn from this Gaussian distribution here, which is about 59 picoamps with a standard deviation of about a picoamp and a half. Now if we build up this profile for all possible six base pairs subsequences, which you do by sequencing known DNA, you can then reverse this process and infer what the sequence was using these current measurements. And right now we're using probabilistic models called hidden Markov models and I'm happy to talk to anybody who's interested in actual nuts and bolts of how we do base called nanopore data to solve this inference problem of going from these raw current samples to a base called sequence. And now we're also using newer methods called neural networks which you might have heard about as a new framework for doing machine learning that shows incredible accuracy on things like image processing and speech recognition. We're also starting to apply those models to this problem of trying to base called nanopore data. Okay, so just like Pac-Bio, the nanopore sequencer is measuring single molecules, which means that the signal to noise ratio isn't as good as the Illumina sequencer and that means the accuracy of our reconstruction of these base called sequences is lower. But for nanopore data it's been improving over the last few years. Here are three different versions of the nanopore chemistry. Two versions using what we call the R7 pore, one using the R9 pore and this is a histogram of accuracy for sequencing the Coli genome. For the early R7 data, the accuracy was around 80%, 80, 81%. So about 20% error rate, again, which is much higher than Illumina sequencing. But the introduction of this R9 pore, accuracy went to around 90 to 95%, five to 10% error rate depending on your sample, which is a bit better than Pac-Bio, but the Pac-Bio error rate is more uniform, it's more random, where the nanopore error rate is somewhat more biased, where some DNA sequences are much harder to call accuracy because of this biophysics of how the DNA sequence appears in the pore rather than the Pac-Bio chemistry errors are due to just the random diffusing of these nucleotides. So here's what a nanopore flow cell looks like. I didn't bring one of the sequencers with me, I probably should have, but they're the little desktop instruments, it's about the size of a USB stick. So on this part here is the array of actual nanopores, it's 2048 nanopores, any 500 of which can be sequencing at one time, so you can sequence 500 molecules, DNA simultaneously. In 2015, we were getting around 500 megabases of sequence from the nanopore with a read length around 6KB. With the latest chemistry, we now get around five gigabases of sequence, again with about 90 to 95% accuracy, as I mentioned, and the read length has increased quite a bit as well. Now we can quite routinely get 10,000 base pair reads from the nanopore, and if you're really careful with your DNA sample preparation, we've gotten up to 500,000 bases off of a single DNA read, almost a half a megabase of information in one continuous molecule, and that's something we're working on quite hard. Now, as I mentioned, the sequencing is quite portable. Here's an extreme example of that, yeah. So do you have any more samples that compete in the pore once something is actually approved? Yeah, yeah, exactly. So once the pore becomes free, another DNA molecule can come through. There's a lifetime to the pores, they can become blocked or the membrane can pop, but yeah, usually you sequence a few thousand DNA molecules per pore. Okay. Does that answer? Yeah, but then with those kinds of read lengths that you could, you're just put whole transcripts through and you can just sequence entire transcripts at a time. Exactly, yeah. So that's something that they just came out with. There's a kit for doing direct RNA sequencing. So usually, so OB and Malki will go into this a bit more on Wednesday, but usually when you sequence RNA and if you sequence on the Illuminate, you're actually sequencing cDNA, you reverse transcribe the RNA to cDNA, then you sequence the cDNA. With the nanopore, you can actually put the RNA molecule through the pore and you get to do that directly. So anything like base modifications of the RNA, you can in theory read those. Is the direction the RNA goes through? It actually, it goes through, I believe, three prime to five prime. DNA goes through five prime to three prime, but RNA goes through three prime. The reason is that you have to attach these tethering molecules to attract the DNA to the pore and with RNA, they attach them to the polyA tail. The error rate with, I'm not sure what the error rate with RNA is, I'd imagine it to be the same, probably a little lower to start with because a lot of the improvement in error rate was building better models of the data and to do that, you need a lot of training data. So RNA sequencing is just available in the last few months. The models are probably aren't trained as well, but just from the setup of the system, it doesn't seem that different to me. So I'd imagine the error rate should be similar. But you said that they use the polyA for a tether, like they are not much, so for non-polyA RNA, this is not gonna work. I don't think so, no. You'd have to do, like, see DNA and then go back, yeah. Right, so this is just an extreme example of how portable the nanopore sequencer is. NASA's interested in using DNA sequencing for things like diagnosing infectious disease during long-term space missions. So they sent the nanopore sequencer up to International Space Station. This is an astronaut named Kate Rubins who ran the nanopore sequencer on the space station showing that you get essentially the same quality of data as you do on Earth. Essentially works the same way. You need to attach it to something using Velcro so it doesn't float away during your sequencing run. But other than that, you can do sequencing in space. Okay, let's summarize the different sequencing technologies. So the Illumina 100 to 200 base pair reads, you get a lot of reads up to 600 gigabases per run. You have a very low error rate, around maybe a half of a percent to 1% packed by an oxygen nanopore. It's single-molecule sequencing without amplification. You can sequence incredibly long pieces of DNA. You get between five to 10 gigabases per run, but with a higher error rate. Something I didn't mention in detail and after listening to what your guys interests are, I should have is that the pack of all oxygen nanopore can both detect modified bases, so methylated bases. If you put human DNA in without amplification through the nanopore, you can distinguish between cytosine and five methyl cytosine just based on these current signals and how much current flows through the pore without having to do things like bisulphite treatment. Again, this is another big interest in my lab and we just published a paper showing how we can do that with fairly high accuracy from nanopore sequencing. You can also do that from packed bio sequencing as well. And again, just my caveat that all of these things are improving essentially constantly. So well, I say 600 gigabases and five to 10 gigabases here, take that with a grain of salt and then it's probably improved since I started giving this talk. That's my last slide. Do you have any more questions? One in the back? Yes, DNA polymerase. So the pack bio is, sorry? It's measuring fluorescence. Yeah, it's measuring fluorescence. But this is essentially the duration of how long it takes DNA polymerase to incorporate a T. And if it's methylated, that incorporation time is slightly different. So there's certain methylation types of pack bio is quite good at detecting. Other ones, it's not as good at detecting just because they don't have a really strong signal of how much the incorporation increases or decreases, but it's based on this, the duration of this pulse. Right now we're just, in our model, we just call five methyl cytosine. So the one, the predominant human methylation. We know that there's a different signal for adenine methylation and for five hydroxymethyl cytosine, but our model and our software that's available only calls five MC right now. But we're planning on calling other types of methylation. It's just a matter of getting training data to train our models. And five MC is by far the easiest one to generate training data for. Yes. Yeah, so the question just for everybody else is, so this is an idealized view of how the nanopore signal looks like. But DNA, natural DNA has damage. There can be thymines that are cross-linked to each other. You can have a basic sites where there's not even a nucleotide to it. And that changes these currents that we observe. So sequencing naturally occurring DNA typically has a higher error rate than sequencing amplified DNA just because the amplification would get rid of all these extra artifacts that are present in the DNA. The downside of that is that it also gets rid of the methylation, which I'm going to Cancer Research Institute. We want to sequence a lot of cancers. We want to look at methylation patterns in cancer. So typically we want to sequence the natural DNA without paying this cost of getting rid of, or so while paying this cost of having slightly higher error rates. Right now it's 450 bases per second. So originally the very first instrument they released commercially. It was 30 bases a second. And then they've progressively moved it up to 70 bases a second, 250 bases a second. And now it's 450 bases per second. I think ultimately they want to go to 1,000 bases per second. Is that just three or four? Yeah, so something I didn't mention is that this poor complex. This is what they call the reader protein. And this is the motor protein. And this is actually acting as a break to stop the DNA from going through too quickly. If you didn't have this on here and you just allowed it to pass through the poor, or if you had a solid state natural poor, which isn't biological, it would go through at something like 20,000 bases per second, which is far too quickly to actually register any sort of signal changes. So this is a DNA helicase, which unwinds the DNA. And it's slower than... So the electronics can only sample it at I think 4,000 samples per second. So if the DNA is going through 20,000 samples per second, obviously you're not getting... Yeah, you're skipping a lot. And that's why I think the limit is 1,000 bases. Is that you need a couple samples redundant to be able to actually accurately call the sequence. Yeah, good question. So nanopore, the flow cells that I showed here, if you buy one at a time, they're about $900 and you'll get around five to 10 gigabases of data. If you buy in bulk, if you buy I think 48 at a time, they're around $500 per flow cell. So there's some discounts there if you buy a lot of them. Pac-Bio, I don't know the exact cost for SQL. Do you know? Anybody know? No, well the machine's quite expensive. So one thing, the nanopore, the machine, the instrument itself is essentially $1,000. So you don't have to put a lot of money upfront. For Pac-Bio, the machine is hundreds of thousands of dollars. I don't know what the reagent cost per run is though for the RS2. I think it's around $300 per run, something in there. Can you get again like 500, sorry, five gigabases per update? Maybe not for your reasons. Sure, yeah. There's two companies, one which is sort of taken over the market of doing library preparation before alumina sequencing that allows you to get much longer range information. And the main one now is called 10X Genomics. And what they do is they use droplets that single DNA molecules can be put into these droplets, barcoded such that you know that all of the alumina reads came from the original same DNA source molecule. And these source molecules can be hundreds of kb in length and you get much longer range information. Because you know all of these alumina reads came from the same 100 kbps. So if you're doing things like genome assembly where you need long range information, that's quite handy. If you want to phase SNPs, which means determine which parental haplotype the SNPs came from, these 100 kb molecules are quite useful. And also for things like structure variation which we'll hear about later on as well, the much longer range information is useful there. Now these instruments are a pre-processor for alumina data. It's a way of preparing a library in special way before running it on the alumina sequencer. And I think again the cost is something like $500 to run to build a 10X library to then go on to your alumina sequencer. There was another company called Molecular which I was involved in that alumina eventually bought which did a similar technology where you barcode individual fragments of DNA. These fragments were much shorter, around 10,000 bases and then you'd reassemble them informatically to get the full 10,000 base sequence. That's not used so much anymore. And the 10X is the main long range linked read application.


The Toronto Blue Jays are in the Bronx and they're beating the Yankees three to nothing but the Yankees have runners on the corners and the tying run at the plate in Jean Carr, Lowe, Michael Cruz Stam. He is ready to hit the pitcher. Jimmy Garcia is ready to pitch.  If not, you go to getromand.com slash Johnboy and they'll help you out. They sponsored this video first pitch to stand in little two seamer. Strike, next pitch. Little two seamer, ball, next pitch. Little two seamer, strike, next pitch. Little two seamer, ball, next pitch. Little slider, home run, tie game. Three to three is the score. Into the short porch, this guy gets it. He celebrates. This kid had the perfect sign and Stan thought it was a change-up. He says, I didn't think, I wasn't thinking he was going change-up. It was his change-up and it fucking, we'll never know what he said. It can only guess. First pitch, fastball to the next batter. Next pitch, oh, hits him. Now the catcher and the umpire both react immediately as it hits him in the arm.  But anyway, the umpire, he goes, time!   Let me get him this top rail and yell at you. What are you doing? Get out of here. Should I jump? Should I go on the field?   Don't worry, we're taking notes. Umpire says, judge, simmer down.  And G says, yeah, yeah, yeah we do. Now the umps are talking and this ump behind the plate ump is talking to the crew chief and he's telling him a little story, a little tale, the backstory of what he thinks just happened. And I'll share that with you here. I'm gonna tell you exactly what they told me. So that the reason they thought that Jimmy Garcia threw at Donaldson was because Heinemann and Donaldson were yelling at each other in the 15 or something. So we decided, they thought we threw at Donaldson in the tie game and up to the home run. Yeah, we had a discussion for sure. About what? Baseball.  Was it a contentious discussion or? Hey, I mean, we're competitive. We're competing out there. So, I don't know, it just depends on how you interpret it, I guess. Josh, is there anything between you and Heinemann before tonight? I don't even know the guy. I don't even know, I didn't even know that was his name. Never heard of him. So I combed through the bats. It's the only thing I could find. Donaldson takes a while to step into the box and the catcher's kinda looking at him. Maybe they're talking, maybe they're not, but Donaldson did say they did exchange words at one point and then Donaldson strikes out. I don't know, I don't know. But that's what he says. And then Judge says, throw him out of the game. And the ump says, you know what? Maybe we will. You, you're gone. What?  Hey, and Charlie Matorra's gonna run out smiling because he can't believe it. What's going on? As he runs out, his pitching coach is not smiling. He says, calm down, calm down. Pitching coach starts screaming in the background. Boom, you're gone.  Get out of here. So I don't know what he was yelling, but he's gonna come out and he's got the cutoff hoodie, which is a great look, the cutoff hoodie. And he's mad. Let's be honest. That guy, he enjoys being mad every now and then. You know, look at that mustache.  That's what he was saying. We'll never know how we, we'll never know what was at the very end of that.  Who knows?  Could have been horrible.  Let's just get out of here. Nothing for us here. Now he tells him the story and he says, oh, okay. That's either a really funny, okay, what? Or he's saying like, who did? And the young says they were going back and forth and they were talking. And that's what I heard in boonies. Like I'm bored. He says, hey, you have to leave, leave. Cause the pitching coach came back out and come on, man. We know you like being mad from time to time, but you got ejected. You got to leave. Don't delay it. Talking to fans in the outfield board or what? You want me to sign it? I'm just telling you what I heard about.  And he's like, we have to take him out of the game. We had to. I don't think they had to. Boonie, bored. All the other Yankees just laughing and smiling. Like, yeah, if we didn't get that mad, do you think they eject them?  And then Rizzo and judge like, you know, fist pump there. I don't know. Later on, top of the seventh inning tie game, still Johnny LeWisega on the bump, Bo Bichette in the plate. This ball is up and in and he goes a little matrix reaction to it. And everybody's going to be pretty upset about this one. It's not head high. You know, I think Bo admitted like he didn't think this was intentional, but scary. I don't know. There's warnings in the game. So all the Blue Jays coaches are like, well, what the hell?  Come on. Why warnings then? By his face. There's warning, right? Call a timeout then. Get together and talk about it and eject them like you did our guy. Nope, we'll just eject you. You go, well, who? Who? You? Me? Oh my God.  What? With a smile on his face again. Two times just walking out after ejections smiling for what? What are you doing? I'm says, because you can't argue.  He says, I know, but you can't argue. He can't argue warnings, I guess is what he's saying. But then they're like, why does this game even have warnings? It's a good point. All the ejections are pretty brutal here. I don't think any of them were warranted at all. Ums just weren't ready for the game, but judge, he's ready for the big moment at the end of this game. And if you're not ready, when it's your turn to perform, then you gotta go to getromand.com. You'll get $15 off if you're prescribed. You'll talk to a US licensed healthcare professional and you get it taken care of and you'll feel great about yourself. You know who else was ready for this at bat? Me, because I got off the couch, I turned on the camera and I said, I'm gonna walk through this one because I think it's gonna be a doozy. This is awesome. Judge up. If it's a homer, it's a walk off. It's a double, not really speed on the basis. He's walking a lot of guys. So I feel like they're just in a mound visit. Probably said, don't throw the fastball. Oh, I did.  You get to think the batter sitting fastball. So I thought the mound visit was probably like, don't open them up fastball. Now, what do you do? I think you got to double up that slider, but that was a hanger. That was only a strike his judge was taking. He did double it up. He did double it up. The outside corner of this ball, look. That was the pitch, man. The first one, judges sitting fastball short. I think you triple it up. You put this one low and away and you try to get him swinging. Let's see what he does. Low, down. All right, so now you're in a predicament. Three sliders in a row.  As you go, there's only two pitch pitchers. So it's not that crazy, but do you go four? Or do you try to sneak a fastball by him now? You still got room to work with. It's only a one, two count. So you can go up in the zone to change his eye level to then go back to the slider. That's probably what I'd call high fastball. Let's see what they throw. Nope, they're not doing that. They're going slider again. Oh, he went fastball and judge found it back. I don't really like that pitch. Now you gotta go back to the slider. You see that catcher-deak? You went up, down, up, down. Slider again, I think.


Nigerians are grappling with galloping food prices which have only worsened following the announcement by the federal government to discontinue petro subsidy payment and the value of the official exchange rate. Plosivikru went on a market survey to feel the pulse of both buyers and sellers alike. Plosivikru's correspondent Destin Amomo brings us more in this report. This is our job market here in Etiosa, Lagos, Nigeria. The traders as well as the consumers are complaining about prices, the price hike of commodities and they are begging the government to ensure that things get better for the citizens. I went around the market to investigate how the biting effects of inflation is telling on their commercial activities. With a quick look at them, it is a tale of low patronage by buyers as they complain of the staggering cost of staples. Traders lament, dwindling sales. A bag of rice sells for almost 60,000 Naira and a healthy cow sells for about a million Naira resulting in the price hike of beef. It's not that good at all, it's too bad. I've been saying today and now, when we buy one market today, tomorrow, not the price of the market, we buy it again. So everything used to deer every now and then. That is why the market is not moved at all. Please, we beg them, make them help us about this market, about all markets, not only one market because everything is too deer. Things are not moving when the economy was, everything is so low. So just like pray to our government that will make things easy to people. When something works easy, people will like, okay, everything will germinate but when we buy something like, if you want to buy something and people will hear the complaint, this thing is too cost. The thing make will be like that, they say the back governor, president and other people will help us from dollar, open border. So maybe even that thing, this thing happen, everything will condense more. Some buyers express their displeasure. I don't like this period we are now. I don't want to say more than, I just don't, I'm not enjoying this period. The price that they are calling the bag of rice, I don't understand. As I continued with the survey, some pensioners complained about the palliatives promised by the federal government. They are yet to receive them. Alas, they are barely surviving amidst the hardship. It makes things good for the people because there are a lot of people who come to the market and there are a lot of people who cannot eat. If not this pension, at least it's sustaining me.  Is it the same for us? Is it the same? Is it the same? Is it the same? Is it the same? If it's the same, it's the same. We agree. If it's Nigeria, it's Nigeria. If it's Nigeria, we cannot continue like this. At least my age, over 50. I have to be silent. Play long enough and down because I want to eat. It's not down to 90 cents. result of environmental infractions, the Alloja Rovaca market in Ityosa local government and other officials speak on how they have been able to manage their market spaces effectively. I assume this market is not organized. They are just doing everything, but they always make the government, the environmental everything to circulate. So we don't always obey the rule and the relation of the government before we hear that I need to want to have to set up our everything up. From the first angle, you know, what to eat must be hygienic. Something you take in, you must be hygienic with it. That is why we have monitoring for feed in the area of environmental sanitation, we have tax force team in the area. We also have an executive that communicates in that area. Residents are hopeful of a turnaround soon as they also grapple with the poor state of roads, multiple taxations as well as high cost of transportation. Here in Ityosa Aja market, Lagos, Nigeria. Hello, hope you enjoyed the news. Please do subscribe to our YouTube channel and don't forget to hit the notification button so you get notified about fresh news updates.