Changeset 136 for trunk/grails-app/conf


Ignore:
Timestamp:
Jan 26, 2010, 10:48:51 AM (14 years ago)
Author:
keesvb
Message:

added start of NuGO PPS3 to BootStrap?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r135 r136  
    2424                        // ontologies
    2525                        def speciesOntology = new Ontology(
    26                                 name: 'Species',
    27                                 shortName: 'Species',
     26                                name: 'NCBI Taxonomy',
     27                                shortName: 'Taxon',
    2828                                url: 'http://www.obofoundry.org/cgi-bin/detail.cgi?id=ncbi_taxonomy'
    2929                        ).save()
     
    5151                        */
    5252
    53                         // define template fields
    54                         def genotypeTemplateField = new TemplateSubjectField(
    55                                 name: 'Genotype',
    56                                 type: TemplateFieldType.STRINGLIST
    57                         ).save()
    58 
    5953                        // Mouse template
    6054                        def mouseTemplate = new Template(
    6155                                name: 'Mouse'
    62                         ).addToSubjectFields(genotypeTemplateField).save()
     56                        ).addToSubjectFields(new TemplateSubjectField(
     57                                name: 'Genotype',type: TemplateFieldType.STRINGLIST))
     58                        .addToSubjectFields(new TemplateSubjectField(
     59                                name: 'Age',type: TemplateFieldType.NUMBER)
     60                        ).save()
    6361
    6462                        // studies
    65                         new Study(title:"test",code:"code",researchQuestion:"Rquestion",description:"description",ecCode:"ecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
     63                        def exampleStudy = new Study(
     64                                title:"NuGO PPS3 mouse study leptin module",
     65                                code:"PPS3_leptin_module",
     66                                researchQuestion:"Leptin etc.",
     67                                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. After 1 week 10 mice that received a low fat diet were given an IP leptin challenge and 10 mice of the low-fat group received placebo injections. The same procedure was performed with mice that were fed the high-fat diet. After 4 weeks the procedure was repeated. In total 80 mice were culled.",
     68                                ecCode:"2007117.c",
     69                                startDate: Date.parse('yyyy-MM-dd','2007-12-11'))
     70                        def x=1
     71                        12.times {
     72                                exampleStudy.addToSubjects(new Subject(
     73                                        name: "A" + x++,
     74                                        species: mouseTerm,
     75                                        templateStringFields: ["Genotype" : "C57/Bl6j"],
     76                                        templateNumberFields: ["Age" : 17F]
     77                                ))}
     78                        exampleStudy.save()
     79
    6680                        new Study(title:"example",code:"Excode",researchQuestion:"ExRquestion",description:"Exdescription",ecCode:"ExecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
    6781                        new Study(title:"testAgain",code:"testcode",researchQuestion:"testRquestion",description:"testdescription",ecCode:"testCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
Note: See TracChangeset for help on using the changeset viewer.