Construction of Biomedical Database Applications                                    Case Study:                           ...
PlayersStarting May 2011, LAS stems from the joined efforts of IRCC and the Politecnico of Torino                         ...
Context – Personalized Medicine in Oncology    ASSUMPTION I:    Cancer is a genetic disease caused by the progressive accu...
Context – Personalized Medicine in OncologyASSUMPTION II:If mutations are causative, in general terms their quality is lik...
Context – Personalized Medicine in OncologyASSUMPTION III:Mutations (or their surrogates) can be exploited to stratify pat...
Context – Personalized Medicine in OncologyEVIDENCE I:Precision cancer medicine works: Selective inhibition of „driver‟ mu...
Context – Personalized Medicine in Oncology EVIDENCE II:a. Precision cancer medicine stands on exceptionsb. „Drivers‟ not ...
Context – Personalized Medicine in Oncology CONSIDERATION I:Reliable preclinical models are needed to prioritize hypothesi...
Context – Personalized Medicine in Oncology CONSIDERATION II:Direct transplantation of surgical specimens in immunocomprom...
Context – Experimental Model
Context – Facts & Numbers   N° of collectedspecimens       22                                148            235         48...
Data Flow                   Tissue                      Aliquots          BIOBANKING OperationTreatments                  ...
RequirementsData Entry•   Real-time•   Time saving•   User friendly•   Error proofData Analysis•   Integrative•   Reproduc...
From theory to practice
Waterfall model                 • Feasibility studyRequirements     • Requirements analysis                 • Requirements...
Agile model              • Customer satisfaction by rapid delivery of useful                software              • Welcom...
Database design• Conceptual design. The purpose is to  represent the informal requirements of an  application in terms of ...
The Entity Relationship model• Conceptual data model• Provides a series of constructs  capable of describing the data  req...
ER constructs• Entity  • represents classes of objects (facts, things, people, for example) that have properties in    com...
ER constructs• Identifiers  • specified for each entity  • describe the concepts (attributes and/or entities) of the schem...
Logical designGoals• Construction of a relational schema• Representing correctly and efficiently all of the information de...
Data flow example
Database design exampleMouse (barcode, status, gender, deathDate, birthDate)
Database design example            Mouse (barcode, status, gender,            deathDate, birthDate,            mouseStrain...
Database design exampleExplant (date, operator, mouseBarcode, scope)Aliquot (barcode, tissueType, tumorType, explantDate*,...
Database design example
Database design exampleMouse (barcode, status, gender, deathDate, birthDate, mouseStrainName)MouseStrain (mouseStrainName,...
Querying the database• SQL (Structured Query Language)  • designed for managing data held in a relational database managem...
Model View Controller
• High-level Python Web framework that encourages rapid development  and clean, pragmatic design• Makes it easier to build...
Build a django project$ django-admin.py startproject xenopatients                 • command-line utility to interact with ...
Run server$ ./manage.py runserverValidating models...0 errors foundMarch 07, 2013 - 15:50:53Django version 1.5, using sett...
Create application$ python manage.py startapp xenos              • application belonging to the Django project            ...
Define the modelEdit the file /xenos/models.pyclass Mice(models.Model):   barcode = models.BigIntegerField(primary_key=Tru...
Define the urls and viewsEdit the file /xenos/urls.pyurlpatterns = patterns(,  (r^$, views.index),  (r^miceloading/$, view...
Activate the admin siteEdit the file /xenopatients/urls.pyfrom django.conf.urls.defaults import *# Uncomment the next two ...
Activate the admin site
References• Software Engineering  • I. Sommerville (2010) “Software Engineering (9th Edition)”  • I. Sommerville (2007) “I...
References (context)• Personalized medicine in oncology  • Hait WN, Cancer Discov 1, 383 (2011).  • MacConaill LE et al., ...
Upcoming SlideShare
Loading in …5
×

LAS - System Biology Lesson

503 views

Published on

PhD Lesson

Published in: Technology
  • Be the first to comment

  • Be the first to like this

LAS - System Biology Lesson

  1. 1. Construction of Biomedical Database Applications Case Study: Laboratory Assistant Suite
  2. 2. PlayersStarting May 2011, LAS stems from the joined efforts of IRCC and the Politecnico of Torino IRCC contribution • Strategy • Working- and Data-flow analysis • User interface definition • On-site implementation POLITO contribution • Database & Data warehouse • Analytical tools & software features • IT
  3. 3. Context – Personalized Medicine in Oncology ASSUMPTION I: Cancer is a genetic disease caused by the progressive accumulation of gene mutationsFigure 11.12 The Biology of Cancer (© Garland Science 2007)
  4. 4. Context – Personalized Medicine in OncologyASSUMPTION II:If mutations are causative, in general terms their quality is likely to influence the behavior (biology)of the system, in particular they are predicted to determining responses to perturbations (e.g.drugs)
  5. 5. Context – Personalized Medicine in OncologyASSUMPTION III:Mutations (or their surrogates) can be exploited to stratify patients for therapy
  6. 6. Context – Personalized Medicine in OncologyEVIDENCE I:Precision cancer medicine works: Selective inhibition of „driver‟ mutations can result in dramaticclinical benefit
  7. 7. Context – Personalized Medicine in Oncology EVIDENCE II:a. Precision cancer medicine stands on exceptionsb. „Drivers‟ not always are „targets‟ Exceptions become rules only if confirmed on a population basis: • Only 10% of NSCLCs harbour EGFR mutations, and only 40% of EGFR- mutant tumours respond to EGFR inhibitors: • overall prevalence of responders: 4% • Only 4% of NSCLCs harbour ALK translocations, and only 50% of ALK- translocated tumours respond to ALK inhibitors: • overall prevalence of responders: 2% • Response to BRAF or MEK inhibition in BRAF mutant melanoma: 60% • Response to BRAF or MEK inhibition in BRAF mutant CRC: 2%
  8. 8. Context – Personalized Medicine in Oncology CONSIDERATION I:Reliable preclinical models are needed to prioritize hypothesis validation in patients (clinical trials)due to ethical, economical and social constrains. • Understanding inter-individual tumour heterogeneity needs a reference background: • Focus on one specific tumour type • Pinpointing exceptions needs big numbers: • Collect many cases • Identifying exceptions (and the contextual mutational milieu) needs integrated approaches with reliable outcomes: • Multi-dimensional genomic exploration of high-quality tumour material
  9. 9. Context – Personalized Medicine in Oncology CONSIDERATION II:Direct transplantation of surgical specimens in immunocompromized mice can generate a highfidelity preclinical platform for anticipation of clinical results • Reliable simulation of phase II trials for investigational drugs • Identification of new predictive biomarkers for approved drugs • Multi parametric evaluation of genetic determinants for patients stratification • Comparative evaluation of alternative treatment protocols
  10. 10. Context – Experimental Model
  11. 11. Context – Facts & Numbers N° of collectedspecimens 22 148 235 480 614Oct 2008 Oct 2010 May 2011 Apr 2012 Jan 2013 CRC Evaluation of LAS LASbanking commercial LIMS project startedstarted solution started working LAS manages (starting April 2012): • 622 surgical samples collection • 7158 mice • 18537 measures of tumour growth • 1656 mice treated with 44 different protocols&schedules • 51131 archived aliquots of biological material
  12. 12. Data Flow Tissue Aliquots BIOBANKING OperationTreatments Explants Derived Implants Storage Aliquots MouseMeasurements XENOPATIENTSEXPERIMENTSNext Generation Sequecing Molecular Experiments Images
  13. 13. RequirementsData Entry• Real-time• Time saving• User friendly• Error proofData Analysis• Integrative• Reproducible• Intuitive• No programming skills required
  14. 14. From theory to practice
  15. 15. Waterfall model • Feasibility studyRequirements • Requirements analysis • Requirements definition • Define software system functions Design • Establish an overall system architecture • Unified Modeling Language (UML) • Code generationImplementation • Definition of logically separable part of the software (units) • Unit testing done by the developer • Integration and testing of the complete system Verification • Testing units against the requirements as specified • System delivered to the client • Identification of problems Maintenance • Errors fixed • Performance improvements
  16. 16. Agile model • Customer satisfaction by rapid delivery of useful software • Welcome changing requirements, even late in development • Working software is delivered frequently • Working software is the principal measure of progress • Sustainable development • Close cooperation • Face-to-face conversation is the best form of communication (co-location) • Continuous attention to technical excellence and good design • Simplicity - the art of maximizing the amount of work not done - is essential • Self-organizing teams • Regular adaptation to changing circumstances
  17. 17. Database design• Conceptual design. The purpose is to represent the informal requirements of an application in terms of a conceptual schema that refers to a conceptual data model• Logical design. Translation of the conceptual schema, defined in the preceding phase, into the logical schema of the database that refers to a logical data model• Physical design. The logical schema is completed with the details of the physical implementation (file organization and indexes) on a given DBMS. The product is called the physical schema and refers to a physical data model
  18. 18. The Entity Relationship model• Conceptual data model• Provides a series of constructs capable of describing the data requirements• Easy to understand• Independent of the criteria for the management and organization of data on a database system• For every construct, there is a corresponding graphical representation.• Allows to define an E-R schema diagrammatically
  19. 19. ER constructs• Entity • represents classes of objects (facts, things, people, for example) that have properties in common and an autonomous existence• Attribute • describes the elementary properties of entities or relationships• Relationship • represents logical links between two or more entities• Cardinalities • specified for each entity participating in a relationship • describe the maximum and minimum number of relationship occurrences in which an entity occurrence can participate • for the minimum cardinality, zero or one • for the maximum cardinality, one or many (N)
  20. 20. ER constructs• Identifiers • specified for each entity • describe the concepts (attributes and/or entities) of the schema allowing the unambiguous identification of the entity occurrences • internal identifier (key) • formed by one or more attributes of the entity itself • external identifier (foreign key) • when the attributes of an entity are not sufficient to identify its occurrences unambiguously • other entities need to be involved in the identification • the entity to identify participates with cardinality equal to (1,1) into the relationship• Generalization • represents logical links between entities (i.e., 1 parent and one or more children) • the parent entity is more general in the sense that it comprises child entities as a particular case
  21. 21. Logical designGoals• Construction of a relational schema• Representing correctly and efficiently all of the information described by an ER schemaDesign steps• Restructuring of the Entity-Relationship schema• Optimization of the schema• Translation into the logical model Entity1 (ID1, attr_a, attr_b, …) Entity2 (ID2, attr_x, attr_y, …) Relationship1 (ID1, ID2, attr_r, …)
  22. 22. Data flow example
  23. 23. Database design exampleMouse (barcode, status, gender, deathDate, birthDate)
  24. 24. Database design example Mouse (barcode, status, gender, deathDate, birthDate, mouseStrainName) MouseStrain (mouseStrainName, description, linkToDoc)
  25. 25. Database design exampleExplant (date, operator, mouseBarcode, scope)Aliquot (barcode, tissueType, tumorType, explantDate*, explantOperator*,mouseBarcode*)Implant (date, operator, aliquotBarcode, badQuality, site, mouseBarcode)
  26. 26. Database design example
  27. 27. Database design exampleMouse (barcode, status, gender, deathDate, birthDate, mouseStrainName)MouseStrain (mouseStrainName, description, linkToDoc)Explant (date, operator, mouseBarcode, scope)Aliquot (barcode, tissueType, tumorType, explantDate*, explantOperator*,mouseBarcode*)Implant (date, operator, aliquotBarcode, badQuality, site, mouseBarcode)MeasurementSerie (date,time, type)MouseIsMeasured (date,time,mouseBarcode, value)
  28. 28. Querying the database• SQL (Structured Query Language) • designed for managing data held in a relational database management systems • example: SELECT barcode, mouseStrainName FROM Mouse M, Explant E WHERE M.barcode = E.mouseBarcode AND status = ‘Implanted’;• ORM (Object-relational mapping) • programming technique for converting data between incompatible type systems in object-oriented programming languages • creates a "virtual object database“ used from within the programming language • maps database table rows to objects • allows to establish relations between those objects
  29. 29. Model View Controller
  30. 30. • High-level Python Web framework that encourages rapid development and clean, pragmatic design• Makes it easier to build better Web apps more quickly and with less code• The Web framework for perfectionists with deadlines Features • MVC architecture • Testing framework • Object- Relation Mapper • Solid security emphasis • Templating Language • Send emails easily • Automatic Language • Nice support for forms • Elegant urls • Great docs • Unicode support • Friendly community • Cache framework
  31. 31. Build a django project$ django-admin.py startproject xenopatients • command-line utility to interact with the Django project • the actual Python package of the project • used to import anything inside it • indicates that this directory is a Python package • settings/configuration for the project • URL declarations • an entry-point for WSGI-compatible webservers to serve your project
  32. 32. Run server$ ./manage.py runserverValidating models...0 errors foundMarch 07, 2013 - 15:50:53Django version 1.5, using settings ‘xenopatients.settingsDevelopment server is running at http://127.0.0.1:8000/Quit the server with CONTROL-C.
  33. 33. Create application$ python manage.py startapp xenos • application belonging to the Django project • indicates that this directory is a Python package • defines python classes mapped on database tables • simple routines to check the operation of the code • defines a “type” of Web page to serve a specific function with a specific template • each view is represented by a simple Python function
  34. 34. Define the modelEdit the file /xenos/models.pyclass Mice(models.Model): barcode = models.BigIntegerField(primary_key=True, editable=False) birth_date = models.DateField(db_column= birthdate, blank=True) death_date = models.DateField(db_column= deathdate, blank=True) gender = models.CharField(max_length=1) status = models.CharField(max_length=20) id_mouse_strain = models.ForeignKey(‘Mouse_strain’, blank=True, db_column=id_mouse_strain) def __unicode__(self): return self.barcodeclass Mouse_strain(models.Model): id_strain = models.BigIntegerField(primary_key=True, editable=False) mouse_strain_name = models.CharField(max_length=45, unique=True) description = models.TextField() linkToDoc = models.CharField(max_length=80) def __unicode__(self): return self.mouse_strain_name
  35. 35. Define the urls and viewsEdit the file /xenos/urls.pyurlpatterns = patterns(, (r^$, views.index), (r^miceloading/$, views.miceLoading), (r^miceStatus/$, views.changeStatus), …Edit the file /xenos/views.py@login_requireddef index(request): if request.method == GET: name = request.user.username return render_to_response(index.html, {name:name}, RequestContext(request)) …
  36. 36. Activate the admin siteEdit the file /xenopatients/urls.pyfrom django.conf.urls.defaults import *# Uncomment the next two lines to enable the admin:from django.contrib import adminadmin.autodiscover()urlpatterns = patterns(,# Uncomment the next line to enable the admin:(r^admin/, include(admin.site.urls)),
  37. 37. Activate the admin site
  38. 38. References• Software Engineering • I. Sommerville (2010) “Software Engineering (9th Edition)” • I. Sommerville (2007) “Ingegneria del software” • R. Miles, K. Hamilton (2006) “Learning UML 2.0” • M. Fowler (2010) “UML distilled. Guida rapida al linguaggio di modellazione standard”• Database • C. Coronel, S. Morris, P. Rob (2012) “Database Systems: Design, Implementation, and Management” • P. Atzeni, S. Ceri, S. Paraboschi, R. Torlone (2009) “Basi di dati – Modelli e linguaggi di interrogazione”• Python & Django • A. Martelli (2006) “Python in a Nutshell, Second Edition” • M. Lutz (2009) “Learning Python: Powerful Object-Oriented Programming” • M. Dawson (2010) “Python Programming for the Absolute Beginner, 3rd Edition” • Django website https://www.djangoproject.com/ • A. Holovaty, J. Kaplan-Moss (2009) “The Definitive Guide to Django: Web Development Done Right” • M. Beri (2009) “Sviluppare applicazioni web con Django”
  39. 39. References (context)• Personalized medicine in oncology • Hait WN, Cancer Discov 1, 383 (2011). • MacConaill LE et al., Cancer Discov 1, 297 ( 2011). • Haber Da, Gray NS, Baselga J, Cell 145, 19 (2011).• Unmet needs and preclinical models • de Bono JS, Ashworth A, Nature 467, 543 (2010). • Tentler JJ et al., Nat Rev Clin Oncol 9, 338 (2012).• Our work • Baralis E et al., J Med Systems ( 2012). • Migliardi G et al., Clin Cancer Res 18, 2515 ( 2012). • Bertotti A et al., Cancer Discov 1, 508 (2011). • Galimi F et al., Clin Cancer Res 17, 3146 ( 2011).

×