Changeset 836 for trunk


Ignore:
Timestamp:
Aug 25, 2010, 9:44:58 AM (13 years ago)
Author:
keesvb
Message:

added some example assay templates, started with implementation of assay and assay group steps in wizard

Location:
trunk/grails-app
Files:
4 edited

Legend:

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

    r835 r836  
    3838                def humanTissueSampleTemplate = Template.findByName("Human tissue sample")
    3939                def humanBloodSampleTemplate = Template.findByName("Human blood sample")
    40                
     40                def ccAssayTemplate = Template.findByName("Clinical chemistry assay")
     41                def metAssayTemplate = Template.findByName("Metabolomics assay")
    4142
    4243                // Add terms manually, to avoid having to do many HTTP requests to the BioPortal website
     
    481482                def lipidAssayRef = new Assay(
    482483                        name: 'Lipid profiling',
     484                        template: ccAssayTemplate,
    483485                        module: clinicalModule,
    484486                        externalAssayID: 'PPS3_SAM'
     
    487489                def metAssayRef = new Assay(
    488490                        name: 'Lipidomics profile',
     491                        template: metAssayTemplate,
    489492                        module: metabolomicsModule,
    490493                        externalAssayID: 'PPS3_Lipidomics'
    491494                )
     495                .setFieldValue('Spectrometry technique','LC/MS')
    492496
    493497                mouseStudy.samples*.each {
     
    504508                def  glucoseAssayBRef = new Assay(
    505509                        name: 'Glucose assay before',
     510                        template: ccAssayTemplate,
    506511                        module: clinicalModule,
    507512                        externalAssayID: 'PPSH-Glu-B'
     
    510515                def  glucoseAssayARef = new Assay(
    511516                        name: 'Glucose assay after',
     517                        template: ccAssayTemplate,
    512518                        module: clinicalModule,
    513519                        externalAssayID: 'PPSH-Glu-A'
     
    516522                def metAssayRefB = new Assay(
    517523                        name: 'Lipidomics profile before',
     524                        template: metAssayTemplate,
    518525                        module: metabolomicsModule,
    519526                        externalAssayID: 'PPSH_Lipidomics_start'
    520527                )
     528                .setFieldValue('Spectrometry technique','GC/MS')
    521529
    522530                def metAssayRefA = new Assay(
    523531                        name: 'Lipidomics profile after',
     532                        template: metAssayTemplate,
    524533                        module: metabolomicsModule,
    525534                        externalAssayID: 'PPSH_Lipidomics_end'
    526535                )
     536                .setFieldValue('Spectrometry technique','GC/MS')
     537
    527538                humanStudy.samples*.each {
    528539                        if (it.parentEvent.startTime == 0) {
  • trunk/grails-app/conf/BootStrapTemplates.groovy

    r776 r836  
    591591                println ".adding plant sampling event template"
    592592                def plantSamplingEventTemplate = new Template(
    593                         name: 'Plant-sample ',
     593                        name: 'Plant-sample',
    594594                        description: 'plant sample ',
    595595                        entity: dbnp.studycapturing.SamplingEvent,
     
    629629                .with { if (!validate()) { errors.each { println it} } else save()}
    630630
     631
     632                // assay templates
     633
     634                def assayDescriptionField = new TemplateField(
     635                                name: 'Description',
     636                            comment: 'add general assay information here',
     637                                entity: Assay,
     638                                type: TemplateFieldType.STRING
     639                );
     640                assayDescriptionField.with { if (!validate()) { errors.each { println it} } else save()}
     641
     642                println ".adding clinical chemistry assay template"
     643                def ccAssayTemplate = new Template(
     644                        name: 'Clinical chemistry assay',
     645                        description: 'Clinical chemistry assay stored in a SAM module',
     646                        entity: dbnp.studycapturing.Assay
     647                )
     648                .addToFields(assayDescriptionField)
     649                .with { if (!validate()) { errors.each { println it} } else save()}
     650
     651                println ".adding metabolomics assay template"
     652                def metAssayTemplate = new Template(
     653                        name: 'Metabolomics assay',
     654                        description: 'Metabolomics assay stored in a metabolomics module',
     655                        entity: dbnp.studycapturing.Assay
     656                )
     657                .addToFields(assayDescriptionField)
     658                .addToFields(
     659                        new TemplateField(
     660                                name: 'Spectrometry technique',
     661                            comment: 'Select the used metabolomics technique',
     662                                entity: Assay,
     663                                type: TemplateFieldType.STRINGLIST,
     664                            listEntries: [
     665                                        new TemplateFieldListItem(name: 'GC/MS'),
     666                                new TemplateFieldListItem(name: 'LC/MS'),
     667                                new TemplateFieldListItem(name: 'NMR'),
     668                                new TemplateFieldListItem(name: 'HPLC')
     669                            ])
     670                )
     671                .with { if (!validate()) { errors.each { println it} } else save()}
    631672        }
    632673
  • trunk/grails-app/views/wizard/pages/_assay_groups.gsp

    r823 r836  
    1616%>
    1717<wizard:pageContent>
    18 assay groups
     18        <span class="info">
     19                <span class="title">Assign samples to assays</span>
     20                In the previous page you defined assays. In this page, you can define which assays are performed on which samples.
     21                The samples are grouped according to the EventGroups of their defining SamplingEvents.
     22        </span>
     23
     24        <%
     25            // TODO: render a table of assays (in the columns) versus samples (in the rows)
     26                // with the samples grouped according to the EventGroups of the parent SamplingEvents
     27                // and with all boxes checked by default
     28        %>
     29
    1930</wizard:pageContent>
  • trunk/grails-app/views/wizard/pages/_assays.gsp

    r825 r836  
    1818        <span class="info">
    1919                <span class="title">Add assays to your study</span>
    20                 WE NEED SOME CONTENT OVER HERE, who's the brilliant copy writer? :)
     20                In this step you can define the various assays that were performed within this study.
     21                The actual (omics) data for these assays should reside in one of the assay modules that is coupled to this database (see Assay Modules).
    2122        </span>
    2223
     24        <wizard:textFieldElement name="addNumber" description="Number of assays to add" error="addNumber" value="${values?.addNumber}" size="4" maxlength="4">
     25                The number of subjects to add to your study
     26        </wizard:textFieldElement>
    2327        <wizard:templateElement name="template" description="Template" value="${assay?.template}" entity="${dbnp.studycapturing.Assay}" addDummy="true" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" >
    2428                Choose the type of assay you would like to add
    2529        </wizard:templateElement>
     30        <%
     31            // TODO: switch single flow.assay to multiple flow.assays and finish this page
     32        %>
    2633        <g:if test="${assay}">
    2734        <wizard:templateElements entity="${assay}" />
    2835        </g:if>
     36        <wizard:ajaxButtonElement name="add" value="Add" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()">
     37        </wizard:ajaxButtonElement>
    2938
     39       
    3040</wizard:pageContent>
Note: See TracChangeset for help on using the changeset viewer.