Commit 60e89176 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix fix of contigs + new orf sequence build

parent e6f253ea
......@@ -208,8 +208,6 @@ def fix_contig(reference, protein, ref_seq, id_ref, id_prot, reverse, fixed_orf_
len_gap = len(item)
if len_gap >= GAP_BLOCK_SIZE_MIN:
gaps_block.append((position, position + (len_gap * 3), "ref"))
new_refseq += ref_seq[position: position + (len_gap * 3)] # Remove this to remove gaps in new map
position += len_gap * 3
elif re.match("^[A-Za-z*]+$", item) is not None:
if len(item) >= GAP_BLOCK_SIZE_MIN:
gaps_block.append((position, len(item), "prot"))
......@@ -232,6 +230,7 @@ def fix_contig(reference, protein, ref_seq, id_ref, id_prot, reverse, fixed_orf_
if reverse: # Restore intial sequence
new_refseq = str(Seq(new_refseq).reverse_complement())
ref_seq = str(Seq(ref_seq).reverse_complement())
contig_seq = fasta.fetch(id_ref)
fixed_contig = contig_seq.replace(ref_seq, new_refseq)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment