Mercurial > repos > peter-waltman > ucsc_cluster_tools2
comparison cluster.tools/select.k.from.consensus.cluster.py @ 0:0decf3fd54bc draft
Uploaded
| author | peter-waltman |
|---|---|
| date | Thu, 28 Feb 2013 01:45:39 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:0decf3fd54bc |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 import os | |
| 3 import sys | |
| 4 import subprocess | |
| 5 | |
| 6 select_script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "select.k.from.consensus.cluster.R") | |
| 7 survival_script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "gen.survival.curves.R") | |
| 8 | |
| 9 cmd_args = [ "Rscript", select_script_path ] + sys.argv[1:] + [ "-z", survival_script_path ] | |
| 10 | |
| 11 print cmd_args | |
| 12 | |
| 13 proc = subprocess.Popen( cmd_args, stderr=subprocess.PIPE, stdout=subprocess.PIPE ) | |
| 14 (stdoutdata, stderrdata) = proc.communicate() | |
| 15 if proc.returncode: | |
| 16 sys.stderr.write(stderrdata) | |
| 17 sys.stdout.write(stdoutdata) |
