Mercurial > repos > sblanck > mpagenomics_wrappers
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/markersSelection.py Wed Apr 08 15:34:17 2020 +0000 @@ -0,0 +1,34 @@ +import os +import sys +import subprocess + +def main(): + + inputdata=sys.argv[1] + response=sys.argv[2] + tmp_dir=sys.argv[3] + nbfold=sys.argv[4] + loss=sys.argv[5] + outputlog=sys.argv[6] + output=sys.argv[7] + log=sys.argv[8] + + script_dir=os.path.dirname(os.path.abspath(__file__)) + + if (outputlog=="TRUE"): + errfile=open(log,'w') + else: + errfile=open(os.path.join(tmp_dir,"errfile.log"),'w') + + + retcode=subprocess.call(["Rscript", os.path.join(script_dir,"markersSelection.R"), inputdata, response, tmp_dir, nbfold, loss, output], stdout = errfile, stderr = errfile) + +# if (plot=="TRUE"): +# shutil.copy(os.path.join(tmp_dir,"mpagenomics","Rplots.pdf"), pdffigures) + + errfile.close() + + sys.exit(retcode) + +if __name__ == "__main__": + main() \ No newline at end of file