Mercurial > repos > recetox > rmassbank
annotate addBabelPath.py @ 2:5a6bb93ec656 draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit bc3445f7c41271b0062c7674108f57708d08dd28
author | recetox |
---|---|
date | Thu, 30 May 2024 14:53:55 +0000 |
parents | 0b28816c1c2c |
children |
rev | line source |
---|---|
0
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
1 import sys |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
2 |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
3 # Script that replaces OpenBabel path in settings file used within Galaxy (tools installed via conda)# |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
4 # python script.py /path/settings_file /babeldir/path |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
5 |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
6 fin = open(sys.argv[1], "r") |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
7 fout = open("mysettings_galaxy.ini", "wt") |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
8 |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
9 for line in fin: |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
10 if "babeldir:" in line and "#" not in line: |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
11 fout.write("babeldir: '" + sys.argv[2] + "'\n") |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
12 else: |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
13 fout.write(line) |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
14 fin.close() |
0b28816c1c2c
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/rmassbank commit 02414aa4c20f249c2069e5e3d587e3a8cda923a8
recetox
parents:
diff
changeset
|
15 fout.close() |