diff --git a/python/obitools3/commands/ecotag.pyx b/python/obitools3/commands/ecotag.pyx index 89a27de..bd4a59c 100755 --- a/python/obitools3/commands/ecotag.pyx +++ b/python/obitools3/commands/ecotag.pyx @@ -64,10 +64,10 @@ def run(config): ref_view_name = ref[1] # Check that the threshold demanded is greater than or equal to the threshold used to build the reference database - if config['ecotag']['threshold'] < eval(i_dms[ref_view_name].comments["ref_db_threshold"]) : + if config['ecotag']['threshold'] < eval(ref_dms[ref_view_name].comments["ref_db_threshold"]) : print("Error: The threshold demanded (%f) is lower than the threshold used to build the reference database (%f).", - config['ecotag']['threshold'], i_dms[ref_view_name].comments["ref_db_threshold"]) - + config['ecotag']['threshold'], ref_dms[ref_view_name].comments["ref_db_threshold"]) + # Open the output: only the DMS output = open_uri(config['obi']['outputURI'], input=False, @@ -126,9 +126,11 @@ def run(config): # If the input and the output DMS are different, delete the temporary result view in the input DMS if i_dms != o_dms: View.delete_view(i_dms, o_view_name) - o_dms.close() + o_dms.close(force=True) - i_dms.close() + taxo_dms.close(force=True) + ref_dms.close(force=True) + i_dms.close(force=True) logger("info", "Done.") diff --git a/python/obitools3/dms/dms.pyx b/python/obitools3/dms/dms.pyx index a5e9bc5..58bae28 100755 --- a/python/obitools3/dms/dms.pyx +++ b/python/obitools3/dms/dms.pyx @@ -94,16 +94,16 @@ cdef class DMS(OBIWrapper): return dms - def close(self) : + def close(self, force=False) : ''' - Closes the DMS instance and free the associated memory + Closes the DMS instance and free the associated memory (no counter, closing is final) The `close` method is automatically called by the object destructor. ''' cdef OBIDMS_p pointer = self.pointer() if self.active() : OBIWrapper.close(self) - if (obi_close_dms(pointer, False)) < 0 : + if (obi_close_dms(pointer, force=force)) < 0 : raise Exception("Problem closing an OBIDMS") @@ -254,7 +254,8 @@ cdef class DMS(OBIWrapper): # bash command history property getter @property def bash_history(self): - s = b"#!/bin/bash\n\n" + #s = b"#!${bash}/bin/bash\n\n" + s = b"" first = True for command in self.command_line_history: s+=b"#" diff --git a/python/obitools3/version.py b/python/obitools3/version.py index d3f119b..3c0fbba 100755 --- a/python/obitools3/version.py +++ b/python/obitools3/version.py @@ -1,5 +1,5 @@ major = 3 minor = 0 -serial= '0-beta11' +serial= '0-beta12a' version ="%d.%02d.%s" % (major,minor,serial)