Mercurial > repos > tomnl > metfrag
changeset 7:0b3816a7a14b draft
planemo upload for repository https://github.com/computational-metabolomics/metfrag-galaxy commit 6dc5d494a84dd572f277dcd1c979e6edfb40383d
| author | tomnl |
|---|---|
| date | Thu, 05 Sep 2019 06:48:28 -0400 |
| parents | ceb9bd68f6bc |
| children | 9a3019c609d9 |
| files | config.ini metfrag.py metfrag.xml |
| diffstat | 3 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.ini Thu Sep 05 06:48:28 2019 -0400 @@ -0,0 +1,9 @@ +[MetChem] +LocalMetChemDatabase: metchem +LocalMetChemDatabasePortNumber: 5432 +LocalMetChemDatabaseUser: metchem +LocalMetChemDatabasePassword: metchem + + + +
--- a/metfrag.py Fri Aug 02 11:51:17 2019 -0400 +++ b/metfrag.py Thu Sep 05 06:48:28 2019 -0400 @@ -5,8 +5,7 @@ import sys import six import re -import random -import string +import ConfigParser import shutil import glob import tempfile @@ -60,6 +59,11 @@ args = parser.parse_args() print(args) + +config = ConfigParser.ConfigParser() +config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.ini')) + + if os.stat(args.input_pth).st_size == 0: print('Input file empty') exit() @@ -154,11 +158,11 @@ if args.MetFragDatabaseType == "LocalCSV": paramd["LocalDatabasePath"] = args.LocalDatabasePath elif args.MetFragDatabaseType == "MetChem": - paramd["LocalMetChemDatabase"] = "metchem" - paramd["LocalMetChemDatabasePortNumber"] = 5432 + paramd["LocalMetChemDatabase"] = config.get('MetChem', 'LocalMetChemDatabase') + paramd["LocalMetChemDatabasePortNumber"] = config.get('MetChem', 'LocalMetChemDatabasePortNumber') paramd["LocalMetChemDatabaseServerIp"] = args.LocalMetChemDatabaseServerIp - paramd["LocalMetChemDatabaseUser"] = "metchemro" - paramd["LocalMetChemDatabasePassword"] = "metchemro" + paramd["LocalMetChemDatabaseUser"] = config.get('MetChem', 'LocalMetChemDatabaseUser') + paramd["LocalMetChemDatabasePassword"] = config.get('MetChem', 'LocalMetChemDatabasePassword') paramd["FragmentPeakMatchAbsoluteMassDeviation"] = args.FragmentPeakMatchAbsoluteMassDeviation paramd["FragmentPeakMatchRelativeMassDeviation"] = args.FragmentPeakMatchRelativeMassDeviation
--- a/metfrag.xml Fri Aug 02 11:51:17 2019 -0400 +++ b/metfrag.xml Thu Sep 05 06:48:28 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="metfrag" name="MetFrag" version="2.4.5+galaxy0.1.11"> +<tool id="metfrag" name="MetFrag" version="2.4.5+galaxy0.1.12"> <description> </description> <requirements> <requirement type="package" version="2.4.5">metfrag</requirement> @@ -63,6 +63,10 @@ --score_thrshld $PostProcessFilter.score_thrshld --pctexplpeak_thrshld $PostProcessFilter.pctexplpeak_thrshld + + + + ]]></command> <inputs>
