changeset 38:1ef1886dae04

data import sucess/unsuccess message more informative
author jingchunzhu
date Fri, 24 Jul 2015 12:12:37 -0700
parents 97325a1202d2
children 066ae9df2d27
files xena_import.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/xena_import.py	Fri Jul 24 11:41:38 2015 -0700
+++ b/xena_import.py	Fri Jul 24 12:12:37 2015 -0700
@@ -118,13 +118,18 @@
                                                            xenaFileDir,
                                                            genomicDataFile, 
                                                            xena.port())
-    loadInToXena (xenaLoadCmd, genomicDataFile, fp2)
+    if args.label is not None:
+        name = args.label
+    else:
+        name = genomicDataFile
+    loadInToXena (xenaLoadCmd, name, fp2)
+
     if args.probeMap is not None:
         xenaLoadCmd = "java -jar %s -l --force %s/%s -p %s" % (xena.jarPath(),
                                                                xenaFileDir,
                                                                probeMapDataFile,
                                                                xena.port())
-        loadInToXena (xenaLoadCmd, probeMapDataFile, fp2)
+        loadInToXena (xenaLoadCmd, "id to gene mapping file for %s" % (name), fp2)
     fp2.close()
 
 def loadInToXena (xenaLoadCmd, name, fp2):
@@ -138,7 +143,7 @@
         fp2.write("Unsuccessful: Import %s\n" % (name))
         fp2.write("Unsuccessful: error %s\n" % allLines)
     else:
-        fp2.write( "Import %s is successful\n" % (name))
+        fp2.write( "Importing %s is successful\n" % (name))
 
 if __name__ == "__main__":
     main()