Mercurial > repos > recetox > rmassbank
annotate 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 |
| rev | line source |
|---|---|
|
0
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
1 import sys |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
2 |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
3 # Script that replaces OpenBabel path in settings file used within Galaxy (tools installed via conda)# |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
4 # python script.py /path/settings_file /babeldir/path |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
5 |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
6 fin = open(sys.argv[1], "r") |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
7 fout = open("mysettings_galaxy.ini", "wt") |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
8 |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
9 for line in fin: |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
10 if "babeldir:" in line and "#" not in line: |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
11 fout.write("babeldir: '" + sys.argv[2] + "'\n") |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
12 else: |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
13 fout.write(line) |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
14 fin.close() |
|
ef3965a6b927
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 683f472a44f296d65cf572a5e720839fc4c0141e"
recetox
parents:
diff
changeset
|
15 fout.close() |
