 Good morning, good afternoon, good evening, depending on where you are in the world. I'm happy to be able to talk to you a little bit about a knowledge graph that I have put have the luxury to go out and download data from some other source and represent it in a graph. A lot of the data that you'll see is actually mostly manually entered as well as semi-automatically entered into the database. And I'm not really a full-blown developer uh which means i don't write code on a daily basis as my job but uh i do write scripts uh to automate certain things and that has also been done in in my example here so um a little bit about myself i I grew up in Austria and initially started to study microbiology, then switched over to molecular biology, decided to get my PhD in Switzerland, and then had an opportunity to move to California to do some postdoc time and during that time I decided I wanted to kind of combine biology with computer technology and particular databases and that ended up landing a job in information technology and I've spent the last 25 or so years in that field in particular in the biotechnology space where i got to learn a lot about drug discovery and the data that is involved in there i'm very excited about interactive visualizations interactive visualizations, worked a lot with the traditional BI tools and love to see data that can be interacted with that are not just static charts that you see on the screen but you can actually see what's behind the chart. And for fun I like to drive fast cars and particularly rally cars if I have the opportunity to do that. So how did I get into Neo4j? It really started with my interest in cancer research, oncology, and in particular because I had a brush with cancer myself, which fortunately turned out to be not serious. But I also have friends that are affected by it. And I've also seen idols in the business being affected by cancer. It's a very non-discriminating disease and basically can affect anybody at any point in time. And there have been good improvements in treatment of cancer over the years, but there's still a lot of work to be done. work to be done. So I wanted to learn more about the space, the domain that is involved in cancer research, the companies, what are they working on, what kind of types of cancer they're working on, what kind of molecules they're developing. And so I thought, okay, as I learn about this, how do I capture this knowledge? Because I can't keep everything in my head. I need some kind of database to do that. And initially, relational database came into the mix. And I thought, well, as we've seen from other presentations, usually you start off with a schema that is very fixed. So you have to know everything up front and then you populate the database. So it's not very flexible. So I was looking for something more flexible. And so I came across the idea of node relationship node or subject assertion object. And I was really excited about this idea and thought, okay, this is the way I want to implement a database to capture this knowledge about cancer drug discovery. So I found this slide actually on a presentation from Alessandro Negri from GraphAware and I thought this actually captures very nicely how one could capture knowledge in a graph. You start off with the data that's just out there. These are the things that we care about in a particular domain and then we start labeling it to give it some information the next step would be to say well if I have these individual things how are they connected with each other and how can I represent this how can I define the way they're connected with each other and that leads you to kind of knowledge in a knowledge graph and ideally that leads you to additional insight and then last but not least wisdom we can debate about the wisdom but definitely you can get the insights through this connected data landscape. So the initial idea that I had, and I represented this in the graph just a few years back, labeled competitive intelligence and cancer drug discovery, was that in this space we have lots of different companies, small companies, startups, medium-sized, and very large companies, the pharma giants. And all of these, they're working on what's called therapeutic molecules. These are the drugs that they're marketing in the end when they are approved to treat a particular disease. These therapeutic molecules interact typically with a molecular target. This molecular target is a protein inside your body that has a critical role in the disease process. And the case that I'm interested in here is in driving cancer, and you wanna influence that with the therapeutic molecule, with the drug in a way that obviously benefits the patient, either stops the cancer or eliminates it altogether. So I thought, well, there must be some network in this and when you look at the bottom right I cannot show you the basic network that exists there where you have a company that builds a molecule or designs a molecule that acts on a molecular target but then there are other companies that work on a different molecule but they act on the same target so you can create then sort of a network of companies that work on the same molecular target and treat the same disease or sometimes also different diseases. So it's a start of a network but it's by no means the end of it. When I started to look into the whole drug discovery process that's outlined in these different boxes here, there are very many things involved in bringing a drug to the market. And so the initial idea that I had was really at the very beginning here, where I said, okay, target a molecule, then we obviously have to have a disease the molecules go through some steps along the way to optimize and identify a single molecule that will be pushed through this drug discovery process that is then safe for entering clinical trials And then the clinical trials themselves are going through various phases before an approval could happen that brings the drug on the market that you can then as a patient receive to treat the particular disease. So looking at this space, I started with this simple model, but as you can guess, this is going to increase in terms of node types very rapidly, and it certainly did. So just as a reminder, why cancer, the statistics are still pretty abysmal when we look at how many deaths are predicted even in 2019 taken from the American Cancer Society so there's definitely still lots of work to be done and we need to see how we can support the companies that are actually bringing these drugs to the market. And it costs a lot of money as well to move this forward. So looking at the knowledge graph idea, I wanted to have an environment that allows me to answer simple as well as complex questions. So I wanted to quickly see, well, if I have come across a company in the past, can I look it up by name, for instance, or a molecule, can I find it by its name, or any aliases or alternate names that this molecule might be known by. But I also wanted to ask some more complex questions. For instance, well, which of these molecules interact with a specific molecular target or a target family? What is the drug pipeline, for instance, for a specific company? Which of the molecules are they developing themselves? Which of the molecules are they developing in collaboration with others? Then which companies are working on therapeutic molecules that act on a specific molecular target? And which diseases are they targeting? As I mentioned, a molecule may be involved in a disease process, but this disease process isn't necessarily isolated. It may involve multiple parts in a human body, and one molecule could be used in treating multiple diseases. Last example here, which therapeutic molecules are in a particular phase in the clinical trial that is targeting breast cancer irrespective of a subtype. So there's got to be an opportunity to consume taxonomies of a disease, for instance, to get to the right answer so with all these questions in mind i definitely wanted a flexible system well easier said than done when i started there was really nothing and i resorted to something that i was familiar with that had a decent scripting language and a good framework to build a UI and I created some input screens that you see here to enter the initial concepts about companies and the basic information that I wanted to know like such as a name, a description, maybe an image, and then potential link outs to other information that I didn't want to capture directly in my knowledge graph. And I wanted to also have the option to have a minimal entry possible because sometimes all I knew was the name of something and then that would be connected to other things. So then I needed also relationships. I needed to figure out how to connect a molecule as shown in the example on the left-hand side labeled subjects with an object, with a company in this case, through a named relationship. So I defined my relationships such as developed by company or has location in city so I can use that also as a potential filtering mechanism in the future once I have a knowledge graph in place. And in addition there were some link outs to other source information and buttons for a quick look up. Of course, a molecule is then connected not just to a company, but it's also connected to a lot of other information that one would like to know about a particular drug molecule in the pipeline, such as the highest clinical trial phase that this molecule might be in, what it potentially is indicated for, in this case, pancreatic cancer, what type of molecule it is. If you're familiar with this space,, a drug was just a small molecule, a chemical that you consumed in a pill form. But the biotech industry started to bring proteins that typically had to be injected into the mix. And now the design has gone much further where proteins and small molecules are combined in quite sophisticated structures and sometimes we even have cells that are now used as drugs so one couldn't necessarily even say therapeutic molecule and would have to be changed to therapeutic agent which is something that I actually would like to do on my knowledge graph in the future. So, if you're familiar with Neo4j, this will remind you obviously of the property graph model. You have nodes with properties, you have relationships with properties, and I had designed this in FileMaker Pro initially by setting up uh two tables one for subjects one for objects and then another table that connects everything together through relationships um and i didn't know neo4j at the time when this started but it allowed me to collect some data over over time and then i came across Neo4j and I said well this is exactly what I need to continue on this idea and as I started out with a simple set of concepts it obviously grew over time and it is still growing. This slide shows you some examples of these additional concepts where I started to get into the actual product that a company sells. I got into some of the financials that gives me a perspective of how profitable are some of these drugs. And then I also wanted to get into the biology and the chemistry more and started adding bioprocess or biological structure in addition to the target, the molecule and the disease. So the graph is still growing as it is, as more data becomes available and as additional questions may come to the foreground so I said I didn't have Neo4j I also didn't want to enter all the data manually so one piece that I looked into was to get data more automatic automatically and I looked into clinical trials gov which Lists all the companies that are actually developing drugs and enter them into human trials and I'd set up a script that allowed me to semi automate an extract transform load from that database on a weekly basis so I do this actually weekly extract the data from clinical trials and then go through this process by looking up cancer related entries and assign them there's a lot of stuff to it as well. On the lower left in the slide here you see some of the issues that are actually popping up which is the terminology that is used to describe a disease or the drug is not very strict in this database so if you really want to harmonize some of that it requires some manual intervention in this etl process to establish the proper connections and that is a process that i go through it's uh quite labor intensive and you also have to have the knowledge at times to make the right decisions to bring this data to together so just a little bit about what's in the database so this database is not large this is not about big data but it's about highly connected data so at this point I got up to about 86 different types of data, different types of labels. I have 160 relationship types that connect these different node types together, 16,000 nodes and 89,000 relationships. The majority, as you can see, is clinical trial data with lots of dates associated with it. Then we have the therapeutic molecules, which are kind of at the center of this graph, the molecular target, and the company, the organization, where mostly have companies, but also have some data about some research organizations as well so i had the data i had this in the filemaker database but how do i get it out into neo4j i resorted to a pipelining tool called nime an open tool, which is actually quite great to read in files, then process it, manipulate it somehow, and then potentially write files again. And so I did export data out of FileMaker, then did some transformation in there to create Load CSV files that could be used in a script that I would run to get the data into the Neo4j Database I started off with standalone database community edition initially and then When Neo4j offered the opportunity to get into Neo4j desktop I started switching over to use desktop to store the knowledge graph the load process I wrote a script in sublime text to initially just define some simple constraints and the only constraints that i have is that i have some unique identifiers for each node type and i have a uniqueness constraint on on the name to make sure that i avoid duplicates because that is something that you can come across quite often, especially when you're dealing with things like molecules that have many different names throughout the development process. But I wanted to represent it only once in the database, not 15 different ways, just because they have a different name then i loaded the notes first very simple scripts here followed by the relationships which i put together by looking up the notes initially and then assigning a particular relationship based on the value that i had assigning a particular relationship based on the value that I had extracted from the FileMaker database. And last but not least, I also looked into using Cypher to add some content into the data based on the data that was actually there, such as associating, for instance, a company to a therapeutic area but the color disease area that they may might be working on based on the type of molecular molecule and the disease that the molecule is is supposed to address and that all went into one file and one cipher statement, and that is used to basically load the database. So the technology stack that I've been dealing with to build all this is FileMaker Pro Advanced to enable me to write scripts and capture the data initially. The ETL process through KNIME and a load script, getting it into Neo4j. And then I had the ability to write queries through Cypher that lets me actually answer the questions that I set out in the very beginning to this knowledge graph. In addition now, it also offers the opportunity to write, create reports through APOC, through the awesome procedures on Cypher that allows me to put those into a visualization tool such as Tableau to maybe create a dashboard. I could create a GraphQL API. I tried a few examples of those, and I'm very excited to get more into this to maybe put a web application on top of it. And I also can visualize this data in Neo4j Bloom, and I'd like to get to that actually in a few minutes to show you this uh life if the demo gods are are with us here and then last but not least we have the graph algorithms playground that one could use to do graph algorithms okay so here are some uh cypher query examples. One example, for instance, for some real-time queries, if I wanted to know what is the pipeline of a particular company, the thing I want to point out here is that because not all the data is always available, I had to use quite frequently an optional match phrase here to say, well well if it's there show me the data if it's not there then obviously still show me the original molecule that I wanted to see even if it doesn't have anything else other than maybe just a name so that flexibility is really important in this context. The second part here, we have some APOC-generated reports. For instance, if I wanted to get all the data about molecular targets out of the database, I can use APOC to generate this report, and that is data that kind of goes into a visualization tool such as tableau now let's get to visualization graph visualization I was very excited when neo4j developed bloom and made it available for startups and I jumped on it very quickly ended up writing a little blog about this too. And rather than actually showing this slide here, I want to get into Bloom if I can and show you some examples of how you can interactively work with the data. with the data one example that I want to show here and I'm not sure whether I can't do it on online here is that bloom doesn't just allow you to look up the individual entities in the knowledge graph such as a company or target or molecule you can also do these global visualizations that show you for instance like on the left hand side here companies and therapeutic molecules which gives you a perspective of how highly connected some of these areas are in the space of big companies that are collaborating with each other working on the same molecule and then you have such a halo around these companies which represents the the newer companies the startups that are just getting into this business and and trying to make a mark in that similar with therapeutic molecules and molecular targets. The centers here highlight those that are heavily worked on. Those are targets that are so-called validated, that many companies then try to develop drugs for, whereas the novel things are on the bottom side here, which don't have too many connections. So let's see, demo time. Let's see whether I can share my screen. All right. Okay. Okay, so if I go here, I hope people can see my screen. Can you confirm, Karin? Yes, we can see it. Okay. Perfect. Perfect. All right, so here I just wanted to show an example of a molecular target that actually has been in the press quite frequently recently because it is a cancer oncogene that has been very resistant to being targeted by a drug. And so in this case, I have basically a representation of the molecular target. One can double click on it, get basic information. I don't have much here other than there are many alternate names for the same target, which is sort of a common problem in biology that we have many names for the same thing and sometimes the same name for different things so in this case you can also see then the relationships which is really where the interesting part comes into the mix I have these various named relationships that define the relationships to other things and you can also look up the neighbors directly. So in this case, you see that I have connections to 19 therapeutic molecules, one event, one source reference, one company directly, and one molecular class. What I can do is I can highlight all of this and reveal this in the graph which then lets me further explore uh what i would like to be what i might be interested in um i might want to know well why do i have revolutionary medicines uh on there? What is a gtpase? Are there other ones? Or what do we know about a particular molecule here? A typical question, which unfortunately I don't have a good solution for so far, is I would love to just highlight all of these molecules that are connected to this target and then say, okay, give me just the companies that these targets are being developed by. But I cannot yet do that. So that's kind of a hint for the Bloom team to see is that a possibility maybe in the future. What I can do is I can expand this, but then we get into sort of a typical graph problem where you might get a hairball, which is a little bit more difficult to decipher. But Bloom gives you still some tools that you can untangle this graph where I can basically say okay I don't care about this I don't care about that at least at this point in time and I can quickly just deselect these examples and say okay dismiss all of this and then just leave me what might be interesting for me, which are the molecules and the individual companies. And then I have information about the companies laid out here, including also a hyperlink that lets you then get into more information outside of the context of the knowledge graph and I wanted to say thank you for enabling those hyperlinks because I think that's a very important feature in sort of the graph visualization toolset. Let's see how much time I have. I have a little bit of time here. You have 12 minutes total. Okay. Let me show you... You have more than that. You have like 17 minutes. Okay. All right. Something maybe quickly to showcase as well um i prepared this already beforehand so uh one can use also the neo4j browser to look at the structure of the knowledge graph you can do db schema but unfortunately that gives you a hairball so you have to be more specific and use here the APARC meta sub sub graph to show just the relationships between company therapeutic molecule molecular target a similar example here for instance for clinical trials where i have the clinical trial here that's connected to many different dates that come with the clinical trial record, but then also to therapeutic molecule companies, research institutions, disease and development stage. I was actually wrong about the time. There's like 10 minutes left, but you can continue, keep going, and anybody who wants to stay can stay for the Q&A, all that stuff. I might just have to jump off in 10 minutes. Okay, okay. I'll do that quickly. I just want to point out. In Q&A for sure, but go keep doing what you're doing because this is interesting. I think I could speak for everyone when I say that. I just want to point out, so I wanted to show briefly that I can run these different queries that I set out in the beginning that were my goal to answer specific questions and also want to highlight that in some cases you don't necessarily just want the graph, but you want a tabular representation of the data which you can certainly get through running these queries or reports as i have shown shown earlier so i just want to jump back quickly since i know i am out on time here and okay where are my slides here I hope this one was the last slide here let's take this okay I think I have a couple I just wanted to ah Ah, okay. Last one. Interactive visualization dashboards can also be generated by this here. This is, for instance, some financial data that I get out of the database here showing the profits that companies can make with these drugs and bring them in perspective when you look at multiple different drugs together. that shows you then what are the the real big money makers versus what maybe doesn't address such a big market size and then last but not least everybody knows now that the world is highly connected if you're interested in this knowledge domain connect with me uh everything starts out simple and quickly gets complex. So try to retain simplicity wherever it's possible. And when you're presenting about knowledge graphs, also think about non-technical audience that's just interested in the knowledge, not necessarily how you got there. Interactive graph visualizations, I think, are a key to enable data explorations of such a knowledge space and the graphs really opened the door for me to capturing learning understanding and interrogating complex data landscapes to gain additional insights and I just want to say thank you to everybody who makes open source tools available to a broad audience so they can explore these new opportunities and particular neo4j and also nine and if you want to explore that visual interrogation a little bit further I put a blog out there on medium and then last but not least we want to get to the Hunger Games questions as well before we forget that. And if you want to answer those, go to this address here and address them. And I'll take a look at the Q&A section to see what questions are. I have a couple questions in the Q&A. I'm converting some of the messages from the chat to the Q&A. If that way you can just go right through them and click answers. Okay, okay. Just go through them. All right, I'll try to address. It's my first knowledge graph so I don't know whether that's what people think about a knowledge graph or knowledge base for me that that was a knowledge graph the results of clinical trials potentially yes they are of interest, and at the moment I try to capture positive or negative results as part of an event in the graph. It's a very good question, difficult to address. Interfacing NIME with Neo4j, honestly, I don't directly interface it at this point in time. I basically just export files out of KNIME in a format that Neo4j can consume then through a script. So KNIME is a data pipelining tool that allows you to read in data from a file or from a database, manipulate the data, convert it in many different ways, and then output it again into files or another database. I haven't tried connecting to Neo4j directly, something I would certainly be interested in. try connecting to Neo4j directly, something I would certainly be interested in. Who uses Candid at this point in time? It is still, as I look at it, as a prototype. So I'm the primary user. I'm trying to expose it to a few scientists, biologists that might have an interest in it. And now that I have Neo4j Bloom available, I can actually do that because before, no biologist is really going to run Cypher queries until, unless they're really, really interested in this domain. So Bloom opens the door to that possibility. Clinical trials definitely is providing volume of the data, but then I'm also reading a lot of trade publications such as First Biotech or InPoint News that provide information about novel companies that are just coming on the marketplace that Yeah are really new and I wanted to track them as early as as possible And the link I can share in the chat box All right, so let's see can I do that I might have to do that differently I can't get to that link directly here sorry yeah the last one about named entity recognition tools. I would love to get into NLP. There's a lot of content that could be looked at actually in what I store in the database and you could create more tags. I haven't had the time yet. So this has been sort of a side project of mine to get into graphs and to see what you can actually accomplish with it, what answers you can provide. And, yeah, I wish I had more time and hands available to address those. I'd be interested in collaborating. I'd be interested who would be interested in this kind of data and what they would want to do with it. So yes, please reach out to me via LinkedIn or Twitter. That would be great all right okay perfect thank you justin appreciate posting the link to the bloom presentation i think everything is going to be recorded i don't know exactly how people can get to the recording after this is over but i'm pretty sure we'll find out from neo4j where you can find it. And I'm excited, the power didn't go out in Southern California so far. So I guess the wind must not be blowing that hard so far. Make sure you answer the questions for the Hunger Games. All right. Thank you everyone for joining in. I hope that was interesting content and topic for you. Let me know if there are any questions. I'd be happy to get back to you.
How to build a knowledge graph from scratch even if you are not really a full-blown developer
How do you capture knowledge about a complicated domain in the life sciences if many of the data you need is not available for download? Learn about building a cancer drug discovery knowledge graph using tools to capture, connect, store, query and visualize a landscape of biotech/pharma companies.