Permalink
Browse files

Merge branch 'master' of https://github.com/evast/transmart-xnat-impo…

  • Loading branch information...
2 parents ae77b1b + a0bec14 commit 1fff22e65876b5484ec91d1dac3f8f1d23e4ae17 @evast committed Oct 13, 2015
View
@@ -0,0 +1,18 @@
+The TranSMART-XNAT-Importer plugin can import clinical image-derived data from XNAT and store them in TranSMART.
+
+![alt tag](https://raw.github.com/evast/transmart-xnat-importer-plugin/master/docs/navigator.png)
+XNAT Data hierarchy shown in TranSMART ontology.
+
+TranSMART-XNAT Coupling
+----------
+
+TranSMART (http://transmartfoundation.org) is a data integration and browsing platform for central statistical analysis in translational research.
+
+XNAT (www.xnat.org) is a framework to store, share and manage medical imaging data. This imaging archive can be connected to a computing cluster for further image analyses. After analyses of the images, the analysis results (e.g. grey matter volumes) can be stored back in XNAT.
+
+To correlate the image-derived results with other medical data, such as demographic or genetic data, it would be useful to import the XNAT results in TranSMART. To this end, we developed the TranSMART-XNAT-Importer plugin. To configure which XNAT image-derived data is imported in TranSMART, an administrator can create a coupling configuration in the online administration panel and start the import process. The plugin uses the default ETL Importer for clinical data to import the XNAT results in TranSMART.
+
+Documentation and Installation
+------------------------------
+
+More information about the plugin and installation instructions can be found in [TranSMART-XNAT-Importer-plugin-manual.pdf](https://github.com/evast/transmart-xnat-importer-plugin/blob/master/docs/TranSMART-XNAT-Importer-plugin-manual.pdf?raw=true) in the directory docs. A user-guide to import data with step-by-step instructions and screenshots can be found in the same document.
Binary file not shown.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,4 +1,3 @@
-import org.springframework.util.StringUtils
import org.transmart.searchapp.ImportXnatConfiguration;
import org.transmart.searchapp.ImportXnatVariable;
import groovy.xml.MarkupBuilder
@@ -8,7 +7,6 @@ import groovy.xml.MarkupBuilder
*/
class ImportXnatController {
- def springSecurityService
def grailsApplication
// the delete, save and update actions only accept POST requests
@@ -176,13 +174,22 @@ class ImportXnatController {
def kettledir = (getScriptsLocation() + "/xnattotransmartlink/")
def datadir = (getScriptsLocation() + "/xnattotransmartlink/")
- def process = ("python " + getScriptsLocation() + "/xnattotransmartlink/downloadscript.py ${url} ${username} ${password} ${project} ${node} ${kettledir} ${datadir}").execute(null, new File(getScriptsLocation() + "/xnattotransmartlink"))
+ def cmd = "python " +
+ getScriptsLocation() +
+ "/xnattotransmartlink/downloadscript.py" +
+ " ${url} ${username} ${password} ${project} ${node} ${kettledir} ${datadir}"
+ log.debug(cmd)
+ def process = (cmd).execute(null, new File(getScriptsLocation() + "/xnattotransmartlink"))
process.waitFor()
- if (process.err.text == "") {
- flash.message = "${process.in.text}"
+ def inText = process.in.text
+ def errText = process.err.text
+ if (errText) {
+ log.error(errText)
+ flash.message = "${errText}</br>${inText}"
} else {
- flash.message = "${process.err.text}</br>${process.in.text}"
- }
+ log.info(inText)
+ flash.message = inText
+ }
redirect action: import_wizard, id: importXnatConfiguration.id
}
@@ -13,7 +13,8 @@ CREATE TABLE searchapp.import_xnat_configuration (
);
ALTER TABLE searchapp.import_xnat_configuration OWNER TO searchapp;
GRANT ALL ON TABLE searchapp.import_xnat_configuration TO searchapp;
-
+GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE searchapp.import_xnat_configuration TO biomart_user;
+GRANT ALL ON TABLE searchapp.import_xnat_configuration TO tm_cz;
--
-- Name: pk_import_xnat_configuration; Type: CONSTRAINT; Schema: searchapp; Owner: -
--
@@ -10,7 +10,8 @@ CREATE TABLE searchapp.import_xnat_variable (
);
ALTER TABLE searchapp.import_xnat_variable OWNER TO searchapp;
GRANT ALL ON TABLE searchapp.import_xnat_variable TO searchapp;
-
+GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE searchapp.import_xnat_variable TO biomart_user;
+GRANT ALL ON TABLE searchapp.import_xnat_variable TO tm_cz;
--
-- Name: pk_import_xnat_var; Type: CONSTRAINT; Schema: searchapp; Owner: -
--
@@ -1,9 +1,10 @@
#!/bin/bash
-export KETTLE_HOME="/home/jenkins/transmart-data/env/tranSMART-ETL/Postgres/GPL-1.0/Kettle/Kettle-ETL/"
+export TS_DATA="/home/transmart/transmart-data/"
+export KETTLE_HOME="${TS_DATA}samples/postgres/kettle-home/"
-sh "/home/jenkins/transmart-data/env/data-integration/kitchen.sh" \
+sh "${TS_DATA}env/data-integration/kitchen.sh" \
-norep=N \
--file="/home/jenkins/transmart-data/env/tranSMART-ETL/Kettle-GPL/Kettle-ETL/create_clinical_data.kjb" \
+-file="${TS_DATA}env/tranSMART-ETL/Postgres/GPL-1.0/Kettle/Kettle-ETL/create_clinical_data.kjb" \
-log=load_clinical_data.log \
-param:LOAD_TYPE=I \
-param:COLUMN_MAP_FILE=xnat.tmm \
@@ -3,7 +3,7 @@
import pyxnat
import subprocess
import sys
-from elementtree.ElementTree import parse
+from xml.etree.ElementTree import parse
CONFIG_PATH = './'
CONFIG_EXTENSION = ".xml"

0 comments on commit 1fff22e

Please sign in to comment.