So, I will quickly go over some questions that have been answered in the meanwhile before we go on to the subsequent sections. So, question is, so let us try this, switching over to the terminal, I will create a simple list. Now, let us check for float 3 in L, so what it is actually doing is it seems like it is checking the values, but to look at the details of why this makes sense and why this does not make sense, I will answer this question if you remind me in a little while, after I finish a little bit more of the content, I will answer that question. How to fix a type for a variable rather than letting the interpreter assign it by the value given to the variable, you cannot, short answer is you cannot by default in python, there are some strategies by which you can do certain things like that, but more often than not it is not all the time necessary to fix a type, there is no need to fix a type. Python 3 has some optional type annotation, but it is not still a mechanism to fix the type. How do you see the existing variables where in a particular session in a file, so it depends on the context of what you are trying to do and where you are trying to do it. In an ipython session, I think there is a command called who or whose, so if you look at this, who says print all interactive variables, so I can say percentage who, it will list to me the current variables in the ipython session, if that is what that is one answer for how to see existing variables that are defined, but that is an ipython convenience, it is not a built in that is available in python. So with that I think I have answered most all the questions, there are some things that I will revisit as I said once we get back, once we finish some more content. So let us move on to more content. So let us move on, so what we have next is strings and then we will do conditionals, loops and then come back to lists. So depending on where we are certain questions of yours will be answered, but I would suggest you wait for me until lunchtime, I will pause before lunchtime for a little while and we will ask detailed answer detailed questions. So let us move on to strings, more about strings, so anything within quotes is typically a string and to create a string variable you can do it in multiple ways, single quotes, double quotes or triple single quotes or double quotes and strings can be of any length, either single character or a null string any of that will work. So look at these examples, look at the slides, this is a string, it is a perfectly valid string. Please note that this quotation mark you do not have to put back ticks, it is always forward tick that is the quote that is below the double quotes the same character, usually on the right side of your keyboard, it is not the back tick which is near the tilde, so it is this character next to your return key typically. This is also a string actually there is a mistake here, this should be double quote here, there is a mistake here, this should be a double quote, yeah so this is a string too, so I will maybe type out the code on the terminal, notice that I close it, so whatever you open it with you must close it with, notice the triple quote, same quotation mark you put three of them that will be a string, similarly you can do it with three triple quotes, three double quotes instead of single quotes, this one is an empty string notice that comment denotes a hash denotes a comment that is in line. So why do we need this, why do we not need it will be obvious in a little while, so first thing is if I do double quote, inside a double quoted string I can put single quotes, so I do not have to do this back slash quote and all of this stuff, so it reduces the need for escaping, typically one line single quoted strings can only be one line long and if you want to put multiple lines you have to back slash, so for example let me try this, go to switching to the terminal, this is a very long string that I must escape with these silly back slashes, I made a mistake there, so close it with the same quotation mark, now this works, now notice that it is a pain because if I want to reform at this text I cannot do anything, whereas I can say a is 1, 2, 3, I can put as many new lines as I want. Now notice that in this case I did not have to worry about all of this, so triple quoted strings are super convenient and this could work for any of whether it is double, double quoted three double quotes or three single quotes it will be the same, it will allow you to write multi line documents, so the advantage is if you are writing documentation for your functions for a python code typically it will be in a triple quoted string, very convenient. So, moving on let us try to do assignment and operation operators with strings, so switching to the terminal let me clear the screen for you, so let us say a is hello and b is world, notice that as we discussed before c is a plus comma space plus b plus exclamation mark and notice that here again it does not matter what quotes I use, if it is a string I can add it, there is no sanctity about this string as that code, that string as this code you do not worry about all of that, now c will be hello world, so first part that we have done here is only the addition of strings, we have already seen this, the second part becomes interesting, so let us look at switch back to the terminal and look at a is hello, what happens if I do a star 5, what do you expect, normally I would expect an error, however if I say a star 5 there is one obvious way that all of us know that would be correct, a star 5 should simply be 5 copies of the string, correct, but then what about a 5 and a half, this has no obvious answer, how do I take half of a string, how do I take 0.23 of a string none of those has meaning, therefore if I do this it will tell me there is an error, a into 5 and a half will be a type error, it does not know how to multiply a floating point in a string, but it does know how to multiply a integer and a string, but what about a into a itself, again that has no meaning, cannot multiply sequences in non integral types of string with string, right, so basically most often if it is something that has an obvious way to do it and there is a good reason to do it, it should be doable, so know that you can multiply strings by integers, but not by floating point numbers, obviously you cannot multiply integers, similarly if I have a, a minus a, a plus a is fine, right, but a minus a does not have any meaning, similarly division all of those do not make much sense in this case, so how do you access the elements, switching back to the terminal, print a of 0, okay, let us switch back to the slide because this is sufficiently illustrator, what do you think a of 0 should print, it should print the first character, 0th index, it will be h, a of 4 will be the fifth index and what was a, a is hello, so the fifth fellow in a is o, a of 0 is h, a of 4 is o, now what is this minus 1, a of minus 1 is the last index, so often I want to go to the last to the end of the sequence, how will you normally do it, you will have to say a of length of the sequence minus 1, that is one way of doing it, right, which is stupid, instead if I can say a of minus 1 it will give me the last element, a of minus 4 will give me the 4 ones from the last, so it will be, what do you think it will be, a of minus 4, so one little trick before you try something to learn better, you first you ask yourself what the answer will be before you try it, do not just blindly type it and do it, it will be e because minus 1, so look at it this way, I will switch to the, I will switch to this writing pad, so I am going to write now here what we have is a is equal to h, e, l, l, sorry my l looks like an e, o, okay, now if I notice what are the indices associated with each of these, so let us look at the indices, so this is 0, 1, 2, 3, 4, okay. Similarly, what is this, it is also minus 1, minus 2, minus 3, minus 4, I think this should make it very clear as to what is happening, okay, so when I say let us switch back to the terminal, when I say a of minus 4 it should give me e, when I say a of minus 5 it should give me h, when I say minus 2 it should give me l, so on and so forth, so first question we have is what is a of 75, let us do not type it and hit enter, think about it for a second, what should it be, so what do you think it should be, if it is a good programming language some people may think oh it should wrap around, you do 75 you keep dividing by 5 and then give me that is a stupid way of writing, do not ever write a language like that because nobody will know what is happening, it should give me an error, so if I do this it will say index error, string index out of range, okay, very sensible, what about minus 24 or 35, that should also give me an error, okay, so which means yes, negative indices are supported, but negative indices have a context, positive indices can be from started 0, all the way to length minus 1, anything beyond that is illegal, negative indices started minus 1, go all the way to minus of the length, okay, so indices again make a lot of, it is a sensible way of looking at indices, positive and negative, once again go back to the white board, we look at a, it is hello, now please remember this applies to sequences in general, any sequence, if it is a list or a tuple, if I have 1, 2, 3, 4, 1 is the first, the value of the first index, so it will be 1, 2, 3, 4, so may be I will write it down here, so if I have L is equal to bracket 1, 2, 3, 4, okay, now this should also help you understand your slicing, so when you look at A of 1, 5 or something like that, you are essentially slicing inside the index domain, you are not slicing inside the value domain, you have to make sure that you remember, keep that in mind, so similarly I could supply indices in my slices which are negative and that is also legal python, so I can say start at minus 3 and give me all the way to the end, you can do that, fine, so now we know how to access the elements both with positive indices and negative indices and we understand that if you access something crazy, you will get an error and the error is what, switching to the interpreter, you clearly see that the error is something called the index error, notice here, every error in python has a name and typically it is used consistently throughout the language, so if you see an index error, it will mean that you have given it an invalid index, string index out of range, please remember these things, these details I am spending time explicitly showing you several things, so that you are able to follow, please try to make an effort to understand it, so now getting back, how can I change the elements, so let us try this, switching to the interpreter, A is hello, A of 0, let us make it uppercase, problem, it gives me an error, it says string object does not support item assignment, that is the error message, type error, the string type does not support object assignment, so let us try this with a list, L of 1 equals 0, this works because list types support item assignment, string types do not, the term that is used commonly in python is called immutable, there are certain objects in python like strings and tuples that are immutable, so for example if I have a tuple 1, 2, T of 0 equals 1 is also invalid because a tuple is also considered immutable, you cannot change a string in place, you cannot change a tuple in place, so strings are called immutable quantities, do not ask me why strings are immutable, why tuples are immutable, that is the nature of the language, strings are considered immutable, if you want to make something mutable, there are ways and means by which that can be done, so we will discuss those techniques later on, but in python just remember the fact, it is a fact strings are immutable, why it is this, why not that, you can do exercise, search, read up on Google or ask Guido if you are interested, this is not the time or place to discuss the details of why strings are like this, there will be several design decisions like this made in the language right through, specifically strings you will learn later on that it makes life a lot easier if you are they are immutable, just but for the purpose of this course keep in mind that strings are immutable, you cannot change them in place, so now let us look at a little problem to motivate studying a little more about strings, I cannot change strings in place right, however let us see one thing, a is defined to be hello, what is the type of a, type is str, it is a string type, now if I do a dot tab, you will see that it gives me a variety of completions, a dot tab, now if you see all of this stuff when you want to quit, you press, you see this more in the bottom here in the shell, means that it is paging the content for you, press q to quit, it will quit the pager, now each of these things that you see here like a dot find, a dot count, a dot upper, all of these are called methods, so if you look at the slides says strings have methods to manipulate them, so these methods allow you to do certain things with the string object, we will look at this, but to give you context we will give you a little problem, let us look at the problem, we are given a list, the list's name is called week, it contains names of the days of the week and you are given a string s and you have to check if the string is a day of the week, now we should be able to check for any of the forms like, so I could say sat, capital S A T, small S A T, Saturday or I could say capital Saturday, I have to make sure that regardless of what combination of letters I use, so long as I give it at least three letters, S A T should be there, S is not enough because S could be either Sunday or Saturday, so I give it three characters, any three I should be able to use to compare, how do we solve this problem using Python, so first thing we need to know is, I need to know the days of the week, those days of the week are stored in the list called week, so let us create that list, firstly I can encode all of the days of the week so we look at this little while, assume that I have the week list created with the names of the days of the week, Saturday, Sunday, Monday, Tuesday, Wednesday, so on and so forth, now I am given this string S, so I have week and now I am given this little string S, we have week as a list, we are given S, I now need to get the first three characters of S, because I want to be able to say, if I will have the first three characters I can uniquely identify whether it is a Saturday or a Sunday, I can find the week of the day of the week, the second thing I need to do is, I need to convert that to a lower case representation, so let us assume that I have week given by sat, Sunday, Monday, Tuesday Wednesday, Thursday, Friday, let us assume that this is my week, I have all the days of the week, just three characters that is enough, I am given S, now S could be say Saturday, Saturday, first thing I need to do is, I need to convert this to, I need to get the first three characters, how do we do that, the answer is to do slicing, so let us look at some slicing examples to get you refreshed, so what is this going to give me, Q of 0, 3, 0, 3, what is the answer, so let us switch to the slides, I want you to give me the answers, Q of 0, 3 will be H E L, 0, 1 and 2, again remember the indices I have H E L L O, that is my string, these are the indices 1, 2, sorry 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, the last is 10, so 0 to 3 will require, so when I say 0, 3 that will translate to index number 1, sorry 0, is this clear, does not include 3, so it will give me H E L, the answer, now try this, try Q of colon 3, notice that in the second example on the slides, the 0 is implicit, it is not explicitly specified, if you type this you will find that the answer is the same as 0, which means if I do not supply the first index, Python will assume it to be 0, the third example is even more interesting, if I do not supply the last index, Python will assume the end of the list, plus 1, inclusive of the end of the list, remember that it is not the same as giving it length minus 1, it will be length itself, finally what if I ignore everything, I just say colon, it will give me a copy of the entire list of the string, exact verbatim copy, so the lesson to learn here is, start index optionally the default value is 0, end index exclusive of that end delay index, default value is the last end of the list or the sequence, and if I do not specify either it means copy, full copy, clear so far, is everyone clear at this point, last two examples introduce negative indices in slicing, so first question is, q minus 1 colon 1, what should that give you, so what is q of minus 1, it means give me the last index, but what is this ending index, it means ending index is 1, but is the last index greater than the first ending index, yes, in this case yes, correct, in this case q's length is some 10 characters or 11, 11 characters, so minus 1 is actually 11 colon 1, so what should it give me, let us try it, what do we expect, we expect an empty list, sorry an empty sequence, which is what I get, so let me elaborate this carefully again, so remember your indices are 0, go back to this screen, to the interpreter, shell, look at the indices, h is 0, d is number 10, what is minus 1, minus 1 is 10, so q of 10 colon 1 will be what, what is the value of the start, start at the 10th fellow, go back what is the last index to the first fellow, sorry second fellow, but clearly your starting index is beyond your ending index, so you cannot put it anything, this is like saying for a for loop, your starting condition is, starting value is bigger than your ending condition, it will not even go into the for loop, correct, same way, when you specify the start index, the start index should definitely be less than the ending index, if not you will get nothing, it is an illegal, it is an invalid index, q of 10 colon 1 is, what about q of 2 colon 1, it should also be empty, q of 1 colon 1 will also be empty, why, because the last index exclusive, I am saying do not give me the last index and 1 is equal to that value, how about 0 colon 1, this has to work, is this clear, so which means, again the concept is I will again type this out on the interpreter, list of q of start optionally 0, I will leave the optionality part, start, end, exclusive and step, just remember this, so if the start value is bigger than the end or equal to the end, it will not get you any slice, so q of minus 1 colon 1 should be, q of minus 1 colon 1 should be empty, that is clear, what about q of 1 colon minus 1, q of 1 colon minus 1, so what should that give me, so it will start from E, L O space W O R L L or D, why not D, again remember the golden rule, end exclusive, end is minus 1, minus 1 equals 10, 10 is not included, so it will be till 9, so let us try it 1 colon minus 1, correct, so it is L O L, finally, what happens, maybe 1 or both of the limits is optional, so if I say what if I did this, what will I get, this will give me L, hello world or if I gave you 1 colon 0, that will give me hello world or if I did this, what if I did this minus 4, q of minus 4 colon minus 1, this should give me O R L, O R L, again golden rule remember, start and exclusive step, what if I did this quiz question, minus 4 colon 1 empty, why, it was a long string, what about minus say 25 colon 1, so now, now is where things get interesting, now is where so if I did q of 1 colon 175, the index is valid, is invalid, but the slice is okay, because you are saying give me everything till that, if nothing is there, fine, do not give me anything, similarly minus 25 will work, it will basically go to the start, so again imagine it as, so do it this way, if there is a negative index, translate it to the equivalent positive index, remember start colon end exclusive step, that is it and you will understand exactly what slices are doing, okay, so again we will do slicing when I do lists, so and then umpire arrays later on you will do, so we will proceed, we will move on, I think now you should understand, I have a reasonable idea of what is happening with slices, now the only thing additional we have not done is striding, I have not spent too much time, so the slicing part remains the same, the first two indices, the only thing that changes is the step, so can you tell me the answer for each of these, q 0 colon 5 colon 1, q is this, q is this, q of 0 colon 5 is hello, right, what is this q of 0 colon 5 colon 1, remember it is a step, I am stepping by 1, so it should be hello, so this is the same, what about this, so this should be h skip e, go to l, skip l, go to o, h l o, what about this guy, this will be h l simply because the third step goes beyond, it becomes 6, it becomes h l, what about this, h 0 colon 5 colon 4 should be h o, right, because I step by 4, I go straight to o, what about 0 colon 5 colon 5, this will be h, what do I make this 50, it will still be h, okay, so we have answered this question, now similarly what is 0 colon 2, 0 colon 2, again remember golden rule, if index not and middle fellow not specified, it means end, so h 0 double colon 2 will be h l o w r d, it is basically skipping every second fellow in between, what about this, if I do not specify first, it will be the same, if I do not specify the first it is 0 and I do not specify the second index, it means give me the whole thing, but skipping every 2 places, what about this, this will be same thing skipping every 3, skipping every 4, skipping every 100, remember when I do skipping by 100, it will give me the first one and then skip by 100, it will find nothing at the end, okay, so let us now look at q of 5 colon 0 colon minus 1, what will this do, start at 5th index which is o, right, so let us print q, q is hello world, q of 5 colon 0 colon minus 1 and now making a negative step, what will this do, so this will start at o, go all the way to 0 excluding 0, step in minus 1, sorry, actually the 5th fellow is space, h is 0, e is 1, l is 2, the other l is 3, o is 4, space is 5, so 5, h q of 5 corresponds to the space, space o l l e and it stops there, because do not include 0, okay, so let us try this now, 5 colon colon minus 1, this notice will now include the first element, not the last element, if the index was positive, this will be what, this will be world, so if you do not specify the default does magic, it could be 0, it could be minus 1, right, depending on or sorry, it could be the last fellow or it could be the first fellow, depending on what the sign of your step is, as far as you are concerned, if you do not specify it means end of whatever be that sequence, okay, finally q of colon 5 colon minus 1, right, again I will repeat this, came off in separate line, because I am counting in the negative direction, it will assume that the start is the end, so it will start at d, go all the way to the 5th fellow, and the last example is this, what will this do, this will reverse the string, okay, so the step size determines what is the first and what is the last, this is a positive step, okay, by the way, what will this do, minus minus colon colon minus 2 will give me skipping by 2, but in the negative direction, but for the whole copy, is this clear, so now what is the golden rule, this is correct, but modifier is defaults depend on sign of step, does this make sense, golden rule is q start, end exclusive, step, the step size sign determines what are the defaults for your start and end, so if you do not specify start and the default is positive, it will be 0, if you do not specify end, step is positive, default will be last plus 1, if you specify step as negative, it will be reversed, that is all, so it makes perfect sense, once you start reading this code, it will be a kind of obvious to you as to what these strings are doing, but this is very important that you understand slicing and sliding well, because it is a frequently used operation in Python, so someone has asked me to please re-explain q of minus 1 colon 1, so let us look at that q of minus 1 colon 1, so what is happening here, start is minus 1, minus 1 is at what position for our current string, it is the end, it is some 10 or something, so it is basically saying 10 colon 1, I have not specified the step, therefore by default the step is considered to be plus 1, so it will start at the last fellow, go in steps of 1, but he will check to see if the last fellow or wherever he is starting the index he is looking at is smaller than the end, which is 1, 10 is not bigger than 1, therefore this will give me an empty string, that is I will repeat, your starting value is minus 1 which is 10, your ending value is 1 and you want to step in steps of 1, obviously this is going to give me an empty string, because your starting value itself is beyond the range of what you want, on the other hand if I did this with a minus 1 then everything is different, this means start at the end, go all the way to the first, second character in your string, so it will be world in reverse without h and e, why because again remember the ending index is not inclusive, end is exclusive, it does not include end, so I have spent plenty of time now on slicing and striding, beyond this if you need some help, I think you can ask your local coordinators, we have spent a lot of time on this, I think it should be fairly clear now, I have drawn pictures, shown you several examples to illustrate the point. So, the next important thing is how do you convert this string to upper case, lower case, so it turns out as I showed you this queue fellow has several methods, so an edit tab it gives you lot of these underscore fellows, I say queue underscore some l e, all of these you please ignore, in some of your python sessions it may not even show, you may not even get these underscore, depending on your version of i python it may or may not show, so if it does not show well and good, but look at all the ones that do not start with an underscore, look at queue dot capital s, queue dot center, queue dot count, queue dot decode ends with all of these, all of these are called methods, so queue dot let us see there is something called lower, so queue is this, queue there is also something called upper, how do we find out what upper does, you do queue dot upper question mark, hit enter it will show you that s dot upper returns a string, returns a copy of the string converted to upper case, so let us try it queue is this, queue dot upper, now you have to call it like a function, so put open bracket close bracket enter, hello, so queue dot upper, now this itself is a string, so I can say x is queue dot upper, x dot lower, I can compress this into one same call, I can say queue dot upper dot lower, it will be the same as queue in this case, so two things important, one is most objects in python will have something where you can do dot and will have several methods that you can call, dot tab will present to you a list of all the possible completions, so if I say queue dot c tab, it will only show me the completion starting with c, so capitalize then I can tab complete and hit question mark, it will show me documentation title return to titled case version of s, so basically queue has methods that you can use, these methods in the case of strings will return, typically will return new versions or new copies of the string suitably modified, so if you do queue dot lower upper, you get a new string, the second important thing I showed you is, when I do queue dot upper, queue dot upper returns a string which is upper case, that itself has a dot, so string, so I can do queue dot upper dot lower that also will work, I can keep doing this, the reason is when I do queue dot upper, it gives me a string, that string also has a lower method, the lower fellow also gives me a string that also has an upper, so you can keep composing methods using the dot, it is important to realize, if you look at the slides strings are immutable, which means all of the methods will not modify the string, they will give you fresh copies of the string, so what is the solution to the problem that we had, I would not go to the solution, we had, so let us go back to the problem, given a list week, containing names of the day, the week and the string s, check the string is a day of the week, so what do we need to do, get the first three characters of the string, so what is s, s is Saturday, how do I get the first three characters, s 1, 0, 3, or I do not have to specify the 0, I can specify just colon 3, this will give me the first three characters, now this is nice, now do you understand why they do not include the index, I can say the first three characters is not 3 plus 1, not 3 minus 1, none of that, it is simply s colon 3, it will give me sat, now what do I need to do, convert it to lower case, notice that s colon 3 is also a string, so I can say s colon 3 dot lower, now how do I check whether this is the day of the week, use in, so s and be lazy, so use up arrow, get the previous line in week, what was week, week was all these days and now remember I converted it to lower case, because my week has stored everything as lower case, if my week had stored everything in upper case, I would have to suitably store everything in upper case, does this make sense, so we have the solution to our little problem, it is two lines of code, week is defined as this, s colon 3 dot lower in week, notice that you can do it in another way, you can say s dot lower colon 3 in week, this is also equivalent, obviously what is going to be obtained is different in each, s dot lower will lower case the entire s and then take the first 3, this will first take the first 3 characters and then lower it, that is the only difference. So with this we have looked at strings slicing, striding and a few of the string methods and we have solved a little problem, so let us look at some more additional useful methods that we think are useful, strings have many methods, we are not going to dive into each of them, how do you explore these methods, how do you find out more, so you do q dot tab, find whatever you are interested in, the other thing you can try is, if you want to say I want all the fellows starting with say title, you can do q dot star whatever substring, it will try to match and then put a question mark, it will tell you all of these methods are available, I am going a little advanced here but this is a useful trick to know, so I want to find all the strings that have, all the methods that have count, there is only one, anyway so there are several methods, one of the methods is called join, so let us see what join was all about, let us move back to the slides, supposing I am given a list of strings, we wish to join them into a single string, possibly each string separated by a common token, sometimes it could be a comma, it could be a colon, it could be a semicolon various things, for example I have a list of email addresses, this is a list of strings separated by commas, I now make, want to make this into one big string saying name semicolon, sorry email, semicolon, email, semicolon, email, so let us create a simple example for this, I will use a slightly different example to be lazy, banana, apple, some three fruits, I want to join these into a, make a string out of this, so there is a method called, I say what is this, what have I created now, open quote, comma, sorry space, close quote, what is this thing, what have I created, if I said x is equal to this, what would x be a string, I do not need to say x is equal to, so let us do this, dot join, this is a string, with the string it has a method, so I can say it has a bunch of methods, it has join in particular, if I now give it this list, it will make it into banana, this is equivalent to me saying, comma space, x, dot join, is this clear, just study the example once, I have created a list, the list contains three little strings of three fruits, then this comma space, this thing is a string, I am calling the strings method called join, and I am passing it this a as an argument, it joins all of these by putting a comma space in between each, notice that it is the same, so for example, it is done that, this is equivalent, the same one line of code is equivalent to me doing x is equal to this, y is equal to x dot join, it is the same thing, notice that if I did semicolon instead it will join with the semicolon, if I said no do not give me space, give me this, it will join it, or I could say banana is a fruit, apple is a fruit, orange, but notice it did not say orange is a fruit, so it will put this comma, this joining element only between two elements, so this is a useful method, so this we believe is, this is a very useful thing for you to know, there is one more thing that is useful, which is not quite here in the slide, it is called split, so let us consider this is a string, so first question what is x, x will be banana or apple or orange, what is y, y will be banana space apple, space orange, correct, now I want to do the reverse, I want a string that has these spaces or these separators, and I want to convert it to a list of those individual elements, so there is a method called x dot split, now let us look what split is, so x dot split says split and it has two optional parameters, one is called the separator, the other is called max split, max split says how many fellows should you split, both are optional, so what is it saying, s dot split returns a list of strings, it returns a list of words in the string s using sep as the delimiter string, if max split is given at most max split splits are performed, if sep is not specified or is none, any wide space string is a separator and empty strings are removed from the result, so let us see what this means, x is this, y is this, x dot split, what should it return, a list of words, in this case it is returning one word, how do I find the length of what it has returned, only one, notice there are no commas in this line, but remember I can give it a separator, so if I give it a separator as that r mark, now it returns three fellows, banana, apple and orange, similarly y dot split, what is y, y is this, now if I do y dot split, what should happen, so if you remember the documentation we read, it said if separator is not specified, any wide space is considered as a delimiter, so this will work, so this will actually give me banana apple orange, now let me try to split it on the character a, this will give me b n n p p l e orange, so basically it uses that separator as the character on which it is going to split, that separator character is going to be eliminated, as you see in this example, so if I do just split it gives me banana apple orange, so if you have say a string that is separated with semicolons or commas or space, with space you simply do split it will immediately split it, so let us try something little more complicated, this is a string with many new words and new lines, now let us do s dot split, notice that it has split it even looking at new lines, let me make this little worse, anything that is empty is eliminated, so this is a long string with many words, so if you have some long piece of text and you want to find all of the words, you can easily identify the words like this using, now I want to join this back, this is a list, I want to join them all back with, I can do that, just put space, notice that the new lines are all gone now, so join and split can be thought of as sort of complements of each other, just join a bunch of or a sequence of strings and you split a string into a list of substrings and you control how you split it based on the separator character, of course there is one thing you can do that we have not demonstrated, let us look at max split, notice that this is only split it twice, so I get this is and the rest of this.


So, thank you to the organizers for inviting me. I really enjoyed the meeting, and sorry the previous talk ran over, but it was my fault for asking some of the questions. And thank you most of all to the AV guy for getting my talk to show up. So, I'm going to talk at the beginning about, so I asked about what to talk about, and I decided to send in a title about work that we've done on synthetic yeast genomes. But after hearing the earlier talk about organoids, I decided to throw in an organoid bonus for work that is going on in organoids in my lab in collaboration with Andy Ewald. So, Sacromycea Cervicea 2.0. So, the introduction to this is that my previous life, before I was an academic at Johns Hopkins, I worked at a biotech company. The last product I worked on there was the 454 genome sequencer. So, it was really exciting at the time. This is a curve from 2003 showing that our machine was the world leader in DNA sequencing, only for a couple of years, however. So, then Illumina took over. So, let's see. Not there. So, this was our productivity, and then Illumina took over, and we had a couple more years on the market. But the curve I'll talk about is this yellow one, productivity in writing DNA. So, the same way that DNA synthesis has been increasing in efficiency, so has DNA synthesis. These curves are from Rob Carlson, who's a biotech writer. And that stimulated a project to make a synthetic version of the yeast genome called Sacromycea Cervicea 2.0. So, in order of appearance in the team, so the overall concept for the project really goes back to Jeff Bucca and Trinivas and Chandra Sagaron, who are having coffee one day and talked about possibility of maybe making synthetic yeast chromosomes. And shortly after that, when he was having trouble using DNA strider to design entire chromosomes, he asked me and my group to get involved. So, we've been responsible for the front to back informatics for the project. I got involved because I thought there would be some really interesting scientific questions. However, most of the time we spent writing workflow software. So, we did all the software to design the synthetic yeast genome to do all the ordering, to run all the laboratory, to automate as many processes as we could, and then to analyze the synthetic cells that we got out. Synthetic in that they have synthetic DNA. And then working with me were Sarah Richardson, who's now CEO of a synthetic biology biotech microbiome, Giovanni Strachodonio, who's now faculty at the University of Essex and Kunyang. And then other participants, Romain Kassoul, who's in the back and spoke earlier today, has been working on comparing the 3D confirmation of the chromosomes that we've synthesized with the native chromosomes, and then partners all across the world making different chromosomes. So, about a year ago, there were a series of papers. So, this figure was generated with data from Romain's lab showing the synthetic chromosomes organized in the nucleus in the sort of goldish color with the remaining wild-type chromosomes in sort of the sort of whitish-grayish-grayish-grayish color. So, we've made them, the cells work. Here is progress to date. So, yeast has 16 chromosomes. And in addition, we've designed and are making a 17th neochromosome that has all of the tRNAs on it. So, one of the changes that we made, I'll get through sort of the types of changes we made in the genome, but one of the changes we made is taking tRNAs from all of their native locations and putting them all together on one special chromosome with the idea that possibly the other chromosomes will be more stable because tRNAs are a place of DNA instability because of the high transcriptional rate, and then, I guess, DNA replication forks run into transcriptional apparatus and you get DNA strand breaks. Also, the idea of orthogonalization, that a lot of synthetic biology has been driven by electrical engineers who think about designing orthogonal components, and I don't think that idea has really gotten very far, but nevertheless, we've decided to orthogonalize the genome by putting all the tRNAs onto one separate chromosome. So, there you go. So, in blue are the chromosomes that have been completely synthesized, integrated into yeast cells, and are able to support the yeast cell life with fitness that is pretty similar to wild type, so no real fitness defects. Part of the process I'll talk about is the fitness defects that we found and what they were due to. In yellow are chromosomes that have not yet been completed, but all the DNA has been synthesized, most of it's been assembled, and some of the chromosomes are completed but have fitness defects that we are still tracking down and getting rid of. We have single cells that have up to three synthetic chromosomes at this point. There's been no real barrier to getting synthetic chromosomes into a single cell. The barrier is more that it goes through a myotic division which causes recombination between the synthetic chromosome and the wild type, and then we have to do back crosses. We, as in Jeff Buka's lab, does back crosses to get a fully synthetic chromosome. So quickly the changes that we've made, so house cleaning, we've taken off the original telomeres and we put on a universal telomere sequence. There's a lot of pseudo genes that accumulate in the sub-telomere. We've gotten rid of them. We've removed transposons and repeats, removed introns. So as I mentioned, we've got this neochromosome that has all the tRNAs. So this is an interim version of the neochromosome. We're maintaining the copy number of the tRNAs in the wild type genome, in the tRNA neochromosome, and sort of as we're doing the deletions, we're adding the genes to the neochromosome. So that work is being led at University of Manchester now by Patrick Tsai. So we're also doing synonymous recoding for two reasons. One is that part of the synthesis and assembly technologies have restriction enzyme requirements that either restriction enzymes are used to do part of the synthesis or assembly or for late stage, I guess like restriction ligation reactions. So sometimes we have to add and remove restriction enzyme binding sites and we do that with synonymous recoding or protein coding regions. We're also putting in watermarks that are called in our hands PCR tags that we take a protein coding region and we change the DNA sequence so that it is unique in, essentially unique in the genome really. It's the two, we have, so two recoded tags that are close enough together, a couple of base pairs that we can easily make a PCR amplicon to check quickly that the DNA content is synthetic as opposed to wild type. So this is actually one of the regions where reasons, this is one of the areas where we had to actually pull out some algorithmic work and make this run fast enough to be able to solve the optimal, the constraint problem to be able to get these to be unique in the genome. All right, so new capabilities we've done TAG TA, TA recoding so that eventually we might be able to introduce the 21st amino acid into the genetic code. And we've put in LOXP sim sites, so these are symmetric versions of LOXP sites that when Cree recombinases around permit recombinations in the genome to give inversions, transpositions, deletions, and all together there's about one million base pairs difference between the DNA we designed and the wild type genome as well as this additional chromosome. Why is the 21st amino acid? Why did you put the 21st amino acid? Oh, so this is getting rid of the TAG codon so then we can put in a TAG codon and have it and then introduce a tRNA synthetically coupled with an unnatural amino acid and then have an additional functionality in the protein code. So there are like more wilder science fiction-y type things to try to get all that apparatus working inside a cell and Farron Isaacs has done similar work to get E. coli that have been recoded to free up codons. Why would you remove the introns? Why would you remove the introns? So it turns out we can't remove all the introns. We thought we could but some give fitness defects. So we moved, most of these genes don't have introns and we thought it would be cool to get rid of the ones that are there. Because they seem to be sometimes clustered in important genes, right? So there's been other work and I don't remember the name of the group that did a project to systematically delete introns. Some introns you can't delete but not because of the intron itself it's because there's a non-coding gene in the intron and if you, so at least, so this is my, I'd have to go back and check my notes but that if you move that non-coding gene somewhere else then it's fine. So I'm, so I'm, don't hold me to that, that sort of, but there are other introns that people have deleted and a couple of them, I think they're five or six that when you delete the intron you get a fitness defect. Most introns you don't get a fitness defect when you delete. Part of the idea about deleting the introns and seeing whether some of the splicing apparatus then became non-essential, you know, is it just there for splicing of introns and protein coding genes or does it have other functions? So that was the general idea. This is, so I'm not really going to talk about the scramble experiments, so I'll, so the, so, yeah, so on the computer we take the sequence, we break it down to smaller and smaller pieces, eventually they get ordered, so they get ordered, then we receive them. At Johns Hopkins for a while we had a factory running with undergraduate labor taking the oligos received at that point from IDT and then doing PCR reactions to build them across to 600 more pieces and then build them up in succeeding stages of assembly. So the, these, these undergrads completed the synthesis of chromosome 3 published in 2014, so that, that was, that was really exciting, but the course is over now because all the DNA has been synthesized, so it was fun while it lasted. So here's a picture of what the design looks like if you want to make a figure for a paper. So these are different parts of chromosomes and these arrow things are protein coding genes, the green bands are the PCR tags we put in, the green diamonds are the lox piece and recombination sites, the red is an essential gene, these purplish are autotrophic, oxotrophic markers and, and so there you have the design. So, but we made some mistakes. So it is, it is a challenge to do all of this design and, and so yeah, so mistakes were made and I guess really they'd be my fault because my group did the computational design. So there are a lot of problems. So one is we don't really have any good models that map from sequence to fitness. So we just heard a talk trying to build up regression models that say here are the variants and here's the fitness. So those are still, you can't really do that. Also, trying to identify hyphenous sequences that obey synthesis and assembly constraints so those algorithms didn't really exist. We weren't, you know, sure exactly whether what we implemented was going to work well. Also the, the execution, just putting all of this together in a production pipeline. So when the human genome sequencing project started there were lots and lots of groups writing software to first, you know, look at gel images and get DNA sequences and then do all this assembly and, you know, sequence validation and instead it was a couple people in my lab doing all the design and then risk benefit. So this to me is the most interesting that in talking through the design choices so we just heard like why get rid of all the introns and so like one answer is like, you know, why not? But the, but there are other changes that, that we were thinking about making that, you know, we weren't sure, you know, pushing sort of the design goal of being able to test wilder things you can do with the genome versus worrying that we'll get dead cells out and won't have a way to figure out how to get them back healthy. So we wanted to, yes. You didn't mention the ribosomal RNA, you would use the corpus, right? The number? I don't know. I don't think we're really reduced the ribosomal arrays. That's my question. But use the number of this and make it a smaller chromosome. So, so I'll get to this later, but I'll answer it now. Actually, one of the fitness defects that we get with the tRNAs is that we don't have enough tRNAs in the cell because we're deleting them, but often we haven't added back the tRNA neochromosome. I'm talking about the ribosomal. No, no, no. So what we see is up-regulation of the ribosomal, of ribosome components to make up, to compensate for the depletion of tRNAs because we don't have as many copies of the tRNAs as we're supposed to have. So if we further reduced the ribosomal arrays, I think we'd have even reduced fitness. So we haven't been reducing the ribosomal arrays. I don't think we'd want to reduce the ribosomal arrays. Definitely not until we have the tRNA in. And then that would be sort of, I think that would be a reasonable thing to try, but for now we're not reducing the ribosomal arrays. So how many copies do you have? Maybe we'll move this way. No, this is a quick question. Okay. We have as many as there are on the well type. So we want to end up with a beautiful, well-functioning, classic yeast cell, but maybe like what we're going to make is more like, more like the Balor. So there you go. So all right. So here we go. So what mistakes were made? And if we knew then what we do now, what will we have done differently? So if present-day me went back to like 2007, 2008, there were lots of mistakes that I wouldn't make. But in terms of yeast design, what would the difference have been? So here's this first point about the ribosomal RNAs. So we actually made one blunder and it was not my fault because Giovanni warned Jeff about it, that there's a single copy tRNA that we, like Giovanni said, is a single copy. Are you sure we should delete it? And we deleted it and then there was a fitness defect and we had to add it back. So we told them that we thought it would be a problem and got deleted anyway. Fitness defect, we added it back. So that was a blunder. And so as I mentioned, the tRNA copy number variation that we transiently have reduced copy number ends up with ribosomes compensating the opposite direction. So if you look at those 2017 papers, each yeast strain that has a synthetic chromosome has mRNA seek done. And pretty much the only significant differences are that ribosomal genes are over-expressed. All right. So now here is actually a real systematic problem that we had. So I mentioned that we replaced the telomeres with a universal cap. And what we found is that the telomere is silenced and then there's an insulator that keeps the silencing from going into the subtelomeric and then into the regular chromosome. And what is happening in the synthetic chromosomes is that the silencing is extending further than it should. So that's happening for two reasons. One is that probably our silencing sequence in the telomere cap was not sufficient. The other is that since we got rid of a lot of the subtelomeric junk, or I guess maybe it's not John, we got rid of a lot of the subtelomeric pseudogenes. And they sort of were a buffer in the wild-type chromosome that if silencing extends into the pseudogenes, that's okay. But since we got rid of that, then it's easier for the silencing to extend into the real protein-coding genes that are used. So probably what's going to have to happen is systematically replacing the so-called universal telomere cap with a new and improved universal telomere cap. So that's on the way. So another problem that we have... Oh, did someone just... So these LOXP-SIM sequences that we put in for recombination, so they're completely stable once things are integrated in the chromosome. But the problem is that one of the steps for integration and assembly is homologous recombination of putting in synthetic DNA and it's supposed to land where it's supposed to land and get rid of the wild-type DNA. But the LOXP-SIM sites can seed homologous recombination. And then what we get is sort of a misassembly. And these are easy to catch. But the problem is that we didn't put catching them into our workflow until they got sort of further along so we didn't catch them as quickly as we should. So this isn't really something that we could have fixed because just having LOXP-SIM sites in there causes this to happen and we wanted them in there. So it's more that our process just should be improved to look for off-site homologous recombination. It turns out, however, that there are two problems with the LOXP-SIM sites that we found where we put them... So LOXP-SIM sites were inserted into the 3-prime UTR of every non-essential gene. So there are about 1,000 inserted to date. And two of them affect the promoter of a neighboring gene through a mechanism that we're not really sure of except that we know it's because we put the LOXP-SIM site there because when we take it out, then the problem goes away. So it's unclear how to predict these. So unfortunately, knowing this, it wouldn't really have changed how we did the design back then. But would it change the way that you go forward? No, because we've tried and tried and tried but we haven't found any good way to predict why it is that out of these 1,002 of them have this effect. So there's nothing... Oh, the effect is that I think it is the fitness defect due to down-regulation of the neighboring gene. So it's transcriptional... You pick it up on the profiling? So we pick it up two ways. We pick it up one way that we see the cell as a fitness defect. We pick it up seeing that the transcript is not expressed... is expressed below the level it's supposed to be. And then we cure it by getting rid of the LOXP-SIM site. And that was when we decided that was enough work done on the project. So, yeah. Did you correct the... Yes, yeah, yeah. Because these fitness defects, they're not big. No, I mean the mutant genes, like half one that are in the reference stream, did you correct those as you went along? Oh, the mutant genes that are in the reference stream.  And it... I don't have to ask Jeff. That's a good question. No one's ever asked me that before. I never thought about it. They make a huge difference to the fitness of... So the reference stream is a mutant. So we're not... So this isn't based on the reference. I think this is based on a BY? Yeah, that's what I'm talking about. BY4741? Yeah. I'll have to ask Jeff. I should make a note to that. No, it's very helpful. Yes, very helpful, but we need to... I'll still... I'll bring it home by 4, don't worry. All right. So synonymous recoding. So here again, so these are the watermarks we put in. So we put in... So we recoded 60 KB synonymously. And out of the 60 KB, so 60,000 bases, three of them caused problems. One, it's completely unclear to us still why it causes a problem. And another, we create a stem loop in the PRE4, P-R-E-4 mRNA. So possibly we could have avoided it, but if we worried about every stem loop, we would have made... I don't know if it would have been worth the trouble. And then here, this is a real one that probably we maybe should have been smarter about. We created a RAP1P binding site in a transcript, which causes the transcript to be repressed. So possibly we should have screened more for creating RAP1P binding sites. So go... So do you put the watermarks inside the coding region? Oh yeah, that's the only place we put them. Because we don't know anything about gene regulation. All we know about is the genetic code and that if we have the same codons, we'll get the same protein. We tried to avoid putting PCR tags into the very five prime region of a gene because there's lots of evidence that that codon selection is chosen to melt structure and make it easier for the ribosome to have an on-ramp or whatever people say. So we try to avoid that. But otherwise we just go wild on the protein coding region. So going forward, maybe we're going to incorporate these in the next design, but looking backward, there's a trade-off between experimental and computational effort and probably it ended up being more efficient just to do what we did and then have the wet lab people fix the couple of bugs that's sneaked through. So I say that as the computational person. So our total bug count, loxp sim sites, a thousand added two bugs, PCR tags, 60 kb of tags, three bugs, stop codons, so no fitness defects in the stop codons. Synonymous recoding 5,000 bases, no bugs, tRNA deletions, no unexpected bugs, and then repeat deletions I didn't even mention. So far no fitness defects from getting rid of any of the repeats. So to me what this means is we should have been more aggressive in our design. That synonymous recoding has five times ten to the minus fifth bug rate. So the design choice that I was pushing for, that Jeff said no to, was to pick some of the other low frequency codons. So low relative synonymous codon usage and get rid of them also. So typical low frequency codon, fewer than 10% of the codons for that amino acid use that codon. So 30 to 70,000 occurrences of low frequency codons. So for each of these amino acids that we recoded, we would have maybe introduced three to five fitness defects genome-wide that I'm sure we could have gotten back, yes. Why is it not a sharp number? Why what? Why do you have a range of occurrences? Oh, because it depends on the amino acid. So different, so you have to multiply the RSCU by the number of amino acid occurrences of that amino acid to get the number of occurrences of that codon. And they're also about 10%. So I'm not telling you what codon it is or what amino acid it is. It's just like, that's sort of the typical range. There are like three or four of them, maybe five of them in the genome, in the yeast genome. So something that really shocked me is how few execution areas we had in terms of getting an email from Jeff that we have to spend money on nucleotides by the end of the month and we need to quickly get this order done and a lot of code that was written once and run once and then never touched again that actually like very low human error rate, much lower than I would have expected. Annotation errors. So something that caught us at the very end when we were trying to get papers submitted is that we tried to upload our synthetic genome sequence and annotations to GenBank and it got rejected. And it didn't get rejected because of anything we had added. It got rejected because of the legacy annotations from the original yeast genome annotation that in between when that first genome sequence was submitted and when we did this GenBank improved its syntax checker and then rejected some of the reference stuff that it had accepted before. So probably we should have been using the GenBank table to ASN checker. So that wasn't really our mistake, but it's like one of these things. So as Charlie mentioned that I wasn't aware of that mutations in the reference sequence, like here's a mutation in the reference annotation that we had to fix. So we haven't fixed the sequence maybe, but we have fixed the annotation. So challenges in genome design. So for mammalian. So now there are a lot of people interested in doing similar projects in mammalian. And so we're interested in that also. But mammalian is much more challenging for a lot of reasons. My only insight based on yeast is that I wouldn't worry after designing all these yeast chromosomes and seeing how well they worked, I wouldn't really stress out too much about getting the design perfect. I think it's better just to sort of start and see what works. Yes. What I understand is you clean up a little bit the yeast sequences. I don't understand where is the new stuff. What new stuff? What you did is you took the natural sequence. Oh, the stuff I'm not talking about is the locks piece insights and having the chromosomes programmed to rearrange in different environments and explore diversity space by generating lots and lots of very closely related genomes that then wander around in genome space. Yes, I'm not talking about that. And if you would put this new yeast in a natural environment would they out-compete? Well, I'm not sure they would really have so much fitness defects compared to regular yeast. The value is that it's very fast-evolving in terms of copy number. So they're very useful to evolve pathways or live in stress conditions that you turn on this recombination system and then it will increase copy number of things that should be increased quickly. It will decrease and it will be locked into the genome. So it's been very useful for that. More important, can you still bake with it? So the answer is yes, but the IRB won't let us eat the bread. One of the projects of our, so like there are groups that have, schools have iGEM teams to do synthetic biology. So one of our teams put beta-carotene synthesis into yeast to have yeast that was going to be enriched for, so carotene starts with a C but unfortunately it's vitamin A. So that they're enriched. And when you grow the bread, well, when you bake the bread, it smells a little like carrots, but the IRB told us specifically no tasting the bread. It's got DNA in it. When you measure fitness, it's in a specific environment. Yes, so usually we're talking about fitness. Well, fitness was measured at like three or four standard environments, like regular temperature, I think higher temperature to look for higher temperature fitness defects, a couple other fitness, but you know, we didn't probe it over a ton of fitness conditions. How long have they been growing? Ah, since, so different, so different strength, like I think we got our first chromosome, the first full chromosome was 2014 maybe. Are they evolving? No, no, no, I mean, no, they have the same mutation rate as a regular cell, which is like one, usually it's like one mutation per generation. They're not really, you know, we're not, they're not, and the loxpiesim sites are completely stable in the absence of Cree expression. There's nothing, like they're no more, they're no less, well they're no less, they seem no less stable in the wild type yeast and hopefully they're more stable because of the TRNA neochromosome, hopefully. All right, so thanks to funding NIH DARPA NSF on Erison Bio, and now I want to tell you in the 15 minutes, is it really 15 minutes? Because I started late. And there are some questions. You have a little bit more yet. All right, I want to... But still we think about one hour of this question. Oh, yes. So together with... That's right. But 15 minutes it's okay. All right, I just want to show some math slides. So, so I did not know before I started working on this, so this is a cancer project. I did not know before working on this project that for breast cancer, it's not the tumor that kills people. It's the metastasis. And that therapies to get rid of the primary tumor are not really effective at all if the tumor is already spread. So five-year survival for local or regional breast cancer is very good, but metastatic cancer, once it's spread, is only 26%. Metastasis is very difficult to study. So here's sort of a picture of what metastasis means is that there's a group of cells in a tumor. And these are... The cells are colored suggestively to show different cell fates in a tumor. So the same way that normal cells in the body have different cell fates, there's sort of a growing theme in cancer biology that different tumor cells have different fates that may have to do more with changes in, you know, epigenics and transcription factor circuits as opposed to somatic mutations. So the same way that we have different cell fates in our normal cells, because of cell fate choice, there seems to be similar cell fate choice in tumors. Part of it might also be differences in somatic mutations, it's an open question. So here colored suggestively are the blue cells that sort of lead an invasion and then the red cells that are more proliferative that follow along and then they see it a secondary site and then the more proliferative cells sort of outgrow and the more invasive cells are still there. So that's the type of picture and some evidence for this, Andy and I published recently using different protein markers, yes. I just want to point out that K14 may be required for the dissemination but it's not required. Actually, it disappeared after the tumor in the secondary site. Yes, so that's what this picture is supposed to show that exactly that, that these are colored blue and his experiments are expressing K14, that clusters, circulating tumor cell clusters look like they're mixtures of K14 expressing K14 non-expressing and then as it grows out we see the outgrowth of the non-K14 expressing. It's still some K14 expressing and it's not clear whether it's this cell outgrowing or whether there's sort of a switching between different lights. I think that's a very interesting question. So metastasis has been challenging to study in vivo for a lot of reasons. You can... But with recent funding we're really excited about studying it in organoid systems. So particularly, so the NIH Office of Cancer Genomics, the Cancer Target Discovery and Development Program and then seed funding from Ted Giovannis Foundation and then Breast Cancer Research Foundation and some supplements and seed funding we had. So here's my experimental partner, Andy Ewald who's in cell biology and oncology. We'll be recruiting 25 breast cancer patients a year for the next five years working with the director of breast surgery who consents the patients on the way in and the pathologist who hands off the samples to us, Edward and Ashley. And then the most important thing about the trainees working on this are that in blue is every French connection. So Andre of postdoc in my lab trained at Université Pierre-Marie Curie, Parisix, LOD and Eloise have just joined the group from Bordeaux and from Nice. And then Hildre and Matthew, they're not from France, but they're from the next best place, Canada. So that's the team. And the method that we're using is organoids which are just these, so this intriguing model that is very complementary to doing in vivo work in an animal model versus doing cell line work, say with human cells. It's very nice. It's a human model. It is clumps of cells grown in a 3D matrix that then behave like many organs. So here's a picture of a mouse organoid prep of taking the mouse mammary gland and then you... So these are 300 to 500 cells, so that sort of size. So in a normal individual for breast tissue, they self-organize into what looks like a mini milk duct with a luminal layer and a basal layer. And if you look at them under a microscope from normal tissue, they just sort of sit like that and don't do much. But what got me so interested in this project is looking at these movies of organoids invading. So this is an assay where this group of cells is put into 3D media and it starts to invade. It just caught my interest because I had never really thought about... I always thought about cancer as a cell division, not about this. And so I really wanted to understand this phenotype. And for me, understanding the phenotype means I'd like to put a number on it. That makes it easier for me to do any sort of statistics. And up to now, the numbers have been someone looking under a microscope and saying, oh, that's non-invasive, that's a plus, a plus, plus, a plus, plus, plus. So I wanted to do something more quantitative. Also, looking at these, I've looked at, I don't know, probably several thousand organoid pictures. You see different patterns with your eye. And I'll show some of the patterns later on. But looking at the patterns, it just seems like if we could use machine vision, machine learning methods to do clustering of the patterns, then different patterns probably correspond to different types of pathways that are being activated. And then we can dissect different things that are going on. And looking at these thousands of pictures, I could sort of see patterns, but I wouldn't really trust myself to put things into groups. And if we had a quantitative set of features to say, here in numbers is what this sort of picture looks like, then we could roll out all of the tools of machine learning, statistical analysis, and whatever other word of the moment we want, like deep learning. We could use deep learning on it. All right. So the quick math interlude is what we're doing to characterize the shapes quantitatively is, oh, so this is sort of washed out. But imagine, if you would, the contour that should be shown, if there's a sort of smooth contour for an organoid, that if you put a point in the center and then trace the radius as a function of the angle, you get something that's almost constant. If we're a circle, it would be constant.  So that means you have to 4A transform it. And then if you 4A transform that, you'll get, if it were completely flat, only a zero-frequency component. You get sort of, you know, if it's a more complex shape, if it's really complex, you don't get a function anymore because if you have a really complex shape, the array from the center can intersect in multiple points. So instead, the trick is to make a parametric curve of the x and the y component separately as a function of the contour length. And then, so I was really excited when I found that with Keynote you can use Leytec. But I don't know any of the math, or any of the mathematicians, I don't know. This is baby math. Anyway, so what we do is we, so Vina, Andy's high-energy, like really patient graduate student spends hours tracing the organoid boundaries because segmenting the organoids is a pretty hard problem for us. And I don't have to solve that problem because we have Vina. So I use them and then I take those points, I interpolate them, I de-4A transforms, the zero-frequency component of the transform is just a center of mass, so I ignore that. And then we get these images, so then sort of in light blue, you can see that's a round shape in real space and then in 4A space, that's pretty much just a flat line, no spectral power. And then here's a real organoid boundary that's like a spaghetti monster. And then when you transform it, you get higher frequency components. So we do other steps. We normalize it. So what that means is if you zoom in or out, then the 4A components change with the zoom level by a constant scale. And we don't want to say something's more invasive just because we had a higher number on the microscope. So we scale out the size by normalizing to the first 4A component. And then we do a smoothing operation. So when I was a graduate student, I used cosine filters all the time, but I never knew where they came from until when I worked on this project where so what happens is that if you have like a zoomed in picture of something, you see pixelation.  So you can fix that by remapping it to the center of each segment. So then if you had a staircase, then you got a 45-degree angle ramp. So that's the smoothing operation. And that in 4A space gives you a cosine filter. So we slap on a cosine filter. And then, so something else you can think about. So mapping the two points to the center of the segment, that's an average. And sort of the opposite of taking an average is taking the difference between the two. The difference, it's like a local derivative. And it turns out in parametric space, if you take the difference, it ends up giving you the curvature. So we essentially weight the 4A modes by a factor of K squared. But if you do it right discreetly, it's a sine filter.  And now if you give me the image of an organoid, I can tell you with a number how invasive it is. So I can do it for me, because then that means that I can do all the sorts of work that people have done for complex traits. So all the classic statistical genetics that people have done, now we can do for this phenotype. And people always talk about tumor heterogeneity. And so here we're actually characterizing it. So this is just like population genetics, except that instead of looking at heterogeneity of different individuals in a population, we're looking at heterogeneity of different little groups of cells within a tumor. So I'm so excited. So here are the results from 800 organoids from 52 different tumors grown for six days. And I learned how to... So when we only had seed funding, it was me and my Python interpreter doing all the work. So I learned how to put together these thumbnail pictures. So I'm very proud of figuring out how to do that. So each of these little blocks is a different organoid in false color, because if you give Python black and white, it says, oh, you gave me black and white, but color is much prettier, so it doesn't in color. But if you give it a color image where you have all three color planes and they're the same, it gives you grayscale. So that was very confusing for me for a little bit, that all of my grayscale images were coming out in color and all my color images were coming out in grayscale. But I figured it out. All right, so here what I'm doing is these are the... So each of these columns are organoids generated from a different person's tumor. So there should be 52 columns, one for each tumor. And what I've done is I've stacked them from least invasive to most invasive. And if you got up closer, I think you would see that you would agree with, for the most part with the way that my algorithm ranks them, that at the top they look more invasive, at the bottom they look less invasive, and then this is just a false color scale. So within each tumor, we're seeing heterogeneity. We have within tumor heterogeneity that in a given tumor, some organoids generated are less invasive, some are more invasive. And then what we'd want to do eventually is to take these organoids from a single individual and say what's different between these less invasive and more invasive organoids. Let's characterize them by RNA-seq, look at gene expression differences. You know, maybe we'll do whole genome exome sequencing to see if there are somatic mutations that make them different. Also, we have between tumor heterogeneity. So what I've done is, I've essentially used the geometric average because that seems to give a little nicer ranking, for overall less invasive on the whole, so this individual's tumors, organoids are less invasive, these are more invasive. What we want to do eventually is to see if these correlate with patient outcomes. Breast cancer survival, even though on the whole it's bad, still from primary tumor removal, it's five or ten years to get good end points. So we're going to be doing those correlations to see if the organoids are proxy for survival, but those outcomes won't be for five to ten years. Also, I can't guarantee that this study is powered to do that. But we're thinking about other studies that would be more powered that are... Question? Ah, if only I were a biologist. If you take a red spot, you disperse those cells and restart the organoid. Do they repeat the phenotype? Do they repeat the phenotype? Well, so what we're doing for that is... So the phenotypes are not... I'm sorry, the organoids are not highly proliferative. So they're not... There might be one or two cell divisions in the six days at most. So we don't really have experiments like that up and running. However, we have mouse-genic models where the phenotypes from one mouse-genic model to the other are very reproducible. So at this point then you're sampling different bits of tissue? Yeah, for some reason. What we're doing here for heterogeneity of the tumor, you're taking different parts of the tumor and get organoid that behave differently. Yes. But I think that every organoid has heterogeneity in itself. Yes. So you will be able, if you do single cell on this organoid, you will be able to identify the population of cells within the organoid, that metastasis. I agree. That is in the plan. So I was talking to, I think the person who spoke earlier in this session about the C. elegans single cell stuff, is if we do single cell mapping back from the single cell sequence results to geographically spatially where it came from in the organoid. So what we're doing as a start is we've got plans to do laser capture and micro dissection. So you can actually, eventually, enrich for these cells the metastasis and put them back into organoid or put them back into nude mice, for example. So I think we have experiments like that planned but we should probably talk after. We did that in the mouse and it's amazing. You can see clearly what population is the metastasizing population of cells. So we want to, so I want to, I'm really interested in circulating tumor cells. So that, I think like that is probably where we're going to, one of the directions we want to go is. MT markers, for example. Yes. Or not. Or not, right. MT, the one that metastasize. You will find proteases that induce. So what subtypes are these? You say that, no? Oh, I didn't say what cancer subtypes they are because I'm not. You use all of them. Yeah, we're just using one. It doesn't matter triple negative. I'm not. Because they are very different. Yes, they are different. I understand that. So these, these experiments were done with pilot funds where we were sort of taking tumors on the way in. Now that we have real funding, we can do it more systematically. Invasiveness is not a surrogate from metastasis. I agree. Carcinomas are invasive by definition. That's what makes a carcinoma different from an adenoma. Adenoma forms an organoid that is completely spherical. And adenoma is defined as a noninvasive tumor. Carcinomas are invasive, but most carcinomas are not necessarily metastatic. And in breast cancer, you can have metastasis occurring 20 years after treatment, which is due to dormancy. And there's no evidence that the metastasis originates from the circulating tumor cells. A lot of it is totally hypothetical. You can address that. Okay. You can take... I'm the math guy! You can address that easily, actually. You can address that easily. If you find an organoid that's invasive, you can put it back into nutmites. And then you will see if they metastasize. Oh no. In a mouse. Doesn't mean they metastasize in a mouse. Well, this is the best you can do. If you've done, we can just continue this discussion. Or otherwise, maybe we will allow you to... Let him talk, please. To talk. You have like three minutes to... All right. I will only... Your talk and then... Okay. I will show like this and then one fun slide. All right. So here... So I completely... So I agree invasion is not metastasis. They're also a dissemination... So we can't get metastasis in 3D culture. Instead, the closer phenotype might be... Might be dissemination. Also, Andy is working on entravization phenotypes where it's a co-culture with epithelial cells that look like a blood cell and seeing the tumor cells squeeze in. So that's like... That's his work that's going on. What... Since we mentioned K14 earlier, what we're starting to do is a standard population genics type tests to do within tumor, between tumor tests of association. So here actually are phenotypes of invasion without dissemination. Either it's a single column or a collective invasion. Here actually is more dissemination without invasion. So this is... I think this is the... I forget exactly how it says C31 tag where individual cells are pulling off. And so this sort of organoid actually has a very round boundary, not invasive looking, but it's like water molecules boiling off of a water droplet as the individual cells crawl off. But what's constant in all of these is that the leading cells are expressing K14, possibly pulling themselves to the matrix. And so we... So we actually have the... So Andy's staying for K14 because he's so interested. And then we did regression tests of K14 versus our invasive phenotype. And so here's a correlation for an individual tumor measuring the difference in K14 versus baseline and difference in invasion versus baseline and a strong correlation p-value of 10 to the minus 42. So what we want to do now is do this genomically for transcripts, proteins, and also do things that are sort of really more tied to the biology. All right. Yes. I think the K14 is true only for the ER negative. I think we should... So I have to go to see whether we actually are consented to look at the ER status of the organoids that we've done so far. I mean, we're consented for some things, but not for a lot, and actually one of the things that I have to be working on is our IRB. All right. Two more slides? Two more slides. So first, so thank you. So I want to show some of the family's French connections. So this was our... This was my wife's dog actually before we got married, but then the dog adopted me, born in France. So there's my family. So thanks to my family for letting me come here. So my wife has a matrize from Patel de Sorbonne admitted to the French bar. So Ezra was born in the 17th. So these two kids are being brought up francophone. My daughter's favorite food is Ponce Chocolat, and this is this dog, a three-quarter French poodle, and that's our new puppy, Ophilly. So there. Sort of washed out. So she's only three-quarters. She's a Labradoodle. So she's one-quarter Labradors, three-quarters. Yeah. And there we go. All right. So thank you. And they let me travel anyway. Okay. So please. So metastasis is an extremely important, difficult problem. As a math guy, it seems to me that working backward from the genetics of all the metastasis is the better approach because there is some part of the genetics of the metastatic tissue is reflecting the process of metastasis, maybe only a small part. So there are two problems with that. One is, say that there's EMT, then with EMT comes MET, so the back transition. And so what if what you're looking for is actually a transient that is only expressed by the cells as they're metastasizing, but then when they regrow, either you lose that cell type because it's a small cell population or you lose it because there's an MET transition. So looking at the metastasis might not be very helpful. The argument is fair, but looking before metastasis essentially opens you up to any possible interpretation. So that's why I'm so excited about methods to look at cells as they're traveling through the body. However, there's also a very low success rate for circulating tumor cells for reseeding. So it's like, if we're an easy problem, it wouldn't be open to work on. I have a question. Well, the biggest problem is actually a tactical problem because when patients die from metastatic tumors, they hardly do any resection of metastatic tumors. So what's available in the lab for people like you and me and the primary tumors. So yes and no, we have a great program like that at Johns Hopkins and Pancreatic, where in Pancreatic they, at least my understanding, so that they take out anything else that they find like as autopsy. Ralph Ruben, he mostly has primary tumors because when patients die from metastasis, there are very few places that actually pay for the autopsy and you have to do a special program worn by the autopsy to really excise the metastatic tumor. So we have a program like that in Pancreatic. The problem in Pancreatic is that by the time 90% of the patients are diagnosed, they already have metastasis. So and we still don't know what's the genetic difference between metastatic and non-metastatic tumors. Despite so many years of research and so many cancer genomes have been sequenced. We still don't know that. Yes, I'm so surprised, like I always thought, oh, there's this wealth of data, but almost all of it is primary tumor that, and also the sample numbers, my picture was, oh, these days everybody who has a cancer diagnosis gets their tumor sequenced. Yeah, and the answer is they don't, and the answer is no, and maybe they'll run like the foundation panel of like 50 or 100, and even that ends up really not being so helpful for therapy choice. And so it's really, so that's, yeah, so that's why I have to get hard to work on our IRB to be able to, yeah. And also usually the consent doesn't allow follow-up. So it's not as far along as I had imagined when I started. But the time somebody is dead, there's nobody to sign the consent form. Questions? We will thank again our speaker.


Well, we're all talking about trade turner and base running, so let's talk about trade turner and base running. The ACC Digital Network said, trade turner is no stranger to aggressive base running or controversial cause. Let's take a look back to 2014. Brad Lauer says, hey, love to hear a recap of this one. Me too, Brad. Let's take a look. Looks interesting. Trade turner was a freshman in 2012. He turned down someone that drafted him and he recorded 57 stolen bases his freshman year, which set the record and it was more than the team totals of 158 division one teams set an NC State record also tied. He had five steals in one game. What an insane stat. If you threw out trade turner in 2012, keep the ball. That's a trophy. We got number 44 pitching for UNC. That is Trevor Kelly. He made his debut for the Red Sox this year. UNC is up by one run, fifth inning. Trade turners on third base base is loaded one out. Here's the one to pitch outside, but he calls it a strike. The batter loses all hope for the world gets deflated trade turners coming home.  Look at this. So that pitch probably outside. What are you going to do? Call a jump.  No one's ever been more safe. That's the tying run right there. A ballsy play by trade turner. He doesn't get rewarded. He goes, no, come on. Third base coach gets pushed aside by the main coach who says I'll handle this.  Nothing. Look at this replay. That's a tough tough way to lose trade turner scores the tying run. They went on to lose this game four to three. That would have been the tying run. Zach Rice was the winning pitcher Trent Thornton. He's on the blue jays now. Zach Rice is somewhere. Sky Bolt hit a home run. He made his debut in 2019. Trent Thornton made his debut in 2019. And NSSU was eliminated, but really they tied the game in the fifth inning. Tough break for Trey.


While we're on the Wi-Fi thing, although changing gears quite a bit, we'll go to listener Jeff who says, I have a Synology router, as discussed on a previous Mac Geekyeb episode, or as advised, I manually entered the Google DNS settings, or DNS servers, into the router. How does that work with my connected iPads, Macs, and iPhones? Does the router set DNS override what the connected devices are set at, or do I need to set them all for Google DNS? So the answer is, you're right. Bear with me here, I'll give you the actual answer.  But if things are set pretty much normally, and on your client devices, you have not overridden any of the settings there, then what generally will happen is when your device gets an address from your router, or via DHCP, your device will also be handed a DNS server, a domain name server, and almost always that is the address of the router. So your device uses the router as its DNS server. And then the router uses whatever DNS servers it is set to, either the default ones, or in your case, you've overridden them with Google's DNS, it uses those for its lookups. And then it usually keeps a small cache so that if multiple client devices are asking for the same thing in a short period of time, it just hands it out so that it doesn't have to go out to the internet and look and obviously makes things more efficient. So in your case, if you set your router to use Google DNS, and then just have your client devices connect, it's going to be fine. Just make sure you're not overriding DNS on your client devices. If you override on your client devices, it will use what you put in on each device, not what happens at the router. So does that answer your question? I hope it does.