Commit 66441e0a by Celine Mercier

Fixed a bug when sending a DMS path to a C function from Cython

parent 13952358
......@@ -229,7 +229,7 @@ def run(config):
# Call cython alignment function
# Using default ID columns of the view. TODO discuss adding option
align_columns(i_dms.full_path, \
align_columns(i_dms.name_with_full_path, \
i_view_name, \
o_view_name, \
input_view_2_n = i_view_name_2, \
......
......@@ -81,7 +81,7 @@ def run(config):
input_view_name.append("taxonomy/"+config['obi']['taxoURI'].split("/")[-1])
comments = View.print_config(config, "build_ref_db", command_line, input_dms_name=input_dms_name, input_view_name=input_view_name)
if build_reference_db(i_dms.full_path, tobytes(i_view_name), tobytes(taxonomy_name), tobytes(o_view_name), comments, config['build_ref_db']['threshold']) < 0:
if build_reference_db(i_dms.name_with_full_path, tobytes(i_view_name), tobytes(taxonomy_name), tobytes(o_view_name), comments, config['build_ref_db']['threshold']) < 0:
raise Exception("Error building a reference database")
# If the input and output DMS are not the same, export result view to output DMS
......
......@@ -107,7 +107,7 @@ def run(config):
command_line = " ".join(sys.argv[1:])
comments = View.print_config(config, "clean", command_line, input_dms_name=[i_dms_name], input_view_name=[i_view_name])
if obi_clean(i_dms.full_path, tobytes(i_view_name), tobytes(config['clean']['sample-tag-name']), tobytes(o_view_name), comments, \
if obi_clean(i_dms.name_with_full_path, tobytes(i_view_name), tobytes(config['clean']['sample-tag-name']), tobytes(o_view_name), comments, \
config['clean']['distance'], config['clean']['ratio'], config['clean']['heads-only'], config['clean']['thread-count']) < 0:
raise Exception("Error running obiclean")
......
......@@ -178,8 +178,8 @@ def run(config):
# TODO: primers in comments?
if obi_ecopcr(i_dms.full_path, tobytes(i_view_name), tobytes(taxonomy_name), \
o_dms.full_path, tobytes(o_view_name), comments, \
if obi_ecopcr(i_dms.name_with_full_path, tobytes(i_view_name), tobytes(taxonomy_name), \
o_dms.name_with_full_path, tobytes(o_view_name), comments, \
tobytes(config['ecopcr']['primer1']), tobytes(config['ecopcr']['primer2']), \
config['ecopcr']['error'], \
config['ecopcr']['min-length'], config['ecopcr']['max-length'], \
......
......@@ -101,7 +101,7 @@ def run(config):
input_view_name.append("taxonomy/"+config['obi']['taxoURI'].split("/")[-1])
comments = View.print_config(config, "ecotag", command_line, input_dms_name=input_dms_name, input_view_name=input_view_name)
if obi_ecotag(i_dms.full_path, tobytes(i_view_name), \
if obi_ecotag(i_dms.name_with_full_path, tobytes(i_view_name), \
tobytes(ref_dms_name), tobytes(ref_view_name), \
tobytes(taxo_dms_name), tobytes(taxonomy_name), \
tobytes(o_view_name), comments,
......
......@@ -122,13 +122,24 @@ cdef class DMS(OBIWrapper):
@property
def full_path(self) :
'''
Returns the full path of the DMS directory
Returns the full path including the name with the extension of the DMS directory
@rtype: bytes
'''
return <bytes> self.pointer().directory_path
# DMS name with full path property getter
@property
def name_with_full_path(self) :
'''
Returns the full path with the name (meaning without the '.obidms' extension) of the DMS directory
@rtype: bytes
'''
return <bytes> self.full_path[:-7]
# command history DOT graph property getter in the form of a bytes string
@property
def dot_history_graph(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment