diff addBabelPath.py @ 0:0b28816c1c2c draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
author recetox
date Thu, 18 May 2023 13:01:04 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addBabelPath.py	Thu May 18 13:01:04 2023 +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()