# HG changeset patch # User jingchunzhu # Date 1437763171 25200 # Node ID d64a002c3b0c70d204daf1a3e6e9401574406cba # Parent d8dc482ef9705e5a54d0071f29de4fc0939e2af3 modify diff -r d8dc482ef970 -r d64a002c3b0c xena_import.py --- a/xena_import.py Thu Jul 23 16:14:33 2015 -0700 +++ b/xena_import.py Fri Jul 24 11:39:31 2015 -0700 @@ -118,29 +118,27 @@ xenaFileDir, genomicDataFile, xena.port()) - loadInToXena (xenaLoadCmd, fp2) + loadInToXena (xenaLoadCmd, genomicDataFile, 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, fp2) + loadInToXena (xenaLoadCmd, probeMapDataFile, fp2) + fp2.close() - -def loadInToXena (xenaLoadCmd, fp2): +def loadInToXena (xenaLoadCmd, name, fp2): + print xenaLoadCmd try: subprocess.call(xenaLoadCmd, shell=True) except: exc_type, exc_value, exc_traceback = sys.exc_info() lines = traceback.format_exception(exc_type, exc_value, exc_traceback) allLines = ''.join('!! ' + line for line in lines) + fp2.write("Unsuccessful: Import %s\n" % (name)) fp2.write("Unsuccessful: error %s\n" % allLines) - fp2.close() - sys.exit(-1) else: - fp2.write( "Import successful\n") - fp2.close() - sys.exit(0) + fp2.write( "Import %s is successful\n" % (name)) if __name__ == "__main__": main() diff -r d8dc482ef970 -r d64a002c3b0c xena_utils.py --- a/xena_utils.py Thu Jul 23 16:14:33 2015 -0700 +++ b/xena_utils.py Fri Jul 24 11:39:31 2015 -0700 @@ -41,15 +41,6 @@ return False return (content == "3.0") - """ - query = "wget -q -O- http://%s:%s/data/'(+ 1 2)'" % (hostname, xenaPort) - try: - result = subprocess.check_output(query, shell=True) - except: - return False - else: - return(result == "3.0") - """ def findUnusedPort(): """Find a random port that is available on the local system, and return