Commands: updated for JSON formatted comments with history
This commit is contained in:
@@ -14,6 +14,8 @@ from obitools3.uri.decode import open_uri
|
||||
from obitools3.apps.config import logger
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
__title__="Group sequence records together"
|
||||
|
||||
@@ -214,8 +216,6 @@ cdef uniq_sequences(View_NUC_SEQS view, View_NUC_SEQS o_view, ProgressBar pb, li
|
||||
cdef object mcol
|
||||
cdef object to_merge
|
||||
|
||||
#print(categories)
|
||||
|
||||
uniques = {}
|
||||
|
||||
mergedKeys_list_b = []
|
||||
@@ -521,7 +521,17 @@ def run(config):
|
||||
uniq_sequences(entries, o_view, pb, mergedKeys_list=config['uniq']['merge'], taxonomy=taxo, mergeIds=config['uniq']['mergeids'], categories=config['uniq']['categories'], max_elts=config['obi']['maxelts'])
|
||||
except Exception, e:
|
||||
raise RollbackException("obi uniq error, rollbacking view: "+str(e), o_view)
|
||||
|
||||
|
||||
# Save command config in View and DMS comments
|
||||
command_line = " ".join(sys.argv[1:])
|
||||
input_dms_name=[input[0].name]
|
||||
input_view_name=[input[1].name]
|
||||
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
||||
input_dms_name.append(config['obi']['taxoURI'].split("/", 1)[0])
|
||||
input_view_name.append(config['obi']['taxoURI'].split("/", 1)[1])
|
||||
o_view.write_config(config, "uniq", command_line, input_dms_name=input_dms_name, input_view_name=input_view_name)
|
||||
output[0].record_command_line(command_line)
|
||||
|
||||
print("\n")
|
||||
print(repr(o_view))
|
||||
|
||||
|
Reference in New Issue
Block a user