diff addBabelPath.py @ 0:ef3965a6b927 draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
author recetox
date Thu, 04 Mar 2021 18:50:15 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addBabelPath.py	Thu Mar 04 18:50:15 2021 +0000
@@ -0,0 +1,15 @@
+import sys
+
+# Script that replaces OpenBabel path in settings file used within Galaxy (tools installed via conda)#
+# python script.py /path/settings_file /babeldir/path
+
+fin = open(sys.argv[1], "r")
+fout = open("mysettings_galaxy.ini", "wt")
+
+for line in fin:
+    if "babeldir:" in line and "#" not in line:
+        fout.write("babeldir: '" + sys.argv[2] + "'\n")
+    else:
+        fout.write(line)
+fin.close()
+fout.close()