# HG changeset patch # User linda.bakker@wur.nl # Date 1433325252 -7200 # Node ID f0c6feab06e79456f790c91fb946f69af415b2be # Parent 43902da5d00ee5d8e917825a0c90d3aa83e0a7fa fixed import match_library diff -r 43902da5d00e -r f0c6feab06e7 GCMS/library_lookup.py --- a/GCMS/library_lookup.py Wed May 06 08:06:53 2015 +0200 +++ b/GCMS/library_lookup.py Wed Jun 03 11:54:12 2015 +0200 @@ -1,11 +1,20 @@ ''' Logic for searching a Retention Index database file given output from NIST ''' -import match_library +import os +import sys +import inspect import re -import sys import csv + +#a not so perfect solution to import parent dir file match_library +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(currentdir) +sys.path.append(parentdir) +import match_library + + __author__ = "Marcel Kempenaar" __contact__ = "brs@nbic.nl" __copyright__ = "Copyright, 2012, Netherlands Bioinformatics Centre" @@ -303,7 +312,7 @@ def main(): ''' Library Lookup main function - ''' + ''' library_file = sys.argv[1] nist_tabular_filename = sys.argv[2] ctype = sys.argv[3]