comparison markersSelection.py @ 5:b7f3854e08f8

Adding all tools
author blanck
date Wed, 29 Apr 2015 09:55:41 +0200
parents
children
comparison
equal deleted inserted replaced
4:2b882515e1a3 5:b7f3854e08f8
1 import os
2 import sys
3 import subprocess
4
5 def main():
6
7 inputdata=sys.argv[1]
8 response=sys.argv[2]
9 tmp_dir=sys.argv[3]
10 nbfold=sys.argv[4]
11 loss=sys.argv[5]
12 outputlog=sys.argv[6]
13 output=sys.argv[7]
14 log=sys.argv[8]
15
16 script_dir=os.path.dirname(os.path.abspath(__file__))
17
18 if (outputlog=="TRUE"):
19 errfile=open(log,'w')
20 else:
21 errfile=open(os.path.join(tmp_dir,"errfile.log"),'w')
22
23
24 retcode=subprocess.call(["Rscript", os.path.join(script_dir,"markersSelection.R"), inputdata, response, tmp_dir, nbfold, loss, output], stdout = errfile, stderr = errfile)
25
26 # if (plot=="TRUE"):
27 # shutil.copy(os.path.join(tmp_dir,"mpagenomics","Rplots.pdf"), pdffigures)
28
29 errfile.close()
30
31 sys.exit(retcode)
32
33 if __name__ == "__main__":
34 main()