Permalink
Browse files

Merge pull request #194 from TNO/master

Merge TNO master into PhenotypeFoundation master
  • Loading branch information...
ferryjagers committed Jan 3, 2019
2 parents 8a486d3 + 53519bc commit 705c695fe4569164417ea6128e2e2cc72d95eb28
@@ -2,4 +2,4 @@
#Sat Jan 05 12:13:45 CET 2013
app.grails.version=2.5.6
app.name=gscf
app.version=2.1.2
app.version=2.1.4
@@ -1,3 +1,4 @@
import grails.util.Environment
import org.codehaus.groovy.grails.commons.GrailsApplication

/**
@@ -16,13 +17,17 @@ import org.codehaus.groovy.grails.commons.GrailsApplication
// config files can either be Java properties files or ConfigSlurper scripts
//
grails.config.locations = [
// the default configuration properties
// The default configuration properties
"classpath:default.properties",
// The default configuration properties for run-app mode
"file:${basedir}/grails-app/conf/default.properties",

// the external configuration to override the default
// configuration (e.g. ~/.gscf/ci.properties)
"file:${userHome}/.${appName}/${grails.util.GrailsUtil.environment}.properties",
"file:${userHome}/.${appName}/${grails.util.GrailsUtil.environment}.groovy"
// The external configuration to override the default
"file:${userHome}/.${appName}/${Environment.getCurrent().getName()}.groovy",

// DEPRECATED
//"file:${userHome}/.${appName}/${Environment.getCurrent().getName()}.properties",
"file:${userHome}/.grails/${appName}-${Environment.getCurrent().getName()}-config.groovy"
]

grails.config.locations.each { println "Reading configuration from ${it}" }
@@ -53,28 +58,43 @@ grails.converters.encoding = "UTF-8"
grails.enable.native2ascii = true

log4j = {
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
String logFile = "${userHome}/.grails/logs/${appName}_${Environment.getCurrent().getName()}_stacktrace.log"
println "Logging to: ${logFile}"

appenders {
console name:'stdout', layout:pattern(conversionPattern: '%d{yyyy-MM-dd/HH:mm:ss.SSS} %x %-5p %c{2} - %m%n')
rollingFile name:'stacktrace', file:logFile, maxFileSize:"10MB", maxBackupIndex: 10, append:true, layout:pattern(conversionPattern: '%d{yyyy-MM-dd/HH:mm:ss.SSS} %x %-5p %c{2} - %m%n')
}

root {
info 'stacktrace','stdout'
error()
additivity = true
}

error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'

warn 'org.codehaus.groovy.grails.orm.hibernate',
'org.hibernate' // hibernate integration
warn 'org.codehaus.groovy.grails.orm.hibernate',
'org.hibernate' // hibernate integration

error 'grails.app.services.org.grails.plugin.resource',
'grails.app.taglib.org.grails.plugin.resource'

all 'grails.app', 'dbnp.query', 'dbnp.importer', 'org.dbxp.matriximporter', 'org.dbxp.sam', "dbnp.modules"
// error 'org.grails.plugin.resource',
// 'grails.app.resourceMappers.org.grails.plugin.resource'

// Disable logging for resources plugin
error 'grails.app.services.org.grails.plugin.resource',
'grails.app.taglib.org.grails.plugin.resource',
'grails.app.resourceMappers.org.grails.plugin.resource',
'org.grails.plugin.resource'
// all 'grails.app', 'dbnp.query', 'dbnp.importer', 'org.dbxp.matriximporter', 'org.dbxp.sam', "dbnp.modules"
warn 'grails.app', 'dbnp.query', 'dbnp.importer', 'org.dbxp.matriximporter', 'org.dbxp.sam', "dbnp.modules"
}

graphviz {
@@ -475,12 +475,15 @@ class ApiController {

apiService.getMeasurementDataForAssay(assay, user).each() { feature, featureMeasurements ->
featureMeasurements.each() { sampleId, value ->
Sample sample = Sample.read(sampleId)

Sample sample = Sample.read( sampleId )

String featureName = feature.intern()
String eventGroupName = sample.getParentEventGroupName().intern()
String subjectEventGroupStartTime = sample.getParentSubjectEventGroupStartTimeString().intern()
String sampleRelativeStartTime = sample.getSampleRelativeStartTimeString().intern()
String subjectEventGroupStartTime = sample.getParentSubjectEventGroupStartTime().toString().intern()
String sampleRelativeStartTime = sample.getSampleRelativeStartTime().toString().intern()
String subjectGroupName = sample.getParentSubjectEventGroup().getSubjectGroup().getName().intern()
String sampleTypeName = sample.getParentEvent().getEvent().getName().intern()
String subjectName = sample.getParentSubjectName().intern()

if ( !measurements[featureName] ) {
@@ -499,7 +502,15 @@ class ApiController {
measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime] = [:]
}

measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime].put(subjectName, value)
if ( !measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime][subjectGroupName] ) {
measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime][subjectGroupName] = [:]
}

if ( !measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime][subjectGroupName][sampleTypeName] ) {
measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime][subjectGroupName][sampleTypeName] = [:]
}

measurements[featureName][eventGroupName][subjectEventGroupStartTime][sampleRelativeStartTime][subjectGroupName][sampleTypeName].put(subjectName, value)
count += 1
}
}
@@ -181,7 +181,7 @@
Names in <div style="display: inline-block; color: #808080">gray</div> are already mapped on previous occasions.
</span>

<g:form action="submitFeatures">
<g:form action="submitFeatures" id="featureForm" name="featureForm">
<g:hiddenField name="module" value="${module}"/>
<fieldset>
<table>
@@ -217,7 +217,7 @@
</fieldset>

<p class="options">
<a href="#" onClick="submit()" class="next">Submit</a>
<a href="#" onClick="$('#featureForm').submit()" class="next">Submit</a>
</p>
</g:form>

@@ -21,7 +21,7 @@
</span>

<g:if test="${apiKeyConfigured}">
<g:form action="listFeatures">
<g:form action="listFeatures" id="platformForm" name="platformForm">
<g:hiddenField name="module" value="${module}"/>
<fieldset>
<legend>Parameters</legend>
@@ -45,7 +45,7 @@
</fieldset>

<p class="options">
<a href="#" onClick="submit()" class="next">Next</a>
<a href="#" onClick="$('#platformForm').submit()" class="next">Next</a>
</p>
</g:form>
</g:if>
@@ -19,7 +19,7 @@
Successfully added an external identifier to the Features in the list below.
</span>

<g:form controller="SAMHome">
<g:form controller="SAMHome" id="submitForm" name="submitForm">
<g:hiddenField name="module" value="${module}"/>
<fieldset>
%{--<legend>Parameters</legend>--}%
@@ -39,7 +39,7 @@
</fieldset>

<p class="options">
<a href="#" onClick="submit()" class="next">Back to Home</a>
<a href="#" onClick="$('#submitForm').submit()" class="next">Back to Home</a>
%{--<g:link controller="SAMHome" params="${[module: module]}" class="next">Back to home</g:link>--}%
</p>
</g:form>

0 comments on commit 705c695

Please sign in to comment.