Changeset 1590 for trunk/grails-app/conf/dbnp/configuration
- Timestamp:
- Mar 4, 2011, 4:28:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/dbnp/configuration/ExampleStudies.groovy
r1588 r1590 20 20 21 21 class ExampleStudies { 22 public static void addTestData() { 23 // get configuration 24 def config = ConfigurationHolder.config 25 26 // Look up the used ontologies which should be in the database by now 27 def speciesOntology = Ontology.getOrCreateOntologyByNcboId(1132) 28 def brendaOntology = Ontology.getOrCreateOntologyByNcboId(1005) 29 def nciOntology = Ontology.getOrCreateOntologyByNcboId(1032) 30 def chebiOntology = Ontology.getOrCreateOntologyByNcboId(1007) 31 32 // Add terms manually, to avoid having to do many HTTP requests to the BioPortal website 33 def mouseTerm = Term.getOrCreateTerm('Mus musculus',speciesOntology,'10090') 34 def humanTerm = Term.getOrCreateTerm('Homo sapiens',speciesOntology,'9606') 35 def arabTerm = Term.getOrCreateTerm('Arabidopsis thaliana',speciesOntology,'3702') 36 def tomatoTerm = Term.getOrCreateTerm('Solanum lycopersicum',speciesOntology,'4081') 37 def potatoTerm = Term.getOrCreateTerm('Solanum tuberosum',speciesOntology,'0000') 38 def bloodTerm = Term.getOrCreateTerm('blood plasma',brendaOntology,'BTO:0000131') 39 def c57bl6Term = Term.getOrCreateTerm('C57BL/6 Mouse',nciOntology,'C14424') 40 def glucoseTerm = Term.getOrCreateTerm('glucose',chebiOntology,'CHEBI:17234') 41 42 // Add SAM assay reference 43 def clinicalModule = new AssayModule( 44 name: 'SAM module for clinical data', 45 platform: 'clinical measurements', 46 url: config.modules.sam.url.toString() 47 ).save(failOnError:true) 48 49 // Add metabolomics assay reference 50 def metabolomicsModule = new AssayModule( 51 name: 'Metabolomics module', 52 platform: 'GCMS/LCMS', 53 url: config.modules.metabolomics.url.toString() 54 ).save(failOnError:true) 55 56 // Add metabolomics assay reference 57 def metagenomicsModule = new AssayModule( 58 name: 'Metagenomics module', 59 platform: 'High throughput sequencing', 60 url: config.modules.metagenomics.url.toString() 61 ).save(failOnError:true) 62 } 22 63 23 64 /** … … 51 92 52 93 // Add terms manually, to avoid having to do many HTTP requests to the BioPortal website 53 def mouseTerm = new Term( 54 name : 'Mus musculus', 55 ontology : speciesOntology, 56 accession : '10090' 57 ).save(failOnError:true) 58 59 def humanTerm = new Term( 60 name : 'Homo sapiens', 61 ontology : speciesOntology, 62 accession : '9606' 63 ).save(failOnError:true) 64 65 def arabTerm = new Term( 66 name : 'Arabidopsis thaliana', 67 ontology : speciesOntology, 68 accession : '3702' 69 ).save(failOnError:true) 70 71 def tomatoTerm = new Term( 72 name : 'Solanum lycopersicum', 73 ontology : speciesOntology, 74 accession : '4081' 75 ).save(failOnError:true) 76 77 def potatoTerm = new Term( 78 name : 'Solanum tuberosum', 79 ontology : speciesOntology, 80 accession : '0000' 81 ).save(failOnError:true) 82 83 def bloodTerm = new Term( 84 name : 'blood plasma', 85 ontology : brendaOntology, 86 accession : 'BTO:0000131' 87 ).save(failOnError:true) 88 89 def c57bl6Term = new Term( 90 name : 'C57BL/6 Mouse', 91 ontology : nciOntology, 92 accession : 'C14424' 93 ).save(failOnError:true) 94 95 def glucoseTerm = new Term( 96 name : 'glucose', 97 ontology : chebiOntology, 98 accession : 'CHEBI:17234' 99 ).save(failOnError:true) 94 def mouseTerm = Term.getOrCreateTerm('Mus musculus',speciesOntology,'10090') 95 def humanTerm = Term.getOrCreateTerm('Homo sapiens',speciesOntology,'9606') 96 def arabTerm = Term.getOrCreateTerm('Arabidopsis thaliana',speciesOntology,'3702') 97 def tomatoTerm = Term.getOrCreateTerm('Solanum lycopersicum',speciesOntology,'4081') 98 def potatoTerm = Term.getOrCreateTerm('Solanum tuberosum',speciesOntology,'0000') 99 def bloodTerm = Term.getOrCreateTerm('blood plasma',brendaOntology,'BTO:0000131') 100 def c57bl6Term = Term.getOrCreateTerm('C57BL/6 Mouse',nciOntology,'C14424') 101 def glucoseTerm = Term.getOrCreateTerm('glucose',chebiOntology,'CHEBI:17234') 100 102 101 103 // Create a few persons, roles and Affiliations … … 531 533 } 532 534 } 533 534 //package dbnp.configuration535 //536 ///**537 // * @Author kees538 // * @Since Jun 25, 2010539 // *540 // * Revision information:541 // * $Rev$542 // * $Author$543 // * $Date$544 // */545 //546 //import dbnp.studycapturing.*547 //import org.dbnp.gdt.*548 //import org.codehaus.groovy.grails.commons.GrailsApplication549 //import grails.util.GrailsUtil550 //import dbnp.rest.common.CommunicationManager551 //import org.codehaus.groovy.grails.commons.*552 //553 //554 //class ExampleStudies {555 //556 // /**557 // * Add example studies. This function is meant to be called only in development mode558 // */559 // public static void addExampleStudies(dbnp.authentication.SecUser owner, dbnp.authentication.SecUser otherUser) {560 // "inserting initial studies".grom()561 //562 // // get configuration563 // def config = ConfigurationHolder.config564 //565 // // Look up the used ontologies which should be in the database by now566 // def speciesOntology = Ontology.getOrCreateOntologyByNcboId(1132)567 // def brendaOntology = Ontology.getOrCreateOntologyByNcboId(1005)568 // def nciOntology = Ontology.getOrCreateOntologyByNcboId(1032)569 // def chebiOntology = Ontology.getOrCreateOntologyByNcboId(1007)570 //571 // // Look up the used templates which should also be in the database by now572 // def studyTemplate = Template.findByName("Academic study")573 // def mouseTemplate = Template.findByName("Mouse")574 // def humanTemplate = Template.findByName("Human")575 // def dietTreatmentTemplate = Template.findByName("Diet treatment")576 // def boostTreatmentTemplate = Template.findByName("Compound challenge")577 // def liverSamplingEventTemplate = Template.findByName("Liver extraction")578 // def fastingTreatmentTemplate = Template.findByName("Fasting treatment")579 // def bloodSamplingEventTemplate = Template.findByName("Blood extraction")580 // def humanTissueSampleTemplate = Template.findByName("Human tissue sample")581 // def humanBloodSampleTemplate = Template.findByName("Human blood sample")582 // def ccAssayTemplate = Template.findByName("Clinical chemistry assay")583 // def metAssayTemplate = Template.findByName("Metabolomics assay")584 //585 // // Add terms manually, to avoid having to do many HTTP requests to the BioPortal website586 // def mouseTerm = new Term(587 // name : 'Mus musculus',588 // ontology : speciesOntology,589 // accession : '10090'590 // ).with { if (!validate()) { errors.each { println it} } else save()}591 //592 // def humanTerm = new Term(593 // name : 'Homo sapiens',594 // ontology : speciesOntology,595 // accession : '9606'596 // ).with { if (!validate()) { errors.each { println it} } else save()}597 //598 // def arabTerm = new Term(599 // name : 'Arabidopsis thaliana',600 // ontology : speciesOntology,601 // accession : '3702'602 // ).with { if (!validate()) { errors.each { println it} } else save()}603 //604 // def tomatoTerm = new Term(605 // name : 'Solanum lycopersicum',606 // ontology : speciesOntology,607 // accession : '4081'608 // ).with { if (!validate()) { errors.each { println it} } else save()}609 //610 // def potatoTerm = new Term(611 // name : 'Solanum tuberosum',612 // ontology : speciesOntology,613 // accession : '0000'614 // ).with { if (!validate()) { errors.each { println it} } else save()}615 //616 // def bloodTerm = new Term(617 // name : 'blood plasma',618 // ontology : brendaOntology,619 // accession : 'BTO:0000131'620 // ).with { if (!validate()) { errors.each { println it} } else save()}621 //622 // def c57bl6Term = new Term(623 // name : 'C57BL/6 Mouse',624 // ontology : nciOntology,625 // accession : 'C14424'626 // ).with { if (!validate()) { errors.each { println it} } else save()}627 //628 // def glucoseTerm = new Term(629 // name : 'glucose',630 // ontology : chebiOntology,631 // accession : 'CHEBI:17234'632 // ).with { if (!validate()) { errors.each { println it} } else save()}633 //634 // // Create a few persons, roles and Affiliations635 // def affiliation1 = new PersonAffiliation(636 // institute : "Science Institute NYC",637 // department : "Department of Mathematics"638 // ).save();639 // def affiliation2 = new PersonAffiliation(640 // institute : "InfoStats GmbH, Hamburg",641 // department : "Life Sciences"642 // ).save();643 // def role1 = new PersonRole(644 // name : "Principal Investigator"645 // ).save();646 // def role2 = new PersonRole(647 // name : "Statician"648 // ).save();649 //650 // // Create persons651 // def person1 = new Person(652 // lastName : "Scientist",653 // firstName : "John",654 // gender : "Male",655 // initials : "J.R.",656 // email : "john@scienceinstitute.com",657 // phone : "1-555-3049",658 // address : "First street 2,NYC"659 // ).addToAffiliations(affiliation1).addToAffiliations(affiliation2).save();660 //661 // def person2 = new Person(662 // lastName : "Statician",663 // firstName : "Jane",664 // gender : "Female",665 // initials : "W.J.",666 // email : "jane@statisticalcompany.de",667 // phone : "49-555-8291",668 // address : "Dritten strasse 38, Hamburg, Germany"669 // ).addToAffiliations(affiliation2).save();670 //671 // // Create 30 persons to test pagination672 // def personCounter = 1;673 // 30.times {674 // new Person(675 // firstName : "Person #${personCounter}",676 // lastName : "Testperson",677 // email : "email${personCounter++}@testdomain.com"678 // ).save()679 // }680 //681 // // Create a few publications682 // def publication1 = new Publication(683 // title : "Postnatal development of hypothalamic leptin receptors",684 // authorsList : "Cottrell EC, Mercer JG, Ozanne SE.",685 // pubMedID : "20472140",686 // comments : "Not published yet",687 // DOI : "unknown"688 // ).save();689 //690 // def publication2 = new Publication(691 // title : "Induction of regulatory T cells decreases adipose inflammation and alleviates insulin resistance in ob/ob mice",692 // authorsList : "Ilan Y, Maron R, Tukpah AM, Maioli TU, Murugaiyan G, Yang K, Wu HY, Weiner HL.",693 // pubMedID : "20445103",694 // comments : "",695 // DOI : ""696 // ).save();697 //698 // // Add example mouse study699 // def mouseStudy = new Study(700 // template : studyTemplate,701 // title : "NuGO PPS3 mouse study leptin module",702 // description : "C57Bl/6 mice were fed a high fat (45 en%) or low fat (10 en%) diet after a four week run-in on low fat diet.",703 // code : "PPS3_leptin_module",704 // researchQuestion: "Leptin etc.",705 // ecCode : "2007117.c",706 // startDate : Date.parse('yyyy-MM-dd', '2008-01-02'),707 // owner : owner,708 // readers : [otherUser]709 // ).with { if (!validate()) { errors.each { println it} } else save()}710 //711 // def evLF = new Event(712 // startTime : 3600,713 // endTime : 3600 + 7 * 24 * 3600,714 // template : dietTreatmentTemplate715 // ).setFieldValue('Diet', 'low fat')716 //717 // def evHF = new Event(718 // startTime : 3600,719 // endTime : 3600 + 7 * 24 * 3600,720 // template : dietTreatmentTemplate721 // ).setFieldValue('Diet', 'high fat')722 //723 // def evBV = new Event(724 // startTime : 3600,725 // endTime : 3600 + 7 * 24 * 3600,726 // template : boostTreatmentTemplate727 // ).setFieldValue('Control', 'true')728 //729 // def evBL = new Event(730 // startTime : 3600,731 // endTime : 3600 + 7 * 24 * 3600,732 // template : boostTreatmentTemplate733 // ).setFieldValue('Control', 'false')734 //735 // def evLF4 = new Event(736 // startTime : 3600,737 // endTime : 3600 + 4 * 7 * 24 * 3600,738 // template : dietTreatmentTemplate739 // ).setFieldValue('Diet', 'low fat')740 //741 // def evHF4 = new Event(742 // startTime : 3600,743 // endTime : 3600 + 4 * 7 * 24 * 3600,744 // template : dietTreatmentTemplate745 // ).setFieldValue('Diet', 'high fat')746 //747 // def evBV4 = new Event(748 // startTime : 3600,749 // endTime : 3600 + 4 * 7 * 24 * 3600,750 // template : boostTreatmentTemplate751 // ).setFieldValue('Control', 'true')752 //753 // def evBL4 = new Event(754 // startTime : 3600,755 // endTime : 3600 + 4 * 7 * 24 * 3600,756 // template : boostTreatmentTemplate757 // ).setFieldValue('Control', 'false')758 //759 // def evS = new SamplingEvent(760 // startTime : 3600 + 7 * 24 * 3600,761 // template : liverSamplingEventTemplate,762 // sampleTemplate: humanTissueSampleTemplate).setFieldValue('Sample weight', 5F)763 //764 // def evS4 = new SamplingEvent(765 // startTime : 3600 + 7 * 24 * 3600,766 // template : liverSamplingEventTemplate,767 // sampleTemplate: humanTissueSampleTemplate).setFieldValue('Sample weight', 5F)768 //769 // // Add events to study770 // mouseStudy.addToEvents(evLF).addToEvents(evHF).addToEvents(evBV).addToEvents(evBL).addToEvents(evLF4).addToEvents(evHF4).addToEvents(evBV4).addToEvents(evBL4).addToSamplingEvents(evS).addToSamplingEvents(evS4).with { if (!validate()) { errors.each { println it} } else save()}771 //772 // // Extra check if the SamplingEvents are saved correctly773 // evS.with { if (!validate()) { errors.each { println it} } else save()}774 // evS4.with { if (!validate()) { errors.each { println it} } else save()}775 //776 // def LFBV1 = new EventGroup(name: "10% fat + vehicle for 1 week").addToEvents(evLF).addToEvents(evBV).addToSamplingEvents(evS)777 //778 // def LFBL1 = new EventGroup(name: "10% fat + leptin for 1 week").addToEvents(evLF).addToEvents(evBL).addToSamplingEvents(evS)779 //780 // def HFBV1 = new EventGroup(name: "45% fat + vehicle for 1 week").addToEvents(evHF).addToEvents(evBV).addToSamplingEvents(evS)781 //782 // def HFBL1 = new EventGroup(name: "45% fat + leptin for 1 week").addToEvents(evHF).addToEvents(evBL).addToSamplingEvents(evS)783 //784 // def LFBV4 = new EventGroup(name: "10% fat + vehicle for 4 weeks").addToEvents(evLF4).addToEvents(evBV4).addToSamplingEvents(evS4)785 //786 // def LFBL4 = new EventGroup(name: "10% fat + leptin for 4 weeks").addToEvents(evLF4).addToEvents(evBL4).addToSamplingEvents(evS4)787 //788 // def HFBV4 = new EventGroup(name: "45% fat + vehicle for 4 weeks").addToEvents(evHF4).addToEvents(evBV4).addToSamplingEvents(evS4)789 //790 // def HFBL4 = new EventGroup(name: "45% fat + leptin for 4 weeks").addToEvents(evHF4).addToEvents(evBL4).addToSamplingEvents(evS4)791 //792 // // Add subjects and samples and compose EventGroups793 // def x = 1794 // 80.times {795 // def currentSubject = new Subject(796 // name: "A" + x++,797 // species: mouseTerm,798 // template: mouseTemplate,799 // ).setFieldValue("Gender", "Male").setFieldValue("Genotype", c57bl6Term).setFieldValue("Age", 17).setFieldValue("Cage", "" + (int) (x / 2))800 //801 // // We have to save the subject first, otherwise the parentEvent property of the sample cannot be set802 // // (this is possibly a Grails or Hibernate bug)803 // mouseStudy.addToSubjects(currentSubject)804 // currentSubject.with { if (!validate()) { errors.each { println it} } else save()}805 //806 // // Add subject to appropriate EventGroup807 // if (x > 70) { HFBL4.addToSubjects(currentSubject).save() }808 // else if (x > 60) { HFBV4.addToSubjects(currentSubject).save() }809 // else if (x > 50) { LFBL4.addToSubjects(currentSubject).save() }810 // else if (x > 40) { LFBV4.addToSubjects(currentSubject).save() }811 // else if (x > 30) { HFBL1.addToSubjects(currentSubject).save() }812 // else if (x > 20) { HFBV1.addToSubjects(currentSubject).save() }813 // else if (x > 10) { LFBL1.addToSubjects(currentSubject).save() }814 // else { LFBV1.addToSubjects(currentSubject).save() }815 //816 // // Create sample817 // def currentSample = new Sample(818 // name: currentSubject.name + '_B',819 // material: bloodTerm,820 // template: humanBloodSampleTemplate,821 // parentSubject: currentSubject,822 // parentEvent: evS //x > 40 ? evS4 : evS823 // );824 // mouseStudy.addToSamples(currentSample)825 // currentSample.with { if (!validate()) { errors.each { println it} } else save()}826 // currentSample.setFieldValue("Text on vial", "T" + (Math.random() * 100L))827 // }828 //829 // // Add EventGroups to study830 // mouseStudy.addToEventGroups(LFBV1).addToEventGroups(LFBL1).addToEventGroups(HFBV1).addToEventGroups(HFBL1).addToEventGroups(LFBV4).addToEventGroups(LFBL4).addToEventGroups(HFBV4).addToEventGroups(HFBL4).with { if (!validate()) { errors.each { println it} } else save()}831 //832 // // Add persons and publications to study833 // def studyperson1 = new StudyPerson(person: person1, role: role1)834 // def studyperson2 = new StudyPerson(person: person2, role: role2)835 //836 // mouseStudy.addToPersons(studyperson1).addToPersons(studyperson2).addToPublications(publication1).addToPublications(publication2).with { if (!validate()) { errors.each { println it} } else save()}837 //838 // def humanStudy = new Study(839 // template : studyTemplate,840 // title : "NuGO PPS human study",841 // code : "PPSH",842 // researchQuestion: "How much are fasting plasma and urine metabolite levels affected by prolonged fasting ?",843 // description : "Human study performed at RRI; centres involved: RRI, IFR, TUM, Maastricht U.",844 // ecCode : "unknown",845 // startDate : Date.parse('yyyy-MM-dd', '2008-01-14'),846 // owner : owner,847 // writers : [otherUser]848 // ).with { if (!validate()) { errors.each { println it} } else save()}849 //850 // def rootGroup = new EventGroup(name: 'Root group');851 //852 // def fastingEvent = new Event(853 // startTime : 3 * 24 * 3600 + 22 * 3600,854 // endTime : 3 * 24 * 3600 + 30 * 3600,855 // template : fastingTreatmentTemplate).setFieldValue('Fasting period', '8h');856 //857 // def bloodSamplingEventBefore = new SamplingEvent(858 // startTime : 0,859 // template : bloodSamplingEventTemplate,860 // sampleTemplate : humanBloodSampleTemplate).setFieldValue('Sample volume', 4.5F);861 //862 // def bloodSamplingEventAfter = new SamplingEvent(863 // startTime : 3 * 24 * 3600 + 30 * 3600,864 // template : bloodSamplingEventTemplate,865 // sampleTemplate : humanBloodSampleTemplate).setFieldValue('Sample volume', 4.5F);866 //867 // rootGroup.addToEvents fastingEvent868 // rootGroup.addToSamplingEvents bloodSamplingEventBefore869 // rootGroup.addToSamplingEvents bloodSamplingEventAfter870 // rootGroup.save()871 //872 // humanStudy.addToEvents(fastingEvent)873 // humanStudy.addToSamplingEvents(bloodSamplingEventBefore)874 // humanStudy.addToSamplingEvents(bloodSamplingEventAfter)875 // humanStudy.addToEventGroups rootGroup876 //877 // humanStudy.save()878 //879 // def y = 1880 // 11.times {881 // def currentSubject = new Subject(882 // name : "" + y++,883 // species : humanTerm,884 // template : humanTemplate885 // ).setFieldValue("Gender", (Math.random() > 0.5) ? "Male" : "Female")886 // //.setFieldValue("DOB", new java.text.SimpleDateFormat("dd-mm-yy").parse("01-02-19" + (10 + (int) (Math.random() * 80)))).setFieldValue("DOB", new Date().parse("dd/mm/yyyy", ((10 + (int) Math.random() * 18) + "/0" + (1 + (int) (Math.random() * 8)) + "/19" + (10 + (int) (Math.random() * 80))))).setFieldValue("Age", 30).setFieldValue("Height", Math.random() * 2F).setFieldValue("Weight", Math.random() * 150F).setFieldValue("BMI", 20 + Math.random() * 10F)887 //888 // humanStudy.addToSubjects(currentSubject)889 // currentSubject.with { if (!validate()) { errors.each { println it} } else save()}890 //891 // rootGroup.addToSubjects currentSubject892 // rootGroup.save()893 //894 // def currentSample = new Sample(895 // name : currentSubject.name + '_B',896 // material : bloodTerm,897 // template : humanBloodSampleTemplate,898 // parentSubject: currentSubject,899 // parentEvent : bloodSamplingEventBefore900 // );901 //902 // humanStudy.addToSamples(currentSample)903 // currentSample.with { if (!validate()) { errors.each { println it} } else save()}904 // currentSample.setFieldValue("Text on vial", "T" + (Math.random() * 100L))905 //906 // currentSample = new Sample(907 // name : currentSubject.name + '_A',908 // material : bloodTerm,909 // template : humanBloodSampleTemplate,910 // parentSubject: currentSubject,911 // parentEvent : bloodSamplingEventAfter912 // );913 //914 // humanStudy.addToSamples(currentSample)915 // currentSample.with { if (!validate()) { errors.each { println it} } else save()}916 // currentSample.setFieldValue("Text on vial", "T" + (Math.random() * 100L))917 // }918 //919 // // Add persons to study920 // def studyperson3 = new StudyPerson(person: person1, role: role2)921 // humanStudy.addToPersons(studyperson3).addToPublications(publication2).with { if (!validate()) { errors.each { println it} } else save()}922 //923 // // Add SAM assay reference924 // def clinicalModule = new AssayModule(925 // name: 'SAM module for clinical data',926 // platform: 'clinical measurements',927 // url: config.modules.sam.url.toString()928 // ).with { if (!validate()) { errors.each { println it} } else save()}929 //930 // // Add metabolomics assay reference931 // def metabolomicsModule = new AssayModule(932 // name: 'Metabolomics module',933 // platform: 'GCMS/LCMS',934 // url: config.modules.metabolomics.url.toString()935 // ).with { if (!validate()) { errors.each { println it} } else save()}936 //937 // // Add metabolomics assay reference938 // def metagenomicsModule = new AssayModule(939 // name: 'Metagenomics module',940 // platform: 'High throughput sequencing',941 // url: config.modules.metagenomics.url.toString()942 // ).with { if (!validate()) { errors.each { println it} } else save()}943 //944 // def lipidAssayRef = new Assay(945 // name: 'Lipid profiling',946 // template: ccAssayTemplate,947 // module: clinicalModule,948 // externalAssayID: 'PPS3_SAM'949 // )950 //951 // def metAssayRef = new Assay(952 // name: 'Lipidomics profile',953 // template: metAssayTemplate,954 // module: metabolomicsModule,955 // externalAssayID: 'PPS3_Lipidomics'956 // ).setFieldValue('Spectrometry technique', 'LC/MS')957 //958 // mouseStudy.samples*.each {959 // lipidAssayRef.addToSamples(it)960 // metAssayRef.addToSamples(it)961 // }962 //963 // mouseStudy.addToAssays(lipidAssayRef);964 // mouseStudy.addToAssays(metAssayRef);965 // mouseStudy.save()966 //967 // def glucoseAssayBRef = new Assay(968 // name : 'Glucose assay before',969 // template : ccAssayTemplate,970 // module : clinicalModule,971 // externalAssayID: 'PPSH-Glu-B'972 // )973 //974 // def glucoseAssayARef = new Assay(975 // name : 'Glucose assay after',976 // template : ccAssayTemplate,977 // module : clinicalModule,978 // externalAssayID: 'PPSH-Glu-A'979 // )980 //981 // def metAssayRefB = new Assay(982 // name : 'Lipidomics profile before',983 // template : metAssayTemplate,984 // module : metabolomicsModule,985 // externalAssayID: 'PPSH_Lipidomics_start'986 // ).setFieldValue('Spectrometry technique', 'GC/MS')987 //988 // def metAssayRefA = new Assay(989 // name : 'Lipidomics profile after',990 // template : metAssayTemplate,991 // module : metabolomicsModule,992 // externalAssayID: 'PPSH_Lipidomics_end'993 // ).setFieldValue('Spectrometry technique', 'GC/MS')994 //995 //996 // // Add sequencing (metagenomics) assays997 // def sequencingAssay16SRef = new Assay(998 // name : '16S Sequencing assay',999 // template : ccAssayTemplate,1000 // module : metagenomicsModule,1001 // externalAssayID: 'PPSH-SEQ-16S'1002 // )1003 //1004 // // Add sequencing (metagenomics) assays1005 // def sequencingAssay18SRef = new Assay(1006 // name : '18S Sequencing assay',1007 // template : ccAssayTemplate,1008 // module : metagenomicsModule,1009 // externalAssayID: 'PPSH-SEQ-18S'1010 // )1011 //1012 // humanStudy.samples*.each {1013 // if (it.parentEvent.startTime == 0) {1014 // glucoseAssayBRef.addToSamples(it)1015 // metAssayRefB.addToSamples(it)1016 // }1017 // else {1018 // glucoseAssayARef.addToSamples(it)1019 // metAssayRefA.addToSamples(it)1020 // sequencingAssay16SRef.addToSamples(it)1021 // sequencingAssay18SRef.addToSamples(it)1022 // }1023 // }1024 //1025 // humanStudy.addToAssays(sequencingAssay16SRef)1026 // humanStudy.addToAssays(sequencingAssay18SRef)1027 // humanStudy.addToAssays(glucoseAssayARef)1028 // humanStudy.addToAssays(glucoseAssayBRef)1029 // humanStudy.addToAssays(metAssayRefA)1030 // humanStudy.addToAssays(metAssayRefB)1031 // humanStudy.save()1032 // }1033 //}
Note: See TracChangeset
for help on using the changeset viewer.