ngsfilter: fixed sequence cut bug on aligned sequences. Still exists for

unaligned sequences
This commit is contained in:
Celine Mercier
2019-12-10 18:13:27 +01:00
parent 35ce37c0f7
commit 81a179239c

View File

@ -409,7 +409,7 @@ cdef tuple annotate(sequences, infos, no_tags, verbose=False):
match = match.reverse_complement match = match.reverse_complement
if not not_aligned or id(second_matched_seq) == id(sequenceF): if not not_aligned or id(second_matched_seq) == id(sequenceF):
final_sequence = final_sequence[0:reversematch[1][1]] final_sequence = final_sequence[0:(reversematch[1][1] - directmatch[1][2])]
else: else:
cut_seq = sequenceR[reversematch[1][2]:] cut_seq = sequenceR[reversematch[1][2]:]
if not directmatch[0].forward: if not directmatch[0].forward:
@ -578,8 +578,9 @@ def run(config):
Column.new_column(o_view, REVERSE_SEQ_COLUMN_NAME, OBI_SEQ) Column.new_column(o_view, REVERSE_SEQ_COLUMN_NAME, OBI_SEQ)
Column.new_column(o_view, REVERSE_QUALITY_COLUMN_NAME, OBI_QUAL, associated_column_name=REVERSE_SEQ_COLUMN_NAME, associated_column_version=o_view[REVERSE_SEQ_COLUMN_NAME].version) Column.new_column(o_view, REVERSE_QUALITY_COLUMN_NAME, OBI_QUAL, associated_column_name=REVERSE_SEQ_COLUMN_NAME, associated_column_version=o_view[REVERSE_SEQ_COLUMN_NAME].version)
Column.new_column(unidentified, REVERSE_SEQ_COLUMN_NAME, OBI_SEQ) if unidentified is not None:
Column.new_column(unidentified, REVERSE_QUALITY_COLUMN_NAME, OBI_QUAL, associated_column_name=REVERSE_SEQ_COLUMN_NAME, associated_column_version=unidentified[REVERSE_SEQ_COLUMN_NAME].version) Column.new_column(unidentified, REVERSE_SEQ_COLUMN_NAME, OBI_SEQ)
Column.new_column(unidentified, REVERSE_QUALITY_COLUMN_NAME, OBI_QUAL, associated_column_name=REVERSE_SEQ_COLUMN_NAME, associated_column_version=unidentified[REVERSE_SEQ_COLUMN_NAME].version)
g = 0 g = 0
u = 0 u = 0