Latest / Talk Python To Me / #470: Python in Medicine and Patient Care
Transcript
- 0:00Python is special. It's used by the big tech companies, of course, but it's also used by those you would rarely classify as developers.
- 0:07On this episode, we get a look inside how Python is being used at a children's hospital to speed and improve patient care.
- 0:15We have Dr. Somak Roy here to share how he's using Python in his day-to-day job to help kids get well a little bit faster.
- 0:22This is Talk Python To Me, episode 470, recorded June 23rd, 2024.
- 0:29Are you ready for your host?
- 0:30There he is.
- 0:31You're listening to Michael Kennedy on Talk Python To Me.
- 0:34Live from Portland, Oregon, and this segment was made with Python.
- 0:38Welcome to Talk Python To Me, a weekly podcast on Python.
- 0:44This is your host, Michael Kennedy.
- 0:45Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython, both on fosstodon.org.
- 0:53Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
- 0:58We've started streaming most of our episodes live on YouTube.
- 1:02Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.
- 1:10This episode is brought to you by Sentry.
- 1:12Don't let those errors go unnoticed.
- 1:14Use Sentry like we do here at Talk Python.
- 1:17Sign up at talkpython.fm/sentry.
- 1:21And it's brought to you by Posit Connect from the makers of Shiny.
- 1:25Publish, share, and deploy all of your data projects that you're creating using Python.
- 1:29Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs.
- 1:36Posit Connect supports all of them.
- 1:38Try Posit Connect for free by going to talkpython.fm/Posit.
- 1:43P-O-S-I-T.
- 1:45So, Mac, welcome to talkpython.fm.
- 1:46Awesome to have you here.
- 1:47Hey, thank you, Michael, for the introduction.
- 1:50I'm here.
- 1:52Excited.
- 1:53Yeah, I'm pretty excited to be talking about medicine and all the stuff that you guys are
- 1:58doing with Python.
- 1:59And I really like these kinds of shows because I think it's important to highlight that Python
- 2:04is not just for web developers and pure data science machine learning people, but it's used
- 2:09by this huge spectrum of people doing all sorts of interesting stuff and solving real problems
- 2:13with it, right?
- 2:14And it sounds like you fall pretty solidly in that category.
- 2:16Yeah, absolutely.
- 2:17It was like Python has been sort of this discovery as I've gone through my career as a physician.
- 2:23And it's interesting how to begin with when computer science initially when I was training
- 2:29and growing up, it was hard to imagine medicine and computer science sort of being hand in hand
- 2:34together.
- 2:35But now I think things have progressed and there's a lot of technology that's now in medicine that
- 2:41allows you to do all kinds of things.
- 2:43And of course, as I've discovered Python, it brings in kind of the toolkit and the ability
- 2:51to be able to achieve and solve problems in a way that I think it's not been envisioned before.
- 2:57So it's a very exciting time.
- 2:59Yeah, it is a very exciting time.
- 3:01And I think it's just getting better and better.
- 3:03Before we get too far into this, tell people a quick bit about yourself, quick introduction.
- 3:07Yeah, absolutely.
- 3:07So I'm Soma Croy.
- 3:09I am a molecular pathologist.
- 3:13It's a type of physician who deals with looking at the genome of either a patient or a patient's tissue.
- 3:23And we essentially look at all of these things in a way to be able to help manage a patient's treatment.
- 3:34In my current position, I am an associate professor and the director of molecular pathology at Cincinnati Children's Hospital.
- 3:42My lab is a clinical lab that is under the division of pathology.
- 3:49We do a lot of work that pertains to kids in terms of helping them diagnose and manage pediatric cancer,
- 3:58as well as infectious disease that happened in this age.
- 4:04I mean, molecular pathology, I essentially trained back in India as a physician, did my MD.
- 4:12Then I came here, started in Pittsburgh.
- 4:15I did my training in pathology and lab medicine.
- 4:19I specialized in molecular pathology.
- 4:21Then I was there in Pittsburgh.
- 4:23I worked for some time and then opened in Cincinnati Children's.
- 4:27Excellent.
- 4:28Do you work directly with patients or do you get samples sent to you from other doctors and then you process them and analyze them?
- 4:36Yeah, that's a good question.
- 4:37So I do not work with patients directly.
- 4:40It's a kind of, it's a subspecialty in medicine where my lab works with the samples that have been collected in the patient,
- 4:48either from the OR or a procedure or from the radiology suite.
- 4:54And then we work on that tissue or the blood sample or a bone marrow sample that comes to us.
- 4:59And yes, then all the testing that we perform is off from that specimen.
- 5:05And then once we generate the clinical reports back, they go back to the patient's chart and to the patients,
- 5:12to the clinicians who are treating and managing them.
- 5:16And then that way it helps how, you know, how they're able to then, you know, get a diagnosis and then give the appropriate treatment and the management to the patient.
- 5:24Yeah, excellent.
- 5:25So, yeah, you must see a lot of, a lot of different stuff flying, flying through the lab you have to analyze.
- 5:30So how did you go from I'm studying medicine to I'm writing Python code and running automation?
- 5:38And what was that process like?
- 5:41Well, that was a, that was an interesting journey for me.
- 5:45So before medicine and biology came into my life, I started off, it was second grade, I believe, when, you know, my dad, he got me a computer at that time,
- 5:59which is a, you know, 64 kilobytes small machine.
- 6:03And it was, I think it was for Toshiba MSX computers where you can, you could write like GW basic code and, you know, some, some basic, you know, predefined hex code.
- 6:14And you can, you know, run small applications on that.
- 6:16That was my starting point.
- 6:18It was, it was super exciting for me.
- 6:20And I think from there on the journey went into, as I went through, you know, school, you know, high school and then college.
- 6:29You know, medicine was, I would say, you know, biology was something that intrigued me.
- 6:35And at the same time, I also got interested in genetics, looking at DNA sequences.
- 6:42And, you know, just, I had a natural sort of, you know, liking for the fact that I could, you know, study about the cell or the genome, the DNA and RNA.
- 6:55But also I realized that there was a lot of math and competition that you can use to sort of slice and dice data.
- 7:02And at that time, you know, the place that I grew in India was a very small place.
- 7:06So we didn't have access to resources like internet.
- 7:10So I, when I, my exposure to internet was when I actually went to med school for the first time.
- 7:15Oh yeah, you can actually connect to like other computers.
- 7:18So that's when I started my medicine.
- 7:21So obviously I did, I did my training in medicine in medical school back in India.
- 7:26That's when I started to, you know, connect and talk to a lot of people.
- 7:30And some of my friends who actually were already, you know, writing apps at that time using like, you know, Java applets on browser.
- 7:38And so I started to make some connection in terms of, you know, images and how, you know, learning how some of those things can be used in medicine.
- 7:47And so radiology, during my radiology rotation, that was my first real life.
- 7:53It was my realization that actually in medicine, you can use computers a lot to handle a lot of these images, x-rays, CT scans.
- 8:00And I think as it went on, when I came to the U.S., that's where, you know, it really started off.
- 8:06During my residency in pathology here, I actually connected with my mentors, Dr. Anil Parwani and Dr. Leland Pantanois.
- 8:18They are well-known pathology informaticists.
- 8:22They've spent a lot of their time sort of dwelling in the world of pathology, medicine, and, you know, computer science.
- 8:30And so that is when I could actually realize that, yes, you can, you know, do a lot of innovative stuff by, you know, developing apps, algorithms, analyzing, you know, either image data or molecular data.
- 8:42And so that is when I started to go into designing an app, which was a very simple web app that was a project.
- 8:52I was working with one of my mentors.
- 8:54And so the idea was that, you know, we had a lot of these pathology images and we wanted to create a little browser app that would display these images as thumbnails.
- 9:04And then clicking that could enlarge the image, shoulder the display.
- 9:07And so I used, at that time, it was .NET framework to be ASP.NET.
- 9:13And so, you know, created a little app using Visual Basic, slowly I then migrated using C# in the same environment.
- 9:22And that time I started my advanced fellowship training in molecular pathology.
- 9:29That's when I, you know, that's when I started there.
- 9:33That's when I realized there's a lot of genomic sequencing data where essentially you're dealing with a lot of strings and numbers.
- 9:40And, you know, you have to make a lot of sense in terms of, you know, this large volume of data that comes in.
- 9:44If we're working with, so the kind of data that you're working with for, say, this genetic stuff.
- 9:49Yes.
- 9:50For us, for when you're studying the genomics, so how much data is in, say, one strand of DNA?
- 9:58How much of that do you actually care about?
- 9:59Like, give me, give us a sense of sort of how much data we're talking.
- 10:03Right.
- 10:04So it really depends on what is being done.
- 10:07And so when we look at, so when we talk about genomics, it is really designed on how the experiment is done.
- 10:15So, for example, if we just simply look at the entire human genome, we are talking about three billion alphabets.
- 10:23Essentially, it's, you know, the combination of four alphabets, A, T, and A, T, G, and C.
- 10:30So these are the four nucleotides of the DNA sequence, and the RNA has one additional one, which replaces A.
- 10:37But the idea is that it's a mix and match of these sequence.
- 10:40And so if you think about the entire human genome as a single thread of A, T, G, and Cs in various combination, you're looking at three billion alphabets.
- 10:51And so what happens is when we do these sequencing experiments where you would take, you know, the DNA molecule from a bunch of cells within a tissue, and then either we read all the three billion base pairs.
- 11:06And typically, the way the sequencing is done is you read all of these sequences and, you know, from many molecules.
- 11:13And so you'll have multiple copies of that when you're, you know, translating from a molecular, like a chemical molecular structure to a DNA sequence on, say, a flat file on a, you know, in a file system.
- 11:28And so if you look at that large scale of data, like the entire genome, we are talking of, you know, hundreds of gigabytes, maybe even terabyte worth of data.
- 11:37Then there are other more practical approaches when we look at the genome, when we, and especially this is something that we use for day-to-day patient care, which is referred to as targeted sequencing.
- 11:47What that means is instead of the three billion base pairs, we focus on those regions of the human genome that are of most pertinent use, or, you know, that we, at least as the current field of genomics, that we understand what to do with it.
- 12:03And so there are certain genes that, at least in the space I work with, cancer genomics, that are, I would say, close to about maybe 2,000 to 2,000 genes, which are known to be cancer-associated.
- 12:18And of that, roughly about 500 to 700 genes, where we know that, you know, they have, they've been studied and demonstrated that there are certain types of abnormalities in those genes in terms of the sequence changes, that they have certain meaning from, you know, in context of tumor in order to make a diagnosis, or to understand if the tumor is aggressive or benign, or if there are certain treatments that could be applied to those tumors.
- 12:46And that's specifically linked to the kind of sequence change you see in those, in that region of the genome.
- 12:54And that, you know, we are talking about, practically speaking, and we talk about, you know, the targeted testing that we do, it's a very small fraction of the large genome.
- 13:04Typically, there's a term known as exome sequencing, and exome sequencing refers to sequencing all those regions of the human genome where it at least codes, you know, encodes for one or the other anodated gene.
- 13:18That is typically about 1 to 2% of the entire gene.
- 13:22And so if we further narrow that down to about say 500, 600 genes, that one would typically sequence for practical cancer molecular testing.
- 13:31That's, I would say that's probably about 10th, maybe slightly less than that of the genome, but it's a very high yield from a clinical standpoint.
- 13:40Sure.
- 13:41Because the most alteration you will find that would make a, that would help with the clinical treatment is high.
- 13:46So, if you're going to talk about that data set, that is, you know, it's complex in a different way, because just looking at the raw sequence data would be, you know, somewhere in, you know, I would say 1 to 20 gigs from a single, you know, sequence file, but it entirely depends on how deep we go.
- 14:08So, for example, when we talk about sequencing, as I mentioned before, when we sequence a molecule, we can sequence it either at certain depths.
- 14:17That means what level of redundancy you want to be able to read that molecule.
- 14:22Sometimes we read the molecules, you know, 20 to 30 times.
- 14:26So that's referred to as 30x, or sometimes we'll read that, you know, 500 times.
- 14:31So that would be 500x.
- 14:33Do you do that because you want to make sure you don't misread the gene?
- 14:38Yes.
- 14:38So, right.
- 14:40So what happens is the greater the depth of sequence, so typically for, you know, such large panels that we sequence in a clinical setting, we usually target about 1500x to 2000x.
- 14:52That means we're reading that 2000 times.
- 14:54So the more the depth it is, the possibility of identifying a certain variation or genomic alteration that is present at a very low level.
- 15:03For example, say, you know, you have a tumor cell and within that, only 2% of the cells have this mutation.
- 15:10Others don't.
- 15:10And so when you're looking for or hunting for these, you know, needles in a haystack, you really want to maximize the amount of depth you have to be able to pick those things up.
- 15:19So it really depends on how deep we go.
- 15:21The more deep we go, the more data it is.
- 15:23And so it can scale up to, you know, almost several hundred gigabytes.
- 15:28Sure.
- 15:28Yeah, I've always wondered about how you can go and read somebody's genetics and then not make a mistake when you're, you know, reading, using chemicals to read.
- 15:38So, but it's really ridiculous how much data is there.
- 15:42Off by one, a C for a G or whatever is a bad thing, right?
- 15:47Right.
- 15:47But it is, you know, I think as the technology has matured, there's, you know, there's always, there's nothing, there's nothing 100%, you know, in terms of the error profile for the enzyme that has been used to work, the technology that is reading the actual fluorescence, converting that to, you know, signal.
- 16:04There's always statistical values and probabilities that are associated with, you know, what is the probability that it is wrong or, you know, incorrect or correct.
- 16:12But within that, you know, frame and where the current technology is, it's pretty accurate for, if not all, you know, many of the regions of the genome.
- 16:21And so it's mind-baffling how it works.
- 16:23Yeah, it's, it really is quite amazing.
- 16:26It's one of the modern marvels of science for sure.
- 16:29It is, it is.
- 16:30This portion of Talk Python To Me is brought to you by Sentry.
- 16:34Code breaks.
- 16:35It's a fact of life.
- 16:36With Sentry, you can fix it faster.
- 16:39As I've told you all before, we use Sentry on many of our apps and APIs here at Talk Python.
- 16:44I recently used Sentry to help me track down one of the weirdest bugs I've run into in a long time.
- 16:50Here's what happened.
- 16:51When signing up for our mailing list, it would crash under a non-common execution pass, like situations where someone was already subscribed or entered an invalid email address or something like this.
- 17:03The bizarre part was that our logging of that unusual condition itself was crashing.
- 17:08How is it possible for our log to crash?
- 17:12It's basically a glorified print statement.
- 17:14Well, Sentry to the rescue.
- 17:16I'm looking at the crash report right now, and I see way more information than you'd expect to find in any log statement.
- 17:22And because it's production, debuggers are out of the question.
- 17:25I see the traceback, of course, but also the browser version, client OS, server OS, server OS version, whether it's production or Q&A, the email and name of the person signing up.
- 17:38That's the person who actually experienced the crash, dictionaries of data on the call stack and so much more.
- 17:42What was the problem?
- 17:43I initialized the logger with the string info for the level rather than the enumeration dot info, which was an integer based enum.
- 17:53So the logging statement would crash saying that I could not use less than or equal to between strings and ints.
- 17:59Crazy town.
- 18:01But with Sentry, I captured it, fixed it, and I even helped the user who experienced that crash.
- 18:07Don't fly blind.
- 18:08Fix code faster with Sentry.
- 18:10Create your Sentry account now at talkpython.fm/sentry.
- 18:14And if you sign up with the code TALKPYTHON, all capital, no spaces, it's good for two free months of Sentry's business plan, which will give you up to 20 times as many monthly events as well as other features.
- 18:28So I think you're a little bit unusual, a little bit weird in the sense that you got into as your first sort of programming thing to bring to apply to your science and medicine side of things was C-sharp rather than or on vb.net rather than something like Python or R or something.
- 18:49So maybe talk a bit about that experience, contrast it with Python.
- 18:53Like, why do you end up moving to Python?
- 18:55Yeah.
- 18:56So, you know, I think the reason I started using vb.net C-sharp was, I would say, most, it was probably influenced a lot by, at the time when I was doing, you know, my med school in India as to, you know, what was available at that time.
- 19:13It was not something I would just go to the internet and like start getting a lot of resources as, you know, one would do now.
- 19:18So it was pretty much like, you know, this is the book I have available and that's about the document.
- 19:23Okay.
- 19:23That's the only thing.
- 19:24So you start.
- 19:24Yeah.
- 19:24That's what I use.
- 19:26Right.
- 19:26And then, but the thing is when I started applying C-sharp and it was mostly C-sharp and a little bit of C++ that I, you know, started to get into like with some of the non-genetic stuff initially, well, the project I'm working on.
- 19:40It was not too bad because I was able to accomplish most of the task, but then once I got into genomics and I came, so the way, you know, professionals who get into genomics and molecular pathology, there are a couple different routes.
- 19:58So either the physician, you know, people who are physician trained and they kind of have a formal background in medicine and they kind of, you know, do a specialized training and then they, you know, they become molecular pathologists after getting more certified.
- 20:11There is the other route, which is more of a research background where sort of, you know, people have spent a lot of their time, you know, in really deep research.
- 20:18They've, you know, they've learned a lot of genomics hands-on either from a computational background or from a more laboratory, like a wet laboratory background.
- 20:27And so they've spent, you know, they've obviously done their PhDs and postdoc training and then sort of, you know, come into the molecular pathology field.
- 20:34You know, people starting there tend to have more of a, you know, a formal computational training.
- 20:42So they're getting, you know, they usually get, obviously when you start with a research lab, R, Python are sort of like the most common tools that are used for any kind of data analysis and data set visualization.
- 20:52Coming from more of a foreign medicine background, you know, typically in real,
- 20:57you know, when we, you know, get training in, you know, clinical informatics or pathology informatics, often it is very, you know, kind of a, I would not say corporate base, a very, you know, formal application development space.
- 21:11So it's a lot of, you know, you know, Windows base, .NET, C-sharp, that kind of thing.
- 21:17So
- 21:18Standard enterprise stack.
- 21:19Yeah.
- 21:20Java or .NET is a choice.
- 21:21Right.
- 21:21Yeah.
- 21:22Right.
- 21:22Right.
- 21:22Yeah.
- 21:22Okay.
- 21:23Yeah.
- 21:23In bioinformatics, I mean, at least in genomics, bioinformatics, you know, kind of the ecosystem of tools available, it's, it's a, it's a mishmash of everything.
- 21:31It's, there's, for anything which is very competition intensive, like when you're trying to align sequences to the human genome, those are very intensive tasks.
- 21:39And typically it's a lot of, you know, C, C++, Java that's involved in some of these very mainstream tools that are available.
- 21:50More recently, I think we are seeing Rust coming into the picture as well.
- 21:54There's some applications.
- 21:55And then of course, you know, Python and R, you know, like the predominant, I think, tool sets, the programming language that are used to solve all of these problems.
- 22:04So when I sort of started my molecular pathology fellowship and I got into, now I had to do this project that involved, you know, manipulating all the sequence data to a point where we will be able to develop an application that would help sort of, you know, it's a web-based application that could help, you know, for other pathologists and faculty to read that sequencing data and, you know, digest in a very way that's easy for them to look at it.
- 22:32Rather than going to the Linux, you know, terminal and opening up like, you know, raw files and things like that.
- 22:36So I used, that was my first project was to use C# in that context.
- 22:41But I quickly realized that there was a lot of these algorithms that were natively either written in R or Python and then having to, you know, incorporate those functionalities was not as easily possible.
- 22:52So I had to rewrite a lot of those things in C# primarily.
- 22:55You know, it was a good learning curve, but I think from a main primitive perspective was getting really difficult.
- 23:00And so that's when the realization was that I think the combination of Linux and Python was, you know, I had to move towards that.
- 23:08Yeah.
- 23:09C# probably from the timeframe that you're thinking about, didn't really have a great package manager story, not to the same degree that the Python does.
- 23:16Although they do pretty, they do pretty good now over in the land.
- 23:19Right.
- 23:19Right.
- 23:20Yeah.
- 23:20All right.
- 23:21So a good question from Chris in the audience says, is there a reason to use Python specifically?
- 23:26Like, are there some special sauce packages that make it attractive?
- 23:29It sounds like that's kind of what you were getting at.
- 23:31You found more solutions to these algorithms than, you know, available in Python than in C#?
- 23:37Yeah.
- 23:38Or whatever languages.
- 23:39Yeah.
- 23:40Right.
- 23:41So I think, I mean, I think the simple answer is yes.
- 23:43I think the community and the amount of work that has been done in this particular space with genomics.
- 23:49I mean, when you are really searching for applications, it kind of falls into these three categories of, you know, anything which is a high performance component, you know, program that is usually in the Rust, in a C++, C, a lot of, you know, of those languages, a little bit of Rust and Java.
- 24:05And then the other bin is essentially kind of, you know, split up into Python and R. I think for me, Python was, and I think I'm sure others have shared the same way where it's almost like, wow, this is amazing.
- 24:18Like coming from C#, it was a little bit of a change because there's no more, like, you know, curly braces.
- 24:23Think about the whole thing.
- 24:26Did you miss your semicolons?
- 24:28Kind of.
- 24:29Like even now, sometimes when I write like a little bit of JavaScript, I feel like, oh, yeah, okay.
- 24:35This is my term.
- 24:36Exactly.
- 24:37But, you know, not too bad.
- 24:39I think what I got onto was like the simplicity of the language and how powerful it was when, like, if I'm thinking about, you know, you know, I'm not too bad.
- 24:48I think about, you know, it was interesting when I had to do something like there was an algorithm where I had to parse out certain, you know, strings in a way where it required some known workflows that we use to do, like, variant annotations when we are toss referencing databases and putting them together.
- 25:09You know, when you look for, like, you know, when you look for C# packages, I mean, there's really nothing there for native YouTube.
- 25:16So you have to write a lot of those things.
- 25:18In Python, it's the amount of time that is spent in developing those things is much faster.
- 25:23And the development time itself is quick because you either get an idea of somebody who's already done the work or there's a more formal package that you can use.
- 25:32So I think initially when I started off, BioPython was a very interesting collection of packages.
- 25:38I think it was, like, you know, a tool suite essentially written to, you know, to have all these functions available for very common day-to-day tasks.
- 25:47You know, I want to query a certain region of the, you know, bam file or I want to parse out certain things in the fastq file to look at, you know, some of the sequences or doing, you know,
- 25:57counting number of sequences in a given file and, you know, getting read counts, things like that was, it's all out of the box.
- 26:05And so that was sort of like the first thing to go about, this is amazing.
- 26:09I mean, you just say somebody's already done the work and just putting on top of it.
- 26:13So instead of creating these, I'll just like use those.
- 26:17Perfect.
- 26:18Right.
- 26:19So that was one.
- 26:21And the other motivation to use Python was, you know, say, for example, why not R?
- 26:25You know, why Python?
- 26:27Because R is a very rich ecosystem in, you know, at least in Genomics and Visualization.
- 26:30So I think the second thing was in terms of the idea that I was working on was having to develop a web application and all of these bioinformatics, you know,
- 26:42toolings and algorithms running sort of in the back end.
- 26:44And so at that time, it was like, okay, well, you know, Python, I've not heard much about in terms of web application.
- 26:49Mostly it was, you know, again, this big, like, you know, C#, .NET.
- 26:53That was why I started off, you know, with that.
- 26:56But then at that time, you know, there was Django and then Flask was sort of coming in.
- 27:00It was a very minimalistic, you know, sort of application.
- 27:03So I started focusing on that.
- 27:04It was very easy with Flask to, you know, get up and running with very simple, you know, applications to do that.
- 27:11I didn't try much into Django just because it was too bloated for me.
- 27:15But, you know, Flask was great.
- 27:17And then what I realized was you can create a simple web application, but then at the same time, you can use all your, you know,
- 27:24Biopithons and all the wonderful biopithetics packages in the back end.
- 27:28So it's like a single language that lets you do both.
- 27:31And so I was like, this is great.
- 27:33It was just, I don't have to go anywhere to learn, you know, a third or a fourth or a fifth different program language.
- 27:38And this just gets the job done.
- 27:40Yeah.
- 27:41Keeping in mind that you are actually main, your main job is medicine, not programming, right?
- 27:45It's not like you're a CS person who's just all after, out to learn all the languages, right?
- 27:50Right, right, right.
- 27:51So that, that definitely is, and again, that's a, that's a huge, you know, I would say I'm, again, as you said, I'm in a, I'm sort of in an unusual position where I'm, you know, a physician, but I also do a lot of these application developments.
- 28:04So that certainly is an important point in terms of how much time I have to be able to develop these prototypes.
- 28:11And then obviously, you know, typically the way it works is at least right now here, you know, where I am currently working, I have an excellent and amazing team of developers and bioinformations who really do a lot of the development work on the front and back end.
- 28:26And so for me to be able to take additional time out of my, you know, the clinical and the patient care work is limited.
- 28:33So if I can get whatever prototype I'm thinking of or developing the application fast, then, you know, that's, that's what I'm going for.
- 28:40And so you can hand it off to the team and let them polish it up and product, make it production ready, basically.
- 28:46Yeah.
- 28:47Yeah.
- 28:48Yeah.
- 28:48I was wondering how much time of your, your job do you get to spend on these kinds of things, you know, finding new packages, optimizing or improving the ways that you're working on stuff versus just sort of handing it off to the folks you work with and, and keeping, you know, focus more on the medicine side.
- 29:05Yeah.
- 29:06So, it, you know, that, that, I think it's a good question.
- 29:10I think it's, it's evolved over time as I have, you know, being sort of, you know, when I was in training and then being a faculty and then, you know, faculty in this new position.
- 29:19you know, one of the things I did was as part of my, certification was to, you know, to get board certified in clinical informatics.
- 29:27That's a discipline by itself that, you know, involves, a lot of, you know, it's a very broad field in terms of, you know, informatics and healthcare.
- 29:35And then one of the buckets there is, you know, software development.
- 29:38And so I was, you know, I was quite interested sort of in, in that field.
- 29:43And so most of my time in terms of being able to, you know, devote to, you know, finding new packages or, trying to, you know, write up an application that could solve a problem or coming up with prototypes.
- 29:57Or it was done in a way that sort of aligned with the work I was doing.
- 30:01And so it would be days when I'm on clinical service where I'm mostly, you know, working on sort of with, you know, with, patient care related matters.
- 30:09So those weeks would be, you know, obviously, very busy.
- 30:12I would have, you know, I would wake up at like extremely early in the morning, spend the first two hours, four to six AM just, you know, working on this.
- 30:19And then I get back to like, you know, the critical world.
- 30:21And then there will be weeks when I'm off clinical service.
- 30:23So I, you know, I'm not responsible for any, patient care related work.
- 30:27And those weeks would be where I would spend time in terms of, you know, doing these, you know, investigating into sort of some of these packages and, you know, coming up with new ideas, exploring what is all, you know, what is available in terms of certain problems that I've been doing.
- 30:41certain problems that I was solving.
- 30:42And, you know, that time sort of, you know, my quote protected time professionally, was spent in that.
- 30:48And so that would be, you know, maybe a week spent into like, Hey, we are trying to look into this variant annotation tool.
- 30:54And then we'd want to, you know, write wrappers around it.
- 30:57So it, becomes, easy for, you know, our labs operation to be able to use that.
- 31:02And so, so kind of that, that's how it works.
- 31:04So some of those, either early mornings or, you know, the weeks I'm off clinical services and how, how that works.
- 31:11Yeah.
- 31:12So, let's get started.
- 31:13So, let's get started.
- 31:14This portion of talk Python to me is brought to you by Posit, the makers of Shiny, formerly RStudio and especially Shiny for Python.
- 31:21Let me ask you a question.
- 31:23Are you building awesome things?
- 31:25Of course you are.
- 31:26You're a developer or data scientist.
- 31:27That's what we do.
- 31:28And you should check out Posit Connect.
- 31:30Posit Connect is a way for you to publish, share, and deploy all the data products that you're building using Python.
- 31:37People ask me the same question all the time.
- 31:40Michael, I have some cool data science project or notebook that I built.
- 31:44How do I share it with my users, stakeholders, teammates?
- 31:47Do I need to learn FastAPI or Flask or maybe Vue or ReactJS?
- 31:52Hold on now.
- 31:53Now, those are cool technologies and I'm sure you'd benefit from them, but maybe stay focused on the data project.
- 31:58Let Posit Connect handle that side of things.
- 32:00With Posit Connect, you can rapidly and securely deploy the things you build in Python.
- 32:05Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Ports, Dashboards, and APIs.
- 32:12Posit Connect supports all of them.
- 32:14And Posit Connect comes with all the bells and whistles to satisfy IT and other enterprise requirements.
- 32:20Make deployment the easiest step in your workflow with Posit Connect.
- 32:24For a limited time, you can try Posit Connect for free for three months by going to talkpython.fm/posit.
- 32:30That's talkpython.fm/posit.
- 32:33The link is in your podcast player show notes.
- 32:36Thank you to the team at Posit for supporting Talk Python.
- 32:39Is it changing fast?
- 32:41So I'll give you an analogy that you could tell me about your space.
- 32:45So on one hand, in Python web world, you mentioned Flask and Django.
- 32:49You know, Flask and Django, while they are evolving, are kind of, they're kind of the way they have been and they're pretty stable.
- 32:56And if you learn Flask five years ago, you're still good to use Flask today.
- 32:59Yeah.
- 33:00Or is it more like FastAPI, Pydantic, msgspec, just there's something new all the time that you got to keep learning to bring in.
- 33:10Are there a ton of new packages just coming online or is there a set of really solid ones?
- 33:15So I think it's both yes and no.
- 33:20And so it depends on what, you know, what area we're working on.
- 33:23So right now in the clinical lab that I'm directing here, you know, when I came here in 2020, it was, you know, when we started off from scratch.
- 33:32So essentially the idea was to be able to bring up a pediatric cancer sequencing infrastructure that was not available.
- 33:39And so it was ground up from, you know, the lab to personnel, to space, to competition, and such and everything.
- 33:45And so we kind of have this sort of, you know, two big bubbles in that operation from an informatics perspective.
- 33:51One of them is the, you know, we essentially are in the process of developing our custom lab information system.
- 33:59That's essentially a web app.
- 34:01And so we have that space and the other space is bioinformatics.
- 34:04And so bioinformatics is a lot of the custom scripting or the applications we develop is Python based.
- 34:11Some of them we do with the Golang, you know, when we need a little bit of performance aspect.
- 34:17And then the other aspect is the web app.
- 34:20So from a web app perspective, when we, when I started here, we actually started, we use FastAPI.
- 34:26So that's kind of, you know, that was so, you know, the idea was that, well, you know, since you're starting from scratch, and I came to know about FastAPI at that point of time, the whole thing was about, you know, acing away.
- 34:37I was, I was pretty much sold on that aspect.
- 34:40And then, you know, I think the whole tool made a lot of sense.
- 34:43I'm like, okay, well, this is, this is perfect time to be able to, I think when I started FastAPI was, you know, 0.5 or 0.6.
- 34:51And so now obviously, you can see a lot of change happening there.
- 34:54So, yeah, that definitely is a lot of, you know, fast pace.
- 34:57And so we kind of do catching up in a sense where it has to be done in a, you know, in a careful way.
- 35:04The reason is because from, you know, as compared to more traditional research lab testing where, you know, at the end, really, you know, there's a lot of discovery, there's a lot of excitement.
- 35:15And at the end, it all translates into being sort of, you know, the data is presented at a conference or you publish that as a manuscript.
- 35:23And that's the end point.
- 35:24So if you move off from version one to version three of an algorithm, you know, you have to obviously make sure that your research, everything is reproducible, but beyond that is not a problem.
- 35:34But when we're talking about the same thing in context of a clinical care for a patient, the room for error is very, very little.
- 35:41You can't make mistakes.
- 35:42And so the entire space of clinical testing is very regulated in that sense, because there's a lot of requirement that, you know, you have to perform that any change that's happened in your pipeline.
- 35:54Say you're using, you know, some version of an application.
- 35:57Now you upgrade to a newer version.
- 35:58You have to demonstrate that the analytical performance in terms of sensitivity and specificity for that pipeline didn't change.
- 36:05And so a lot of work is needed when you go, you know, do like a version upgrade.
- 36:09So we keep those things very controlled and, you know, and careful versus some other things which are more in the R&D space.
- 36:17There's a little bit more room to play around with tools.
- 36:21Right. Yeah.
- 36:22Chris was asking an audience a great question about basically, is it more exploratory and you just move really fast and don't really worry about tests and stuff like that.
- 36:29It sounds like this is more of a production type thing.
- 36:32Like if it you're going to run it over and over and if it gives a different answer at some point for testing for a disease or something, that's really bad.
- 36:39You need it to be right all the time.
- 36:41And so.
- 36:42Yes.
- 36:43So the rule is when we do, when we do new test developments or we bring a new algorithm, obviously that part of which we refer to, there's a formal term that we use in lab medicine.
- 36:52So we have a lot of things called familiarization and optimization or ONF phase.
- 36:56That's where, you know, there's a lot of flexibility in new tools, new version, trying out different things.
- 37:01But once it moves from that into the validation phase and then once we deploy the application, once the deployment is there, it's a production application.
- 37:08We don't touch it unless something really has to be tinkered with or there's a, you know, bug that we have to fix.
- 37:14Who's in charge of running those apps?
- 37:16Is that people on your team and your lab or is that the hospital or how?
- 37:21Yeah.
- 37:22So the way it is set up here is, so when I started off, I was the end of one.
- 37:27So I started off with the fast AP application, I had to build up the, we have, you know, bioinformatics pipeline that I had initially authored.
- 37:36But then when we went through the validation phase, I luckily had, you know, two people on staff who kind of were handling the bioinformatics on the front end.
- 37:45And then eventually we had a third person who joined the team.
- 37:48So then they were kind of, you know, helping me out with a lot of the actual groundwork of, you know, writing the code, getting tests done.
- 37:57You know, going through the validation data, summarizing that for me, being a lab director, it is my responsibility ultimately to sign off on all those things.
- 38:06So we're going to say, hey, okay, this is the validation and this is what is being demonstrated that, you know, your package or your pipeline or whatever you're working on demonstrates this level of sensitivity.
- 38:16Then yes, I being a lab director say that, yes, this is working.
- 38:19And once that happens, so we then deploy those applications in production.
- 38:23You know, we use GitHub and the usual dev test prod cycle.
- 38:28And so that's kind of how it works.
- 38:30Well, do you have your own hardware or do you stuff like on DigitalOcean or AWS or?
- 38:35So with healthcare data, there is generally a little bit of angst with, you know, data sitting on the cloud outside of the institution.
- 38:45I would say like the institution that I work on is very, you know, that way it's quite, you know, very forward thinking and being able to use modern technology.
- 38:56So what we have, what we started off and since it was, you know, everything being built up from scratch, we're taking the decision to keep things on print for beginning.
- 39:07But we also kept in mind that at some point of time, you know, if the institution decides that, oh, we're going to switch our infrastructure to using, you know, AWS or Azure or whatever the platform is going to be, that we want it to be ready.
- 39:21And so the way we had it set up and this is due to our amazing IS team here in, you know, at our institution.
- 39:32So we had our own hardware that we got in terms of the actual servers.
- 39:38And I had, we collaborated with the IS team to be able to help us build our Kubernetes infrastructure.
- 39:45So we have a test and a prod Kubernetes cluster and then all our apps and the biofarmatics pipeline.
- 39:55Well, the apps for now and the biofarmatics pipeline that we're looking forward, you know, in the near future to get deployed on these things.
- 40:02As a matter of fact, what we've done it, our dev team, we start to, we do a lot of the development on Kubernetes as well.
- 40:08And then we keep moving all these things as containerized applications.
- 40:12That's excellent.
- 40:13So really embracing containers and Docker and Kubernetes and that should make it super easy to move to wherever you want to go.
- 40:19Right?
- 40:20Anything that can run Kubernetes, you just push, push to that and you're good to go.
- 40:23Right.
- 40:24Right.
- 40:25I mean, that's, it's, you know, it's, it's a little bit difficult to start with, but I think once we are in that, you know, stream, it is, it is much less effort to move things around.
- 40:34Yeah. Last year I rewrote all of our servers and APIs and condensed six to eight servers all into one, just Docker cluster.
- 40:43And it was a great decision.
- 40:44But to me, it was also a little intimidating to play.
- 40:46Well, here's one more thing I layer, I have to manage and understand.
- 40:50And if something goes wrong there, then everything else still breaks.
- 40:53And, but having it set up is really nice once you get used to it.
- 40:56Yes.
- 40:57Right.
- 40:58All right. Let's talk a bit about, well, I have a question for you.
- 41:00I want to talk about some of these packages.
- 41:02Yeah.
- 41:03That you've been, you've been saying are like a lot of the reasons you chose Python and it used a lot.
- 41:07That's just great.
- 41:08But before we get there, like I got the bio python.org website pulled up.
- 41:12And the very first line is bio Python.
- 41:15It's a set of freely available tools.
- 41:17You know, open source, freely available.
- 41:20Right.
- 41:21So what does that matter to you guys?
- 41:22On one hand, you have a ton of money being in the medical space.
- 41:27It's really high stakes.
- 41:28So paying for commercial software or commercial libraries is probably not the biggest worry.
- 41:34On the other hand, open source is really nice.
- 41:37Invest, being able to look inside is really nice.
- 41:39Right.
- 41:40So it means you don't have to deal with getting permission.
- 41:43Right.
- 41:44How does that fit into your world?
- 41:45I know how it fits into like small startups and things like that.
- 41:47But for a hospital, for example, what is free and open source mean to you guys?
- 41:52I think it does have a lot of impact in terms of how we end up working and setting up these
- 42:01things.
- 42:02And obviously, I would, whatever I'm speaking is representing, you know, what it means from
- 42:08sort of an operational standpoint.
- 42:09You know, when we talk about molecular pathology, generally being able to bring up a clinical service
- 42:15like that is a huge investment.
- 42:19And so a lot of the investment is, and this is generally applicable to, you know, any institution
- 42:24where something like this has been set up for patient care or clinical use.
- 42:31The investment is primarily in a lot of the instrumentation and the reagents that we use are generally quite
- 42:42expensive, which is sort of, you know, the, I would say when we talk about, you know, what is the
- 42:48cost of a test when it is offered.
- 42:51That cost factors in a lot of these, you know, operational costs that we need to, you know, buy
- 42:56these expensive sequencing instruments, you know, the reagents that are used as consumables as
- 43:01we do the tests over and over again, every, you know, every week, every month.
- 43:05So from that standpoint, traditionally, the way things have been designed is, you know, I would say 10 years back when we were, you know, work with our finance team to say, okay, the cost of the test is going to be so and so based on all of these different inputs.
- 43:23And so, you know, 10 years back, computation, bioinformatics, you know, all of these were not factored in without.
- 43:30But now, as we are in that era where, you know, using GPUs on a regular basis to be able to do, you know, simple, I would not say simple, but, you know, routine work to get from the raw sequence data to be able to identify genomic variance.
- 43:46Genomic variance that's getting common, you know, using FPGAs, using large clusters to be able to, you know, to perform these tasks.
- 43:52And so now we are starting to see those costs getting in as part of the ultimate, you know, cost that goes to the patient for a test.
- 43:59And so we try to minimize those things.
- 44:01But one of the way to be able to minimize those things is to be able to choose between free open source versus something which is a commercial product.
- 44:07And it's always a balance between the reliability and the service that you're able to get back saying, hey, you know, something breaks down.
- 44:14We know, you know, there's a, there's an SLA, there's a certain, you know, assurance that this thing is going to have help versus open source free would be where we feel very confident in the code base.
- 44:27We sort of, you know, sometimes what happens is when we, you know, when we kind of use some of these open source tools, we end up almost invariably having some wrapper around it to change things or being able to have some insight into the source code.
- 44:41So it depends on that balance, you know, what we choose.
- 44:44Yeah. How often do you fork, fork it and use your self maintained version versus just run what, what is publicly on PyPI and then maybe wrap it to orchestrate it a bit?
- 44:55So I would say for the web application part of it, we don't really do a lot of forking. We kind of go with what it is. The only thing what we do is since we have the luxury of using a combination of GitHub and containers, and knowing the fact that the regulatory requirements require that you tightly version control all these things with, you know, history and all those things. We tend to, when we are developing these things and we are validating it before we do that, we try to stick to a fairly stable version.
- 45:24So for example, things like, you know, beta or release candidates, we try to stay away from that, even if they have some desirable features, but unless we see like a full production, you know, version of that, we don't tend to switch to it. So we keep things like that without maintaining or without forking or kind of, you know, making modifications.
- 45:42When we get into more of the bioinformatic stuff where we are actually trying to use an algorithm to solve a particular piece of part of the pipeline that is doing some data transformation, it depends on how much we want to change or modify.
- 45:58That's when we sometimes fork it. Sometimes we fork where we know that, and this is the unfortunate reality in many of the scenarios where you have great open source tools, but after some time, due to whatever financial or business or other reasons that they stop maintaining.
- 46:13And so essentially, we kind of get into this freeze mode. We tend to fork that so that at least we have that available. And then if we make any changes that we kind of keep it to that fork.
- 46:23But generally, I would say it's probably in the 80-20 where 20% is where we fork it, make some change. Most of the times we try not to do that.
- 46:34But yes, open source free tools have a big impact. A lot of their tools that we use as part of our bioinformatics pipelines, a matter of fact, which is kind of used in the community of molecular pathology to build these bioinformatics pipelines.
- 46:48They tend to use a lot of open source tools. And the reason for that is, for example, it's not written in Python, but we have an algorithm called BWA. It's written by Professor Henley.
- 46:59That's one of the algorithms that is almost like a de facto, I would say, when it comes to doing sequence alignment. That's a part of the pipeline. And so it's a tried and tested application for more than a decade now.
- 47:14So really, there's not a, and this is a fairly stable, you know, algorithm or an application. So we don't tend to, it's well maintained, you know, from an open source perspective. So those obviously are highly, we highly rely on those. But, you know, there is this whole ecosystem of softwares that come under this rubric term of variant calling, where we're trying to identify these different variants.
- 47:34there's a whole bunch of those
- 47:37and some are fairly well maintained
- 47:39they are open
- 47:41source sometimes depending on
- 47:43the context you're using
- 47:44you need a license
- 47:47if it is used in a commercial setting
- 47:49you don't need a license if it is
- 47:51in an academic setting like for example
- 47:53when we do clinical testing
- 47:55in an institution
- 47:57such as where I am right now
- 47:59that's an academic institution so typically
- 48:01it's not for profit
- 48:03and so obviously we
- 48:05don't need
- 48:07licenses for that use
- 48:09but once it goes into a pure commercial space
- 48:11where if the lab is doing all of this
- 48:13testing for profit then
- 48:15there's a license requirement
- 48:16so we see a combination of these
- 48:19things showing up
- 48:21it's actually becoming
- 48:23more common now with open source
- 48:25tools that
- 48:26at least in the genomic biofibic space
- 48:29yeah excellent
- 48:31I think another benefit probably
- 48:32probably for you guys
- 48:34I know it's a benefit for a lot of organizations
- 48:36is if you use the open source tools
- 48:38and you need to hire somebody new
- 48:41there's a good chance that they have experience
- 48:43already with those tools
- 48:44whereas if you use something
- 48:46private
- 48:47expensive
- 48:47you know you might have to teach them from scratch
- 48:49what the thing is right
- 48:50yes that is
- 48:52that is correct
- 48:53as a matter of fact
- 48:53it's fortunate that a lot of the people
- 48:56who've
- 48:56done a lot of good work
- 48:58and have contributed to
- 48:59the genomics biofibic space
- 49:01have
- 49:04you know the general tendency
- 49:05is whenever we are setting up
- 49:07any sort of
- 49:08you know pipelines
- 49:08for
- 49:09you know DNA sequencing
- 49:11RNA sequencing
- 49:11or
- 49:12you know more
- 49:13from a research perspective
- 49:14you know methylation sequencing
- 49:16single cell RNA-seq
- 49:17you know
- 49:19UMI based
- 49:21error corrected
- 49:22there's a lot of
- 49:23there's a very thriving
- 49:25open source space
- 49:26and so
- 49:26that really helps
- 49:27with people who come in
- 49:29even if they're
- 49:31you know not familiar with these tools
- 49:32it's easy to get familiar with
- 49:34because there's a lot of
- 49:35you know community backing that up
- 49:37or as you said
- 49:39when we have
- 49:40when we hire people
- 49:41who already are coming from
- 49:42you know
- 49:43from a different lab
- 49:44or they've had some experience
- 49:45but you know
- 49:45they come and say
- 49:46oh yeah we know
- 49:47how to do
- 49:48you know alignment
- 49:48or I'm aware of these
- 49:49applications that use that
- 49:50it's
- 49:51it is much much easier
- 49:52from a learning curve perspective
- 49:54rather than having to
- 49:55you know now open up a manual
- 49:56and this is the
- 49:57you know
- 49:58proprietary thing
- 49:59that only works here
- 50:00and
- 50:01yes
- 50:02exactly
- 50:02exactly
- 50:03cool all right
- 50:04well we coordinated a bit
- 50:05on a list of
- 50:06packages that
- 50:07you've
- 50:08used in your lab
- 50:09or find really helpful
- 50:10for your work
- 50:11and
- 50:11we could touch on those
- 50:12just a little bit
- 50:13yeah
- 50:14yeah so
- 50:14cnv kit
- 50:16genome-wide copy number
- 50:18from high throughput sequencing
- 50:19I don't know what that means
- 50:20but tell us about it
- 50:21yeah
- 50:21yeah absolutely
- 50:22so
- 50:22copying
- 50:24so cnv or copy number variation
- 50:26this is
- 50:27a type of genomic operation
- 50:28where what happens is
- 50:30in a simplistic way
- 50:31at least when
- 50:32when we talk about
- 50:33cancer
- 50:34the cancer cells
- 50:36sometimes for it
- 50:37to be able to survive
- 50:39it tries to use
- 50:40different ways
- 50:41of doing that
- 50:42biologically
- 50:42one of the way
- 50:43to do that
- 50:43is certain genes
- 50:44that help
- 50:45a cell to grow
- 50:46in the absence
- 50:48of nutrients
- 50:48or with very little
- 50:49nutrition
- 50:50is certain genes
- 50:51if it has more
- 50:52copies of those genes
- 50:53than normal
- 50:54then
- 50:55it will
- 50:55oh okay
- 50:55you know
- 50:56it's like
- 50:56you have more money
- 50:57than expected
- 50:58you can do a lot of things
- 50:59so typically
- 51:00what happens is
- 51:01in a normal
- 51:02human genome
- 51:03any cell
- 51:03that we pick up
- 51:04it will only have
- 51:05two copies of the gene
- 51:06one is coming from
- 51:07your mom
- 51:07one is coming from
- 51:08with that
- 51:08in cancer
- 51:09what happens is
- 51:10in certain
- 51:10scenarios
- 51:11if a gene
- 51:12that helps
- 51:14with growth of the cell
- 51:15or it helps the cell
- 51:16to survive
- 51:16even without
- 51:17signal or nutrition
- 51:18if it has more
- 51:20copies of that
- 51:20it will make
- 51:216, 8, 20, 50 copies
- 51:23it can survive
- 51:24versus
- 51:24there are certain
- 51:26scenarios where
- 51:27if there is a gene
- 51:28that is supposed
- 51:28to regulate the cell
- 51:29so it doesn't go
- 51:30haywire
- 51:30if the cancer
- 51:32is able to delete
- 51:33one of the cells
- 51:33one of the genes
- 51:34then you only have
- 51:35one gene left
- 51:35you knock out
- 51:36the thing
- 51:36and then that
- 51:37protective mechanism
- 51:38is gone
- 51:38so then the cancer
- 51:39cell can easily survive
- 51:40so what happens
- 51:41is with CNV
- 51:43or copy number
- 51:43variations
- 51:44the idea is that
- 51:45we use the
- 51:46high throughput
- 51:47sequencing data
- 51:48to be able to
- 51:49infer how many copies
- 51:51of these genes
- 51:51do we have
- 51:52is it more than
- 51:52two
- 51:53is it less than
- 51:53two
- 51:53and so
- 51:54this particular
- 51:55package
- 51:55it's a very
- 51:56very
- 51:57well established
- 51:59well maintained
- 52:00package in the community
- 52:02that essentially
- 52:03does this thing
- 52:04is you give it
- 52:05the sequencing data
- 52:06and define
- 52:08the regions
- 52:09of the genome
- 52:09that you're interested in
- 52:11you can also provide
- 52:13like names
- 52:14for the regions
- 52:14like you know
- 52:15this region is
- 52:15you know
- 52:16gene
- 52:16BRAF
- 52:18or this EGFR
- 52:18or whatever
- 52:19you're interested in
- 52:20and then what I'll do
- 52:22is I'll do all the analysis
- 52:23to be able to tell you
- 52:24that okay well
- 52:24when we are comparing
- 52:26this particular tumor
- 52:27against this reference
- 52:29set of
- 52:30you know
- 52:3020 normal samples
- 52:31where we know that
- 52:32you should only have
- 52:33two copies of the gene
- 52:34in this particular tumor
- 52:35we are seeing
- 52:36there are 50 copies
- 52:37of the gene
- 52:37so it gives you
- 52:39kind of an output data
- 52:41that
- 52:41numerical
- 52:43can tell you
- 52:44that you know
- 52:44what it does
- 52:45is it does
- 52:46a log 2 based
- 52:48you know
- 52:49transformation of the
- 52:49tracing that okay
- 52:50after all this
- 52:51computation
- 52:52when I compare
- 52:53to the normal
- 52:53this is 50 times more
- 52:56this is 20 times more
- 52:57the expected copy
- 52:58or it is
- 52:59you know
- 53:00half of the amount
- 53:01of copy we need
- 53:01in terms of deletions
- 53:02so that's what really
- 53:04it does
- 53:04and
- 53:05it's written in Python
- 53:08it uses a lot of
- 53:09you know
- 53:10Python
- 53:10it has Python dependencies
- 53:12that use
- 53:12that have been written
- 53:13in sort of
- 53:14you know
- 53:14in either C
- 53:16or like you know
- 53:17Python C bindings
- 53:19but at the end
- 53:20it gives you that data
- 53:21and it has an internal
- 53:23visualization
- 53:23tool
- 53:25but
- 53:25I was not very happy
- 53:27with you know
- 53:28how it was written
- 53:29so I ended up
- 53:30writing a wrapper
- 53:31which is called
- 53:32CNA plotter
- 53:33it's open source
- 53:34it essentially
- 53:35uses the end data
- 53:37for
- 53:37from CNA
- 53:39and then it
- 53:41gives you a nice
- 53:41visualization
- 53:42of the copy number
- 53:42so I think if you go
- 53:43down
- 53:44if you scroll down
- 53:44there's an example
- 53:45images
- 53:45yeah you have this
- 53:47on GitHub
- 53:47so people can
- 53:48if people
- 53:49want to use this
- 53:50it's right there
- 53:51right
- 53:51yep
- 53:51it's right there
- 53:52yeah
- 53:52so
- 53:53I think at the
- 53:54very bottom
- 53:55of the images
- 53:55the screenshots
- 53:56there
- 53:57oh yeah
- 53:57yeah
- 53:58right here
- 53:58yeah
- 53:58so for example
- 53:59the first image
- 54:00over here
- 54:00you can see this
- 54:02you know
- 54:03it's a thin band
- 54:04of all these
- 54:04multicolor things
- 54:05and each one of them
- 54:06is a single
- 54:07human chromosome
- 54:08so chromosome 1
- 54:092, 3, 4
- 54:10so on and so forth
- 54:10and it
- 54:12you know
- 54:12if you look
- 54:13in the image
- 54:14it is at
- 54:15you know
- 54:15the
- 54:16the Y scale
- 54:17essentially is log 2
- 54:18which is 0
- 54:19and going up
- 54:20it is 1, 2, 3
- 54:21and then
- 54:21it's a native scale
- 54:22on the lower side
- 54:23so anything
- 54:24going above 0
- 54:25means you have
- 54:26more copies
- 54:27than 2
- 54:27going below
- 54:28is less
- 54:29you know
- 54:29less than 2 copies
- 54:30and so if you see
- 54:31here in this example
- 54:32the plot here
- 54:33you see the very end
- 54:35which says chromosome X
- 54:36is a single
- 54:37you know
- 54:38the band over here
- 54:39is lower at negative 1
- 54:41that means this is
- 54:42a male patient
- 54:43with a single X chromosome
- 54:44as compared to females
- 54:45who have 2
- 54:46you know
- 54:462 X chromosomes
- 54:47and so
- 54:48when we look at this
- 54:49plot below here
- 54:49this is actually
- 54:50a plot from
- 54:52a
- 54:52you know
- 54:53a cell line
- 54:54a tumor cell line
- 54:55that is abnormal
- 54:56and here we see
- 54:57there are 2 genes
- 54:58which are
- 54:58amplified
- 54:59one of them
- 55:00is a gene
- 55:01known as TERT
- 55:02and the other gene
- 55:04is MDM2
- 55:05so these 2 genes
- 55:05are again
- 55:07one of those examples
- 55:08where it gives the tumor
- 55:09survival advantage
- 55:10over there
- 55:11and so
- 55:11you can see here
- 55:12there are multiple
- 55:13copies of these genes
- 55:14as compared to
- 55:14you know
- 55:15the baseline
- 55:15over here
- 55:16I see
- 55:16so that might predict
- 55:17something like
- 55:18how survivable
- 55:20the cancer is
- 55:20right
- 55:22so if it
- 55:23is it going to be
- 55:24localized
- 55:24say where it happened
- 55:25or it's going to
- 55:26like spread to
- 55:27other parts of the
- 55:27body
- 55:28or be difficult
- 55:29to treat
- 55:29or be resistant
- 55:30to treatment
- 55:30yes
- 55:31so if this is you
- 55:33you want
- 55:33higher numbers
- 55:34not lower numbers
- 55:35it all depends
- 55:36right
- 55:36I mean
- 55:36certain genes
- 55:37are good genes
- 55:38for example
- 55:39if there are certain
- 55:40checkpoint genes
- 55:41if those numbers
- 55:42you know
- 55:43if they have lower numbers
- 55:44you want to have
- 55:45two copies of them
- 55:46because if that
- 55:46protective mechanism
- 55:47is gone
- 55:47you know
- 55:48the tumor becomes
- 55:49very aggressive
- 55:50again depending on
- 55:51the tumor
- 55:52so it is all
- 55:53into context
- 55:53so if you're looking
- 55:54at the good genes
- 55:55you want to have
- 55:56two copies of the good gene
- 55:57if you're looking
- 55:58at some of the bad genes
- 55:59you don't want to have
- 56:00more than two copies
- 56:00of the bad genes
- 56:01one or zero is better
- 56:02I got it
- 56:03I got it
- 56:03okay
- 56:03okay
- 56:04HGVS
- 56:06yes
- 56:07this is again
- 56:08a wonderful package
- 56:09that was initially
- 56:11I think it was started
- 56:12by a person
- 56:14named Vise Hart
- 56:15he's
- 56:15I think he still
- 56:16maintains it
- 56:16but there's a lot of
- 56:17like you know
- 56:17it's a very
- 56:18well publicly maintained
- 56:20open source
- 56:21package
- 56:22there's a lot of
- 56:23you know
- 56:25community
- 56:25involvement in that as well
- 56:27so what HGVS is
- 56:29it's a nomenclature system
- 56:31for you know
- 56:33giving a name
- 56:34to all these variations
- 56:35so when you talk about
- 56:36I'm not sure
- 56:37Michael if you've heard
- 56:38about the term mutation
- 56:39so mutation
- 56:40is a very commonly
- 56:41used term
- 56:42that refers to
- 56:43some kind of
- 56:44abnormality
- 56:44in the genome
- 56:46in this case
- 56:48so what happens is
- 56:49there are these
- 56:50standards that are
- 56:51that you know
- 56:52most clinical labs
- 56:53follow when they're
- 56:54putting all of this
- 56:55information in the
- 56:56patient reports
- 56:57saying okay
- 56:57you know
- 56:58this particular
- 56:58tumor has
- 56:59you know
- 57:00mutation in BRAF
- 57:02a mutation in EGFR
- 57:03some other gene
- 57:03and there is a certain
- 57:05way that
- 57:06those mutations
- 57:07are described
- 57:07in terms of
- 57:08what sequence
- 57:09alterations
- 57:09happening
- 57:10say at the
- 57:11mRNA level
- 57:12and what sequence
- 57:13alterations are
- 57:14happening at the
- 57:14protein level
- 57:14so now in your
- 57:16protein
- 57:16you know
- 57:17you're missing
- 57:17these amino acids
- 57:18or you have
- 57:19excess of these
- 57:20amino acids
- 57:20or something
- 57:20got switched
- 57:21from here to there
- 57:22so there's a
- 57:23formal way of
- 57:23defining that
- 57:24and the guidelines
- 57:25of the group
- 57:27that defines
- 57:28that is referred
- 57:28to as HGPS
- 57:29human genome
- 57:30variation society
- 57:31and so it's a
- 57:32very complicated
- 57:33process where
- 57:34you have to do
- 57:35all these
- 57:35translations from
- 57:36the you know
- 57:37the genomic scale
- 57:38where the
- 57:39numbering system
- 57:40starts from
- 57:40one to like
- 57:41and you know
- 57:42whatever the length
- 57:43of your chromosome
- 57:44is in terms of
- 57:44ATGCs
- 57:45and each chromosome
- 57:46has a different
- 57:47number
- 57:47and if you have
- 57:48a certain
- 57:48alteration that
- 57:49is happening
- 57:49say in
- 57:50chromosome 7
- 57:51at this
- 57:52particular position
- 57:53then you have
- 57:54to translate
- 57:54that to the
- 57:55mRNA of that
- 57:56gene
- 57:56and then the
- 57:56protein of that
- 57:57gene
- 57:57so it's a lot
- 57:58of math
- 57:58a lot of
- 57:58strings
- 57:59involved in
- 58:00that process
- 58:01and so
- 58:02essentially
- 58:02this
- 58:02HGPS
- 58:03Python package
- 58:04provides all
- 58:05of those
- 58:06functionality
- 58:06as a wrap
- 58:07you can
- 58:07create your
- 58:08translation
- 58:09you can
- 58:10essentially
- 58:10project
- 58:11the variant
- 58:12from your
- 58:13genomic
- 58:13to the
- 58:14you know
- 58:14the mRNA
- 58:15to a protein
- 58:16level
- 58:16or vice versa
- 58:17you can
- 58:18validate things
- 58:18so we
- 58:20ended up
- 58:21I actually
- 58:22wrote a paper
- 58:22about this
- 58:23when we
- 58:24did a validation
- 58:25of how well
- 58:26this particular
- 58:27package works
- 58:27and so now
- 58:28in the lab
- 58:30that I'm currently
- 58:30in we implement
- 58:31this thing for
- 58:32generating those
- 58:33nomenclases
- 58:34so what happens
- 58:34is when
- 58:35we put a report
- 58:37out in the
- 58:38patient's chart
- 58:38and when
- 58:39say our
- 58:40oncologist
- 58:40was treating
- 58:42the patient
- 58:43they want to
- 58:44know what
- 58:45did you
- 58:46identify in
- 58:46this tumor
- 58:47genome
- 58:47they would
- 58:48read that
- 58:48nomenclature
- 58:49saying oh
- 58:49okay this
- 58:50particular
- 58:50change in
- 58:51this BF
- 58:51gene
- 58:52this is
- 58:53significant
- 58:53I know
- 58:54that there
- 58:54are therapies
- 58:55that are out
- 58:56there that
- 58:56we can use
- 58:57to treat
- 58:58this patient
- 58:58tumor
- 58:58so that's
- 58:59what this
- 59:00nomenclature
- 59:00system is
- 59:01about
- 59:01so it's a
- 59:01very
- 59:01automated
- 59:03system
- 59:04yeah
- 59:04and it
- 59:05normalizes
- 59:06it if there's
- 59:06multiple ways
- 59:07to represent
- 59:08it
- 59:08very nice
- 59:10all right
- 59:11this one
- 59:12I'm familiar
- 59:12with
- 59:13open
- 59:13pi
- 59:14excel
- 59:14yeah
- 59:15I guess
- 59:15you probably
- 59:15have a lot
- 59:16of data
- 59:16that either
- 59:17comes from
- 59:18or goes
- 59:18gets shared
- 59:19out into
- 59:20excel
- 59:20right
- 59:20yes
- 59:21so what
- 59:22we do
- 59:22is we sort
- 59:23of are
- 59:23right now
- 59:24in our lab
- 59:24we're kind
- 59:25of in this
- 59:25sort of
- 59:26you know
- 59:27kind of an
- 59:29interim phase
- 59:30where we
- 59:31sometimes
- 59:32use excel
- 59:34to look at
- 59:34some data
- 59:35so
- 59:35traditionally
- 59:37speaking
- 59:37before
- 59:38you know
- 59:39typically any
- 59:39lab that
- 59:40goes from
- 59:42you know
- 59:42zero to the
- 59:43point where you
- 59:44have a web
- 59:44application that
- 59:45automates
- 59:45everything
- 59:45the
- 59:46intermediate
- 59:47phase is
- 59:47using a
- 59:48lot of
- 59:48excel
- 59:48so it's
- 59:49very common
- 59:49in many
- 59:50labs
- 59:50to use
- 59:52excel
- 59:52for a lot
- 59:53of things
- 59:53for qc
- 59:55for charts
- 59:56for tracking
- 59:56so we
- 59:58use this
- 59:59open pi
- 1:00:00excel
- 1:00:00for a few
- 1:00:03things one
- 1:00:04of them is
- 1:00:04when we
- 1:00:05have a lot
- 1:00:05of you know
- 1:00:06the sequencing
- 1:00:06data that we
- 1:00:07have to
- 1:00:07summarize and
- 1:00:08then generate
- 1:00:09a qc
- 1:00:09to be able
- 1:00:10to present
- 1:00:12that to
- 1:00:13essentially create
- 1:00:14an excel
- 1:00:14document on the
- 1:00:15fly
- 1:00:15from the
- 1:00:16backend to
- 1:00:17provide that
- 1:00:17you know
- 1:00:18whatever data
- 1:00:18they want to
- 1:00:19look at in
- 1:00:19terms of
- 1:00:19statistics or
- 1:00:21you know
- 1:00:21list of
- 1:00:21variants or
- 1:00:22some form of
- 1:00:24you know
- 1:00:24calculation they
- 1:00:25want to do
- 1:00:25further that's
- 1:00:26where we use
- 1:00:26this package
- 1:00:27typically we use
- 1:00:28it as part of
- 1:00:29our biofranics
- 1:00:30pipeline when
- 1:00:31we have to
- 1:00:31generate those
- 1:00:31things but
- 1:00:32it's a very
- 1:00:33handy tool
- 1:00:34we actually
- 1:00:34use something
- 1:00:35similar and
- 1:00:36I'm forgetting
- 1:00:36the name of
- 1:00:37the package
- 1:00:37that is used
- 1:00:38to generate
- 1:00:41our document
- 1:00:42like we use
- 1:00:43some word
- 1:00:43documents for
- 1:00:44creating
- 1:00:44reports but
- 1:00:45we also use
- 1:00:46python there
- 1:00:46to be able
- 1:00:47to summarize
- 1:00:47a lot of
- 1:00:48these data
- 1:00:48points and
- 1:00:49then create
- 1:00:49a word
- 1:00:49document
- 1:00:50that you
- 1:00:51know it
- 1:00:51starts with
- 1:00:52a template
- 1:00:52of a word
- 1:00:53document and
- 1:00:53then use
- 1:00:54python to
- 1:00:54fill up
- 1:00:55all these
- 1:00:55you know
- 1:00:55right here's
- 1:00:57where the graph
- 1:00:58goes here's
- 1:00:58where the summary
- 1:00:59goes here's
- 1:00:59where the
- 1:01:00detected
- 1:01:00whatever it
- 1:01:01goes yeah
- 1:01:02right yeah
- 1:01:02cool are you
- 1:01:04here's two
- 1:01:05things that
- 1:01:05overlap are you
- 1:01:06familiar with
- 1:01:07this this
- 1:01:08thing where
- 1:01:08scientists
- 1:01:09rename
- 1:01:10human genes
- 1:01:11to stop
- 1:01:11excel from
- 1:01:12misreading
- 1:01:13oh yes
- 1:01:14yes absolutely
- 1:01:15oh my gosh
- 1:01:17this is crazy
- 1:01:18yes yes
- 1:01:22it happens
- 1:01:22when we import
- 1:01:23a lot of this
- 1:01:24data coming from
- 1:01:25somewhere we'll
- 1:01:25see entries like
- 1:01:27september 14th or
- 1:01:28you know march
- 1:01:2919th these are
- 1:01:30not yeah this is a
- 1:01:33big problem going
- 1:01:34in and out of
- 1:01:34excel and so as
- 1:01:35much as you can do
- 1:01:36in python or
- 1:01:37any proper
- 1:01:37programming language
- 1:01:38rather than
- 1:01:39using excel but
- 1:01:41there was one
- 1:01:41that was m-a-r-c-h-1
- 1:01:44or march one
- 1:01:45yes or s-e-p-t-1
- 1:01:48it's it's very
- 1:01:50funny some well
- 1:01:51some of the
- 1:01:52gene names are
- 1:01:52funny but then
- 1:01:53excel you know
- 1:01:55gets it to the
- 1:01:55next level when it
- 1:01:56changes the names
- 1:01:57this doesn't make
- 1:02:00any sense yeah
- 1:02:01yeah it doesn't
- 1:02:02make any sense
- 1:02:02yeah all right
- 1:02:03on to the next
- 1:02:04one hera
- 1:02:05yes hera this
- 1:02:06is very interesting
- 1:02:07so this is where
- 1:02:08i think um
- 1:02:09you know where
- 1:02:11in our instance
- 1:02:12we are going
- 1:02:14away from
- 1:02:15standard web
- 1:02:16applications standard
- 1:02:17bioinformatics
- 1:02:17pipeline to really
- 1:02:18touching devops
- 1:02:19using python and
- 1:02:20so one of the
- 1:02:21things that um
- 1:02:22typically uh we
- 1:02:24get to the point
- 1:02:25when we scale up
- 1:02:26our bioinformatics
- 1:02:26pipeline where we
- 1:02:27have multiple
- 1:02:28samples and
- 1:02:28multiple runs and
- 1:02:29everything needs to
- 1:02:30be orchestrated in
- 1:02:31a way where you
- 1:02:32have uh you know
- 1:02:33while you're running
- 1:02:34your pipeline you
- 1:02:34have a lot of
- 1:02:35visibility into
- 1:02:36how it works
- 1:02:37and so this is
- 1:02:38uh one of our
- 1:02:39um uh projects
- 1:02:41we are working on
- 1:02:41to move our
- 1:02:43current bioinformatics
- 1:02:44pipeline the way it
- 1:02:44works you know
- 1:02:45kind of on a single
- 1:02:46server to be able
- 1:02:47to use um
- 1:02:48the kubernetes
- 1:02:49cluster to actually
- 1:02:50deploy the uh
- 1:02:51the long running
- 1:02:53pipelines onto that
- 1:02:54and so there are
- 1:02:54many options you
- 1:02:55know there are
- 1:02:56a more standard
- 1:02:57sort of you know
- 1:02:58uh whittle based
- 1:03:00uh you know
- 1:03:01kind of you know
- 1:03:02protocols that you can
- 1:03:03use uh to run
- 1:03:04on either cloud
- 1:03:05or hpc
- 1:03:06environments there
- 1:03:07is a there's a
- 1:03:09very popular tool
- 1:03:10called next flow
- 1:03:10that is used to be
- 1:03:12able to you know
- 1:03:13kind of create your
- 1:03:14data analysis
- 1:03:15pipe flow you can
- 1:03:16sort of define that
- 1:03:16and then use any
- 1:03:18backend to deploy
- 1:03:18it um one of the
- 1:03:20things that we kind
- 1:03:21of when i was
- 1:03:22exploring this space
- 1:03:23one thing that one
- 1:03:24of the things i came
- 1:03:25across was um uh
- 1:03:27you know the the
- 1:03:28the whole sort of
- 1:03:29ecosystem that argo
- 1:03:30maintains with uh
- 1:03:32you know argo
- 1:03:32workflow and argo
- 1:03:34cicd and all those
- 1:03:35things so workflow
- 1:03:35was interesting because
- 1:03:37argo provides that
- 1:03:38way where you can
- 1:03:38sort of you know
- 1:03:39write your pipelines
- 1:03:40in a yaml format
- 1:03:41and then have it
- 1:03:42you know deployed
- 1:03:43on the kubernetes
- 1:03:44cluster it really is
- 1:03:45very native to the
- 1:03:45kubernetes cluster
- 1:03:46interesting it sounds
- 1:03:48a little bit like
- 1:03:49ansible but for
- 1:03:50specifically for um
- 1:03:53bio type of
- 1:03:54projects right
- 1:03:55yeah so argo so
- 1:03:57interesting thing is
- 1:03:57argo when you know
- 1:03:59when this argo
- 1:04:00workflows was set up
- 1:04:01really for a lot of
- 1:04:02cicd automations in
- 1:04:03mind so you know it
- 1:04:05is yes you can run
- 1:04:06data pipelines in
- 1:04:07general but never it
- 1:04:08was never at least in
- 1:04:09its description it
- 1:04:10never describes use
- 1:04:11case sort of in
- 1:04:12bioinformatics or you
- 1:04:14know biology pipeline
- 1:04:15analysis and
- 1:04:17similarly you know it
- 1:04:18it was like okay it's
- 1:04:20a generic tool you can
- 1:04:21use it for whatever
- 1:04:21you want so i tried
- 1:04:23it out with using you
- 1:04:25know like a yaml
- 1:04:26file and it was a
- 1:04:27simple four-step
- 1:04:28pipeline it was
- 1:04:29wonderful it was
- 1:04:31magical and the good
- 1:04:31thing was uh with
- 1:04:34argo like the argo
- 1:04:35workflow when you
- 1:04:36install that on your
- 1:04:37kubernetes cluster it
- 1:04:38comes with a native
- 1:04:40um web interface so
- 1:04:42it's you know if i'm
- 1:04:44sure if you've heard
- 1:04:45about the workflow
- 1:04:46option with uh
- 1:04:47uh airflow so airflow
- 1:04:49is a package that also
- 1:04:50you know there's a
- 1:04:51nice python SDK for
- 1:04:53that where you have
- 1:04:54you know you deploy it
- 1:04:55on a kubernetes
- 1:04:55cluster we have all
- 1:04:56these amazing you know
- 1:04:58visualizations to show
- 1:04:59what step you run or if
- 1:05:00there's some error there
- 1:05:01it'll do that argo does
- 1:05:03the same thing so it
- 1:05:04has it has obviously the
- 1:05:05built-in capability to
- 1:05:06interact with it as an
- 1:05:07api but then also there's
- 1:05:09a web interface that it'll
- 1:05:10deploy and it can have
- 1:05:11visibility into every
- 1:05:13step of the process you
- 1:05:14can summarize and see
- 1:05:14the entire tree so that
- 1:05:16was very interesting for
- 1:05:17us because we could get
- 1:05:18all that thing done in a
- 1:05:19single thing in a single
- 1:05:21goal but then uh our
- 1:05:22challenge was or well our
- 1:05:24desire was that if you
- 1:05:25could integrate that with
- 1:05:26our limb system that we
- 1:05:28were working on using fast
- 1:05:29api so that it was hey
- 1:05:30if there's any python
- 1:05:31SDK and so that's where
- 1:05:32hera comes so hera
- 1:05:34essentially is a SDK or a
- 1:05:35wrapper that's essentially
- 1:05:37talking to our goal but you
- 1:05:39can define your pipeline
- 1:05:40steps as uh you know dax in
- 1:05:44python and so that makes
- 1:05:45the process so super
- 1:05:47simple where you're now
- 1:05:48natively essentially we can
- 1:05:50integrate that as a back
- 1:05:51end to our uh web
- 1:05:53application and so then
- 1:05:55it's almost like you know
- 1:05:56it's python again from
- 1:05:58start to finish you're not
- 1:05:59you know getting out of
- 1:05:59that and it's it's uh again
- 1:06:01it's a very well-maintained
- 1:06:02application so so we are
- 1:06:03currently doing a validation
- 1:06:05to be able to make sure
- 1:06:06that or demonstrate that you
- 1:06:08know it's equally
- 1:06:09performant when we compare
- 1:06:11to a more sort of uh native
- 1:06:13shell based uh you know
- 1:06:15execution on the pipeline
- 1:06:16okay yeah this is new to
- 1:06:17me i mean of course i know
- 1:06:18airflow but not hera cool
- 1:06:20all right hi in sim did i
- 1:06:22grab the right one here uh
- 1:06:24package no i think it's it's
- 1:06:27similar uh let me uh see if
- 1:06:30i can i can send you the link
- 1:06:32yeah throw it in the private
- 1:06:34chat here and i'll pull it up
- 1:06:35yeah uh yeah okay there we
- 1:06:40go in sim yeah okay got it
- 1:06:43yeah so this is a this is a
- 1:06:46very interesting space in uh
- 1:06:48next generation sequencing
- 1:06:50assay or for uh you know
- 1:06:52high throughput sequencing
- 1:06:53assays so what happens is
- 1:06:54uh as i mentioned that one of
- 1:06:56the things that's required for
- 1:06:57a clinical lab is to be able
- 1:06:58to perform a validation on
- 1:07:00multiple samples of tumors that
- 1:07:02have certain mutations and
- 1:07:03then you can demonstrate that
- 1:07:05you know yes the assay works
- 1:07:06because you have tested you
- 1:07:09know 100 samples that have
- 1:07:11300 different you know mutations
- 1:07:13of genetic alterations and then
- 1:07:14you can demonstrate that yes your
- 1:07:16pipeline or your assay was able to
- 1:07:18pick it up so you can say that
- 1:07:19you know your assay is you know
- 1:07:21x percentage sensitive x
- 1:07:23percentage specific and you know
- 1:07:24your recall rate and things like
- 1:07:26that so what happens is when you're
- 1:07:27trying to um get those samples that
- 1:07:31have these very difficult or
- 1:07:33challenging variants to detect
- 1:07:34because they're just you know
- 1:07:36complex in how they occur
- 1:07:38biologically in the cell is very
- 1:07:40difficult some of these are very
- 1:07:42rare there may be only two
- 1:07:43samples in the entire world or so
- 1:07:45it's just not possible practically
- 1:07:47to you know get those samples
- 1:07:48unless we wait for like you know
- 1:07:5010 years to you know validate that
- 1:07:51so the idea is that if it is
- 1:07:53possible to be able to use
- 1:07:55algorithms which can manipulate the
- 1:07:58existing sequence so for example
- 1:08:00we have a sequence data from an
- 1:08:02existing real tumor sample but we
- 1:08:05can manipulate that in a way where
- 1:08:07we introduce these mutations in a
- 1:08:09in silico so we can introduce
- 1:08:11you know snbs or insertion
- 1:08:13deletion mutations and then use that
- 1:08:15same file to then feed into our
- 1:08:17pipeline biophonics pipeline and
- 1:08:18say okay run through the entire
- 1:08:19data pipeline and at the end let's
- 1:08:21see if we are able to identify
- 1:08:22those variants that we insert and
- 1:08:24so that's where this
- 1:08:25silico mutagenesis comes it's a
- 1:08:27very hot topic it's a very relevant
- 1:08:30topic of interest to really fill
- 1:08:32this large gap in terms of
- 1:08:34availability of rare variants and
- 1:08:37rare samples and how we can really
- 1:08:39improve sort of some of these rare
- 1:08:42but very clinically significant edge
- 1:08:43cases where we don't want to miss
- 1:08:45those variants and actually see
- 1:08:46those in real tumor samples and so
- 1:08:48this is a python package that was
- 1:08:50developed by at the university of
- 1:08:53chicago as part of their clinical
- 1:08:54lab and so what really it does is
- 1:08:57it will take in a list of different
- 1:09:00you know mutations for example in this
- 1:09:03plot i think they give examples of
- 1:09:04you know insertion deletion insertions
- 1:09:06where you have extra sequence or
- 1:09:08deletion where you have certain
- 1:09:09segments which are missing or snbs or
- 1:09:11single nucleoid variants where you have
- 1:09:14one nucleotide that got switched with
- 1:09:15another one and so these are typically
- 1:09:17that we practically see in in like real
- 1:09:20samples or real tumor samples but this is a
- 1:09:22way to mimic that you know in a sample
- 1:09:26that does not have it and so this python
- 1:09:28package is able to you know take that
- 1:09:30list from you say okay i have a list of
- 1:09:32these 20 important mutations that i know
- 1:09:35from the public databases have been
- 1:09:37reported but i want them to be inserted
- 1:09:40into my data set that was created from
- 1:09:42say a set of three or four real tumors
- 1:09:44and then use that to challenge the pipeline
- 1:09:47to say that hey can you still pick it up
- 1:09:49and so i see
- 1:09:50simulate these rare changes and then
- 1:09:53yes test or exercise your setup
- 1:09:56right we've got a few more to cover but i
- 1:09:59think we're getting a little bit short on
- 1:10:00time so let me just close this out with a
- 1:10:02final question for you because i know this
- 1:10:05is the topic du jour
- 1:10:06what is uh what is ai and llms look like
- 1:10:11for you guys is it does it matter is it
- 1:10:14really powerful is it super important
- 1:10:15uh i mean genetics is kind of text data in
- 1:10:18a sense and so yes sort of in the space of
- 1:10:21how it could apply right right it is it is uh
- 1:10:24it is a it is a text data and it's a lot of um
- 1:10:27you know there's a when you talk about like a
- 1:10:30search space a lot of the search space is
- 1:10:32very text based you know there is some
- 1:10:34numerical base was a lot of text based
- 1:10:36search as well and i think uh across the
- 1:10:39entire spectrum from where we start with
- 1:10:41very raw sequencing data to the point that
- 1:10:43we are trying to uh you know uh ask the
- 1:10:47question that okay i found this rare or
- 1:10:50novel mutation in this particular gene what
- 1:10:52does it mean you know what human has it
- 1:10:54been described what disease does it relate
- 1:10:56to uh one of the things that we do as um
- 1:11:00molecular pathologies and this is sort of
- 1:11:02where a lot of the medical work comes in is
- 1:11:03where we really go through a lot of the
- 1:11:06medical literature what we have learned
- 1:11:07before new publications papers out there
- 1:11:10that you know that have a lot of data in
- 1:11:12terms of you know studies that have done on
- 1:11:14this particular gene and they've described
- 1:11:16like okay these alterations actually activate
- 1:11:18the gene or is bad for the tumor or you know
- 1:11:21makes it treatment resistant um so you can
- 1:11:23see the naturally a lot of text starts and
- 1:11:25happens and so in that space uh we are seeing
- 1:11:28in the i would say in the past you know
- 1:11:30three to four years there's been a lot of uh
- 1:11:32applications of ai tools that have come out um
- 1:11:36you know particularly in the space of variant
- 1:11:38calling where we have this genomic sequence data
- 1:11:40and we're trying to identify variants uh you know
- 1:11:43one of the examples uh that's been talked about a lot
- 1:11:46is the uh deep variant caller it's called deep variant
- 1:11:49from uh from the team at google who developed that
- 1:11:51uh that uses a lot of the ai techniques to be able to
- 1:11:55you know pick those things up uh there are some
- 1:11:57genomic databases that um we use for in silico
- 1:12:01prediction for example if you have a variant we have
- 1:12:03no idea about it it uses there's a database called
- 1:12:07dbscsnv that uses random forest um techniques and i
- 1:12:12think it used another algorithm to predict if a
- 1:12:14certain site where there's a mutation can enhance
- 1:12:18uh abnormal mechanism called splicing versus not
- 1:12:21uh similarly there's a lot of tools that are coming in and
- 1:12:24the llms i think are i would say not mainstream but i think
- 1:12:28there's a lot of interesting research that is coming around
- 1:12:30there where people are trying to use um
- 1:12:32llms for doing these more broader text search saying that
- 1:12:36hey you know i have these you know i don't know thousand articles
- 1:12:40and i want to find these particular combination of uh words
- 1:12:44that you know you know uh there's a combination of a disease and a mutation
- 1:12:50and what do i get back on that um i personally tried you know chat gpt with
- 1:12:54different you know like uh phrases and uh questions about it
- 1:12:59what i've seen so far is and this is purely my personal experience i think
- 1:13:03a lot of it reads very real but when you start to look into the
- 1:13:08references as to what it references then you quickly figure out
- 1:13:11right just making that yeah this is not the real deal and so i think
- 1:13:16um i think it's uh you know i don't i'm not a very pessimistic person i would say
- 1:13:22oh no this is all garbage but i think uh there is opportunity there it's just how
- 1:13:26do you train it uh maybe there's a a space or an opportunity and it probably
- 1:13:31already has been people are pursuing this is training a smaller model but
- 1:13:35it's really deeply in genetics or it's trying not trying to use a model that tries to understand
- 1:13:40everything right right yeah it's more yeah more in the medical literature or the genomic literature
- 1:13:46to be able to like meaning is enhanced in that yes so i think there's active work going on there
- 1:13:51but it's uh yeah it's i think it's making you know a lot of a lot of interesting research a lot of
- 1:13:56potential impact on how you know we do things and obviously the tool sets that we currently use
- 1:14:02we might expect in the next 10 years to change yeah for sure all right final thought here people
- 1:14:07are listening they're maybe doing similar work to you how do they get started what would you tell them
- 1:14:14get going with python and some of these packages yeah i mean i would uh you know my uh reflecting on my
- 1:14:20own experience sort of you know in a very uh winded way that i ended up here i think um you know
- 1:14:27python is i i i feel programming in general and i think python particularly as uh programming language
- 1:14:34is a very low you know sort of you know entry point in terms of being able to really quickly get things
- 1:14:40done like learn it easily and get things done i think it should be to me anybody anybody who's trying to pursue
- 1:14:46something in biology or competition biology or bioinformatics i think this is the first thing it's it's something easy to do
- 1:14:55um to be you know i would say relatively easy to do to be able to get from that anybody with you know
- 1:15:00um a desire to learn this has analytical thinking uh i mean i i think investing into python is probably
- 1:15:10the best bet because you can pretty much do anything you want uh that's what i tell you know when i tell
- 1:15:15train people you know in my lab or i talk to other students is that if you want to spend your time you have
- 1:15:20very little time because you're busy you know with your other things uh i think the one thing that can get some
- 1:15:25of the job done and be still aligned with what you're doing is python um and after that i think it's you know it's a
- 1:15:31it's a lot of self-driven learning where you know you're kind of you know looking into things but the good thing is i think the the
- 1:15:38the python community is wonderful it's almost like i sit down and i think about oh i have to solve this problem
- 1:15:44um probably there are 50 other people who think about that and maybe two people have already worked
- 1:15:49on it so it's right they've already published it to pipe the eye and you're good to go absolutely i i
- 1:15:54totally agree with that and you know people should take the couple of weeks get good at it and it'll
- 1:15:59amplify it'll save you time definitely in the long run oh absolutely yes the only thing that i uh that i the only thing i would
- 1:16:08say like an added thing is if somebody is learning python and then they do have an intention you know to
- 1:16:16take it to the point where they would be involved in more serious um like you know application development
- 1:16:22or maintaining an open source package or you know however they contribute to that i think learning a
- 1:16:26little bit more like learning python in its real sense in terms of how to do it right you know there are
- 1:16:33five ways of doing something correctly but i think uh there's one way that is consistent so that it's
- 1:16:39again you know easily shared it's easily maintainable others can easily understand i think that would be
- 1:16:44my second advice it is it takes a little bit time but i think it's well worth the effort to spend the time
- 1:16:49writing you know idiomatic python code so it's um it's portable absolutely all right so mac thank you for
- 1:16:57being on the show it's been great to get this look inside of what you all are doing with python
- 1:17:01yeah thank you for having me on the show i appreciate that yep bye okay bye bye
- 1:17:05this has been another episode of talk python to me thank you to our sponsors be sure to check out
- 1:17:11what they're offering it really helps support the show take some stress out of your life get notified
- 1:17:16immediately about errors and performance issues in your web or mobile applications with sentry
- 1:17:22just visit talkpython.fm/ sentry and get started for free and be sure to use the promo code
- 1:17:28talk python all one word this episode is sponsored by posit connect from the makers of shiny publish
- 1:17:35share and deploy all of your data projects that you're creating using python streamlet dash shiny
- 1:17:40bokeh fast api flask quarto reports dashboards and apis posit connect supports all of them try
- 1:17:48posit connect for free by going to talk python dot fm slash posit p-o-s-i-t want to level up your python
- 1:17:55we have one of the largest catalogs of python video courses over at talk python our content ranges from
- 1:18:00true beginners to deeply advanced topics like memory and async and best of all there's not a subscription
- 1:18:06in sight check it out for yourself at training.talkpython.fm be sure to subscribe to the show open your
- 1:18:12favorite podcast app and search for python we should be right at the top you can also find the itunes feed
- 1:18:18at /itunes the google play feed at /play and the direct rss feed at /rss on talkpython.fm
- 1:18:25we're live streaming most of our recordings these days if you want to be part of the show and have your
- 1:18:30comments featured on the air be sure to subscribe to our youtube channel at talkpython.fm/youtube
- 1:18:36this is your host michael kennedy thanks so much for listening i really appreciate it now get out there
- 1:18:41and write some python code
- 1:18:51you