Fixed three bugs in obi uniq
This commit is contained in:
@ -243,7 +243,8 @@ cdef uniq_sequences(View_NUC_SEQS view, View_NUC_SEQS o_view, ProgressBar pb, li
|
|||||||
# Keep columns that are going to be used a lot in variables
|
# Keep columns that are going to be used a lot in variables
|
||||||
i_seq_col = view[NUC_SEQUENCE_COLUMN]
|
i_seq_col = view[NUC_SEQUENCE_COLUMN]
|
||||||
i_id_col = view[ID_COLUMN]
|
i_id_col = view[ID_COLUMN]
|
||||||
i_taxid_col = view[b"taxid"]
|
if b"taxid" in view:
|
||||||
|
i_taxid_col = view[b"taxid"]
|
||||||
if b"taxid_dist" in view:
|
if b"taxid_dist" in view:
|
||||||
i_taxid_dist_col = view[b"taxid_dist"]
|
i_taxid_dist_col = view[b"taxid_dist"]
|
||||||
|
|
||||||
@ -380,8 +381,7 @@ cdef uniq_sequences(View_NUC_SEQS view, View_NUC_SEQS o_view, ProgressBar pb, li
|
|||||||
if mergeIds:
|
if mergeIds:
|
||||||
o_merged_col[o_idx] = [view[idx].id for idx in merged_sequences]
|
o_merged_col[o_idx] = [view[idx].id for idx in merged_sequences]
|
||||||
|
|
||||||
if COUNT_COLUMN not in o_seq or o_seq[COUNT_COLUMN] is None:
|
o_seq[COUNT_COLUMN] = 0
|
||||||
o_seq[COUNT_COLUMN] = 1
|
|
||||||
|
|
||||||
if b"taxid_dist" in u_seq and i_taxid_dist_col[u_idx] is not None:
|
if b"taxid_dist" in u_seq and i_taxid_dist_col[u_idx] is not None:
|
||||||
taxid_dist_dict = i_taxid_dist_col[u_idx]
|
taxid_dist_dict = i_taxid_dist_col[u_idx]
|
||||||
@ -460,7 +460,11 @@ cdef uniq_sequences(View_NUC_SEQS view, View_NUC_SEQS o_view, ProgressBar pb, li
|
|||||||
o_seq[key] = None
|
o_seq[key] = None
|
||||||
|
|
||||||
o_idx += 1
|
o_idx += 1
|
||||||
|
|
||||||
|
# Deletes quality column if there is one because the matching between sequence and quality will be broken (quality set to NA when sequence not)
|
||||||
|
if QUALITY_COLUMN in view:
|
||||||
|
o_view.delete_column(QUALITY_COLUMN)
|
||||||
|
|
||||||
if taxonomy is not None:
|
if taxonomy is not None:
|
||||||
logger("info", "Merging taxonomy classification")
|
logger("info", "Merging taxonomy classification")
|
||||||
merge_taxonomy_classification(o_view, taxonomy)
|
merge_taxonomy_classification(o_view, taxonomy)
|
||||||
|
Reference in New Issue
Block a user