Mercurial > repos > recetox > rmassbank
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ef3965a6b927 |
|---|---|
| 1 import sys | |
| 2 | |
| 3 # Script that replaces OpenBabel path in settings file used within Galaxy (tools installed via conda)# | |
| 4 # python script.py /path/settings_file /babeldir/path | |
| 5 | |
| 6 fin = open(sys.argv[1], "r") | |
| 7 fout = open("mysettings_galaxy.ini", "wt") | |
| 8 | |
| 9 for line in fin: | |
| 10 if "babeldir:" in line and "#" not in line: | |
| 11 fout.write("babeldir: '" + sys.argv[2] + "'\n") | |
| 12 else: | |
| 13 fout.write(line) | |
| 14 fin.close() | |
| 15 fout.close() |
