Compare commits
4 Commits
v3.0.0-bet
...
v3.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
c67d668989 | |||
db0ac37d41 | |||
d0c21ecd39 | |||
53212168a2 |
@ -247,6 +247,8 @@ def run(config):
|
|||||||
dcols[tag] = (Column.new_column(view, tag, value_obitype, nb_elements_per_line=nb_elts, elements_names=elt_names), value_obitype)
|
dcols[tag] = (Column.new_column(view, tag, value_obitype, nb_elements_per_line=nb_elts, elements_names=elt_names), value_obitype)
|
||||||
|
|
||||||
# Fill value
|
# Fill value
|
||||||
|
if value_type == dict and nb_elts == 1: # special case that makes the OBI3 create a 1 elt/line column which won't read a dict value
|
||||||
|
value = value[list(value.keys())[0]] # The solution is to transform the value in a simple atomic one acceptable by the column
|
||||||
dcols[tag][0][i] = value
|
dcols[tag][0][i] = value
|
||||||
|
|
||||||
# TODO else log error?
|
# TODO else log error?
|
||||||
@ -263,6 +265,12 @@ def run(config):
|
|||||||
rewrite = True
|
rewrite = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Check that it's not the case where the first entry contained a dict of length 1 and now there is a new key
|
||||||
|
if type(value) == dict and \
|
||||||
|
dcols[tag][0].nb_elements_per_line == 1 and len(value.keys()) == 1 \
|
||||||
|
and dcols[tag][0].elements_names[0] != list(value.keys())[0] :
|
||||||
|
raise IndexError # trigger column rewrite
|
||||||
|
|
||||||
# Fill value
|
# Fill value
|
||||||
dcols[tag][0][i] = value
|
dcols[tag][0][i] = value
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ cdef class DMS(OBIWrapper):
|
|||||||
for command in self.command_line_history:
|
for command in self.command_line_history:
|
||||||
s+=b"#"
|
s+=b"#"
|
||||||
s+=command[b"time"]
|
s+=command[b"time"]
|
||||||
s+=b"\n"
|
s+=b"\nobi "
|
||||||
s+=command[b"command"]
|
s+=command[b"command"]
|
||||||
s+=b"\n"
|
s+=b"\n"
|
||||||
return s
|
return s
|
||||||
|
@ -297,7 +297,13 @@ cdef class View(OBIWrapper) :
|
|||||||
nb_elements_per_line=new_nb_elements_per_line, elements_names=new_elements_names,
|
nb_elements_per_line=new_nb_elements_per_line, elements_names=new_elements_names,
|
||||||
comments=old_column.comments, alias=column_name_b+tobytes('___new___'))
|
comments=old_column.comments, alias=column_name_b+tobytes('___new___'))
|
||||||
|
|
||||||
|
switch_to_dict = old_column.nb_elements_per_line == 1 and new_nb_elements_per_line > 1
|
||||||
|
ori_key = old_column._elements_names[0]
|
||||||
|
|
||||||
for i in range(length) :
|
for i in range(length) :
|
||||||
|
if switch_to_dict :
|
||||||
|
new_column[i] = {ori_key: old_column[i]}
|
||||||
|
else:
|
||||||
new_column[i] = old_column[i]
|
new_column[i] = old_column[i]
|
||||||
|
|
||||||
# Remove old column from view
|
# Remove old column from view
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
major = 3
|
major = 3
|
||||||
minor = 0
|
minor = 0
|
||||||
serial= '0-beta6'
|
serial= '0-beta8'
|
||||||
|
|
||||||
version ="%d.%02d.%s" % (major,minor,serial)
|
version ="%d.%02d.%s" % (major,minor,serial)
|
||||||
|
@ -409,8 +409,7 @@ int obi_clean(const char* dms_name,
|
|||||||
stop = true;
|
stop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma omp parallel default(none) \
|
#pragma omp parallel shared(thread_count, seq_count, blob_array, complete_sample_count_array, alignment_result_array, \
|
||||||
shared(thread_count, seq_count, blob_array, complete_sample_count_array, alignment_result_array, \
|
|
||||||
stop, blob1, i, obi_errno, keep_running, stderr, max_ratio, iseq_column, i_view, \
|
stop, blob1, i, obi_errno, keep_running, stderr, max_ratio, iseq_column, i_view, \
|
||||||
similarity_mode, reference, normalize, threshold, ktable, status_column, o_view, sample_count)
|
similarity_mode, reference, normalize, threshold, ktable, status_column, o_view, sample_count)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user