From 46db8fd3cf7c9e30f8a87a173dd88650a8c26c72 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Fri, 16 Jun 2023 18:12:13 -0700 Subject: [PATCH] Factor out convert_from_aligned_to_reference --- util/subtypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/subtypes.py b/util/subtypes.py index da366e8..9b97cd3 100644 --- a/util/subtypes.py +++ b/util/subtypes.py @@ -82,6 +82,9 @@ def convert_from_subtype_to_hxb2(position, orientation, subtype): alignment = wrappers.mafft(sequences) + return convert_from_aligned_to_reference(position, alignment) + +def convert_from_aligned_to_reference(position, alignment): hxb2_pos = 0 subtype_pos = 0 for i in range(len(alignment[0])):