changeset 49:8da6920a39ac

add hg19 assembly in xena_import
author jingchunzhu
date Sun, 09 Aug 2015 23:23:58 -0700
parents d717d0c4c8f1
children 3167c1a26101
files xena_import.py xena_import.xml
diffstat 2 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/xena_import.py	Sun Aug 09 22:39:09 2015 -0700
+++ b/xena_import.py	Sun Aug 09 23:23:58 2015 -0700
@@ -54,6 +54,7 @@
     parser.add_argument("--label", type=str, default=None)
     parser.add_argument("--colNormalization", type=bool, default=False)
     parser.add_argument("--probeMap", type=str, default=None)
+    parser.add_argument("--assembly", type=str, default=None)
     args = parser.parse_args()
 
     fp2 = open(args.outfile, "w")
@@ -90,7 +91,8 @@
             updateColNormalization(metadata)
         if args.probeMap is not None:
             metadata[':probeMap'] = probeMapDataFile
-            
+        if args.assembly:
+            metadata['assembly'] = args.assembly
         jsonMetadata = json.dumps(metadata, indent=2) 
         fp = open(jsonMetadataTargetPathname, "w")
         fp.write("%s\n" % (jsonMetadata))
--- a/xena_import.xml	Sun Aug 09 22:39:09 2015 -0700
+++ b/xena_import.xml	Sun Aug 09 23:23:58 2015 -0700
@@ -26,9 +26,14 @@
         --probeMap "${format.withProbeMap.probeMapFile}"
     #end if
 
-    #if $colNormalization:
+    #if $format.metadataType == "genomicMatrix" and $format.colNormalization:
         --colNormalization 1
     #end if
+
+    #if $format.metadataType == "mutationVector" and $format.assembly:
+        --assembly "${format.assembly}"
+    #end if
+
   </command>
   <inputs>
     <param format="data" type="data" name="xenaInputData" label="Data to import to Xena" optional="false"/>
@@ -81,8 +86,10 @@
 	  <when value="protein expression RPPA"/>
 	  <when value="PARADIGM pathway activity"/>
 	</conditional>
-    
+	
+	<param type="boolean" name="colNormalization" label="Apply Column Normalization" checked="false"/>    
       </when>
+
       <when value="clinicalMatrix">
 	<conditional name="isCustom">
 	  <param type="select" name="dataSubType" label="Type of data">
@@ -95,10 +102,14 @@
 	  <when value="phenotype"/>
 	</conditional>
       </when>
-      <when value="mutationVector"/>
+
+      <when value="mutationVector">
+	<param type="select" name="assembly"  label ="assembly">
+	  <option value = "hg19"> hg19</option>
+	</param>
+      </when>
     </conditional>
     <param type="text" name="label" label="Display Name (Optional)" optional="true"/>
-    <param type="boolean" name="colNormalization" label="Apply Column Normalization" checked="false"/>
   </inputs>
   <outputs>
     <data format="txt" name="outfile"/>