comparison markersSelection.py @ 5:af4f63f27c77 draft

planemo upload for repository https://github.com/sblanck/MPAgenomics4Galaxy/tree/master/mpagenomics_wrappers commit 11d660a2de749dae548b2fae0dd81f9f2b2c4b4f
author sblanck
date Wed, 08 Apr 2020 15:34:17 +0000
parents
children
comparison
equal deleted inserted replaced
4:bbf427bd6967 5:af4f63f27c77
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()