How Django Is Good For Your Health

This video features Craig Bruce at Django Birthday 2015 in Lawrence, Kansas, USA.

How Django Is Good For Your Health
0:15:06
Published July 16, 2015
534 views

Craig Bruce
http://www.pyvideo.org/video/3665/how-django-is-good-for-your-health
https://djangobirthday.com/talks/#django-health
You know Django as the web framework behind sites like Instagram and Pinterest, but Django is used in many places now. One such place is the pharmaceutical industry, which is the definition of large corporate enterprises. Drug discovery is an immensely hard and expensive challenge. Believe it or not Django can play a meaningful role in that endeavor and ultimately be good for your health.

Summary

Craig Bruce explains how Django supports the computational chemistry and cheminformatics work behind drug discovery. Because developing a successful medicine can take 12–15 years and cost hundreds of millions to over a billion dollars, researchers use computers to screen compounds, manage complex chemical data, collaborate on promising candidates, and fail early before expensive laboratory and clinical work. He describes Design Tracker, a Django application used across AstraZeneca to register, visualize, track, and share compounds, and Orion, a Django and Django REST Framework cloud platform intended to provide researchers with easier access to high-performance computing. Django replaced fragile legacy Java and X11 tools with browser-based interfaces and JavaScript/WebGL visualizations, while its security practices, release schedule, and community support helped address concerns about using it in an enterprise pharmaceutical environment.

Key takeaways

  • Drug discovery is a long, expensive process, so computational screening aims to eliminate poor candidates before they reach the laboratory.
  • Computational chemistry involves storing and retrieving complex chemical data in many incompatible formats, while teaching software enough chemistry to be useful.
  • AstraZeneca’s Design Tracker uses Django to register compounds, visualize them, track their progress, and coordinate work between computational and synthetic chemists.
  • The Orion platform combines Django, Django REST Framework, and cloud infrastructure to make high-performance computing more accessible to pharmaceutical researchers.
  • Browser-based JavaScript and WebGL tools offered a more reliable and flexible alternative to legacy Java applets and X11 interfaces.
  • Django’s security updates, release process, and mature ecosystem helped make it acceptable for enterprise pharmaceutical software.

Summarised automatically from the transcript.

Chapters

  1. 0:00 Introduction Craig Bruce introduces his work in scientific software and the talk’s focus on Django in pharmaceutical research.
  2. 0:47 Drug Discovery Pipeline An overview of computational discovery, preclinical testing, clinical trials, and regulatory approval.
  3. 2:23 Development Economics and Patents The talk examines the time, cost, failure rate, and intellectual-property constraints of bringing a drug to market.
  4. 3:57 Django in Computational Chemistry Django’s role is introduced within computational chemistry and cheminformatics workflows.
  5. 4:43 Chemical Data Challenges The speaker explains the complexity of chemical data formats, storage, retrieval, and teaching chemistry to computers.
  6. 6:16 Computing Infrastructure High-performance computing, supercomputers, and Linux environments support computational drug discovery.
  7. 7:05 Enterprise IT Constraints Legacy operating systems, locked-down desktops, and outdated enterprise tools make scientific software deployment difficult.
  8. 7:50 Early Web Tools The speaker traces the move from Perl and CGI through MediaWiki toward Python and Django-based scientific applications.
  9. 9:23 Design Tracker Case Study A Django application helps AstraZeneca chemists register compounds, track experiments, and collaborate across projects.
  10. 11:43 Orion Cloud Platform The Orion project uses Django and Django REST Framework to provide cloud access to high-performance computing.
  11. 13:16 WebGL Molecular Visualization A demonstration shows browser-based 3D protein and ligand visualization using JavaScript and WebGL.

Transcript

2,891 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:00

Craig Bruce? So my talk's going to focus on a little bit different area, a bit more enterprisey and how how Django can be good for your health. So just a little bit about myself. I work for OpenSNA Scientific Software. We're a science company, hence this. this PhD thing I have. We do a lot of good science. I'm going to show you some of that today. And as it's been alluded to, I'm also one of Kernel Guls's. for JengaCon this year. Very pleased to be able to help out along with Jeff who is an amazing conference organizer as you're already seeing. So we're very lucky to have him on board. So, the industry I work in is all to do with drugs and medicines. My former employees have been the world's biggest pharmaceuticals.

0:47

I can't imagine anyone in this room has not taken some sort of medication at some point. in their life. It's a really important part of healthcare. But how do these struggles get made? What is the process? There is, and I'm gonna be light on the science, a a a pipeline or discovery pipeline for discovering or designing new drugs. Numerous stages starting off with um drug discovery. This is where we use uh in silico techniques. I use on your computer to design and to look at different compounds of things which might be a good drug. We do this, this is the area I work in. Once you've gone from millions of ideas down to thousands to hundreds, and then you start making them in real life. Because it's expensive and slow to make a drug or to make at a physical compound and if we tried to make every potential drug we could, there's not enough time left in the universe to do it.

1:38

So we can't try everything. So we've got to be really smart about it. Once we found something that we think might be useful, we then go into preclinical where we start making the drug, the actual compound itself, and we do tests. on small cell samples, on plates, you know, in isolation, it's not anywhere as complicated as the human body, but just to make sure the things we predicted on our computer are still happening in a pseudo-real fashion. And then we move into clinical phase trials, one, two, and three. This is where people start getting involved. We start testing the drug on people to see if it's working. We do placebos, we do all sorts of things to try and work out and to make sure what we think is going to happen really happens and the drug does help you make get better. And then before you can ever take a drug, the FDA needs to approve it as well.

2:23

This is the Food and Drug Administration here in the US. But every country in the world has its own FDA type. equivalent. So for drug companies they have to go to all of these different agencies to get approval that the drug actually does what it says it does. This is complicated, long, throughout with things going wrong, often very near the end. So drug discovery. Let's talk a little bit more about that. So if we have a does anyone want to guess how long it takes for that process to happen to get one single successful jug? How many years? Twelve year twelve to fifteen years for a drug. And about the cost of that? It is way too much. It's uh an estimate is between eight hundred

3:09

million to one and a half billion per successful drug. Successful drugs are the things which rarely happen. Most drugs are failures They fail in clinical trials. Ideally we're going to fail really early on. We're going to fail fast, fail quick, and importantly fail cheap. We're going to fail at the computer stage. We're going to get rid of these things and never even bother making them because it's just it's too expensive But one thing Dr. Scurvy does have in common with the tech industry is IP protection. So when you design a new drug, the only way to really protect it is to pattern it. its structure and this is a unique composition of atoms that make up your particular drug. And these patents last for 20 years. But you can't take the patent out at the end of the process once you've done your clinical trials. Because y by that point you've had to publish what you've done and everyone is now making the same thing you've just made.

3:57

So you have to publish you have to do your protection really early on, you know, in year two or three, and then you lose most of your protection while you're actually making sure it does what you think it's gonna do, getting it approved, then it gets to the market. So you have a very little time to actually make back the cost, which is part of the reason they're so expensive. So where does Django fit into all of this? There is two groups, um, which is the the area I work in, known as computational chemistry and cheminformatics. So this is very early on job discovery when we're using Using our computers to work out if this potential compound might be a good drug or not. And we use a selection of 2D and 3D methods to look at these compounds to try and figure out using our scientific knowledge are they going to be worthwhile making in real life.

4:43

Informatics, which is my my specialism, is much more around the sort of the storage and retrieval of this data. So you can imagine we have many file formats of storing chemical data. data. How many of you here like the PDF format? Chemistry is full of PDF like formats. It's really hard, it's very hard to get between them. Every vendor has their own version. There's open standards. It's just It's really complicated and the data we're handling is very complicated by nature. And just to make this even worse, you know, computers don't know chemistry. There's no Microsoft chemistry. It just doesn't exist. We have to teach the computer all the chemistry. Um and chemistry, you know, it's science, it's not a a solved known quantity. Some things we know, some

5:29

other many things we just don't. And we've ever had to teach just more knowledge into the into the software, which is really tricky. So when I sell people with my chemist, they often think white coat and goggles. Not true at all. Um for computational chemist anyway. Um I'm a disaster in a real lab Which is why many of us converted over to doing what's known as dry chemistry on the computer. Um I do still wear goggles occasionally. We like um doing three D or some chemists like doing three So you've all been to the cinema now to see a 3D film. Chemists have been doing that for two decades, or three decades even. So the lab that we work in looks a little bit more like this. That top image on the left is a Cray supercomputer. HPC high performance computing facilities are really common for drug discovery.

6:16

We want to look at taking one particular drug and we want to see if we put it in our huge collection of internal compounds and proteins, is it going to bind with this protein? Will our new drug bind with this protein? Will it be something interesting and it takes a lot of computational resources to do that, which is why HPC is really important. And one of the sort of especially hardware pieces are SGIs, which is the picture on the on the lower left. These were some of the first machines I started doing competition chemistry on. They run a flavor Linux known as IRIX. So that's my first introduction to Linux. Linux. And this is where you'll run your software locally, and then when you're ready, you're on a massive batch drop on a cray or a on a huge supercomputer. But you know, you're working for a big pharmaceutical or a Fortune 500 company, everyone else, including you, also still has a corporate desktop or laptop.

7:05

And there's a reason I picked that particular operating system. It's an old one. Many of the customers I serve still use, thankfully they'll fxp, but you know Vistrum Windows 7 are standard workbenches for people's um enterprise IT and we have to shoehorn the chemistry into this as well, which makes it really hard. In keeping with enterprise, they like to use these sorts of things. things. They're really popular. Java Web Star, Java applets, that that spinning logo when it's all going to crash your browser. is just all too common and really depressing. Old data browsers lockdown, you're unable to store any browsers, you can't upgrade the version of the browser because then you can't do your expenses. It's like how

7:50

how does it help you with discovery? It makes it really tough. Um but computational chemists were lucky because they have these SGIs and supercomputers as well. So they're still locked down on their Windows machine, but they've got a Linux environment as well, and that gives them a lot of freedom because the administration Is generally a bit more relaxed, so they have a chance to explore. So what did they start doing? They looked around and they found things like this. Staple books for comp chemists. A learning Perl and Learning CGI, which translates to your first website. This is interesting. Now I've got IRIX, I've got Apache, I've got Perl, I've got CGI. Now we do something exciting, something different, something interesting. So it's useful to start designing and helping me discover more drugs. So my first project was using Pearl

8:35

and actually a Pearl cartridge which had knowledge of chemistry so we could handle chemistry in Perl and then show it through a website. And that was that was uh ten year over ten years ago. And it's just so much easier and that has improved so much. Obviously thankfully Pearl is uh use less now People are moving on to Python and thankfully Django. Other things that became really popular are uh MediaWorker, uh MediaWiki. So a lot of companies, this is one of my former companies, have an internal media working installed. So now you've got PHP in the mix as well. So it's still the P's, but it's not quite the right one we wanted to use. And here we have a custom plug-in to MediaWiki to show some chemistry, where we can just take some chemical data and we can visualize it for you. So I want to talk to you about a case study, about the

9:23

big project I worked on a few years ago. It's called Design Checker. So this is a Django project, a Django application that is used worldwide by AstroZen. So one of the largest pharmaceuticals, every chemist in the company uses this tool. It started off from one site as a small prototype just because it was useful and interesting, and it's slowly adopted across all the different sites. And now is a core part of their discovery chain. So apologize these are in color, but uh these companies are very um pro IP and secrecy, so getting anything out that's passed. The lawyers is very tough. So this is a screenshot of Design Tracker. This is a Django form. This is showing you the ideas we've been working on and the progress of them. So a computational chemist will go in here, we'll enter their compounds.

10:11

These will be registered, you can see the visualizations of them, and then they're handed to a synthetic chemist to actually make them. So we take our ideas, we talk about them, we discuss them in meetings, and then we say, of these, you know, twenty, let's make these five. These look the most interesting. Let's make these and design tracker can keep a an an eye on if these are ideas, if they've been made, if they've been tested, and anyone from the team can log on and have a look. And this idea of collaboration has become really big. You've seen it, you know, in Google docs and everywhere else. It's just the same in pharma. We need to collaborate to do the best things. So here we have a another another screenshot design tracker. Here we have a a hoverover as we're looking at all these different projects as Chemists normally work on multiple projects as once. Each idea will have like some core and there's a reason why I want to investigate this area.

10:57

Then we have some other ideas. So this provides a really nice way to sort of an overview of what's going on on um and then a simple JavaScript hoverover, you wouldn't believe how excited people were when they saw this because it's just so much better than the the other thing I've had to use before, which were often X11 interfaces of the Java Web Start, which would then start, you'd do your work, and then crash, you'd have to do it all again. And just being the browser was so much more flexible. It's made a made a real difference and people enjoy it so much. So that's why I worked on uh AstraZeneca. Um now open eye, we are shifting uh Our focus. So we do a lot of stuff that runs on these high performance computers. You know, our stuff is very expensive to run from a computational stance.

11:43

So we have um started working on a project we're calling Orion, which is our cloud platform. Um we want to give access to HPC on demand. So we're using Amazon to do that. Something that you take for granted every day you can go to Heroku or Amazon to launch your apps, and it's really easy. Our customers can't do that. They're not allowed to do it. IT will get in the way, Lee will get in the way. And if they do go ahead and do, often they get into a lot of trouble. So we want to provide them a solution to do that. And Orion is powered, or the core of Orion is all around Django, Django Rest framework, and a whole load of uh third-party packages, which means we can focus on doing the stuff we're good at, which is the same So I and OpenI are really grateful to Django for being here and being so well supported. It made a real big difference to us.

12:30

While we do contribute to third-party packages and Django as well, we feel our value add isn't doing the science, as do our our customers and just the the little things. Um so we did get pushback at AstraZeneca for using Python and Django. It's not enterprise ready, it's not secure, it's it's like really Really? Is it really is it that bad? So so little things that the community have changed in the last few months, like the announced release schedule and the security updates, they're really important to help convince people that Jan is a is a secure, mature platform, and that really helps when it comes to getting it set up. So I can't show you Orion, but I am going to do something a little bit stupid and quiet. Really quick demo to show you some of our 3D visualization.

13:16

So So this is a talk from one of our um or slides from one of our talks, our customer user meeting, although you can't see it. This is why I knew it was a stupid idea. Here we go again. So Yeah. Okay, so we've taken a Wikipedia page and you know regular page, some here's a protein on the side, and we've hijacked it slightly. um to put one of our our JavaScript based plugin. So remember I told you previously these plugins are always with applets, so I probably would just crash the page historically.

14:02

Now this is 100% Java JavaScript. There's no need for us to crash the browser or anything like that. And it works on any browser and on your iPad, which Java really doesn't work on. So here we have a protein which we can spin around. We can zoom. This is all done native and real time and is much better graphics than anything we've had before. This is WebGL, yes. Here is our potential, is a medicine, here's a ligand, and here it is sitting in its protein. And this is what chemists, comp chemists, medicinal chemists like to use to show. to see what's going on. And this is just one of the pieces that's going into Orion. So let's see I think my time is about up.

14:48

I just want to say thank you very much for listening. Um I'll be more than happy to take questions later on today or tomorrow. Um so happy birthday, Django, and please keep up the amazing work. It makes our lives much easier. Thank you very much.

Questions this talk answers

How long does it take and how much does it cost to develop a successful drug?

Developing one successful drug typically takes about 12–15 years and costs an estimated $800 million to $1.5 billion. Most candidates fail, so companies try to identify failures as early and cheaply as possible.

Discussed at 2:23

Where is Django used in the drug discovery process?

Django is used in computational chemistry and cheminformatics, especially for storing, retrieving, visualizing, and collaborating around complex chemical data during the early stages of drug discovery.

Discussed at 3:57

How does Design Tracker help pharmaceutical researchers?

Design Tracker lets computational chemists register compounds, view their structures, and track whether ideas have been made and tested. Teams use it to select promising compounds and collaborate across discovery projects.

Discussed at 9:23

Why was a browser-based Django application better than older pharmaceutical chemistry tools?

The Django application was more flexible and reliable than legacy X11 interfaces and Java Web Start tools, which could crash and force users to repeat their work. Running in a browser also made collaboration and features such as interactive hoverovers much easier.

Discussed at 10:57

How is Django used to provide cloud-based high-performance computing for drug discovery?

OpenEye’s Orion platform uses Django, Django REST Framework, and third-party packages to provide on-demand access to high-performance computing through Amazon’s cloud, while handling the enterprise restrictions pharmaceutical customers face.

Discussed at 11:43

Is Django secure and mature enough for enterprise pharmaceutical software?

The speaker says Django’s release schedule and security updates helped address concerns that Python and Django were not enterprise-ready or secure. Community support and the framework’s maturity made it easier to win approval for using Django in pharmaceutical systems.

Discussed at 12:30

Presenters

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos by Craig Bruce

More videos from Django Birthday