# HG changeset patch # User jingchunzhu # Date 1437765157 25200 # Node ID 1ef1886dae049de04f2fca27dad9e0802a58ad20 # Parent 97325a1202d21871580f5e95a32e3b91898fb286 data import sucess/unsuccess message more informative diff -r 97325a1202d2 -r 1ef1886dae04 xena_import.py --- 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()