Skip to content

Commit

Permalink
do not run blast unless required
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jun 5, 2023
1 parent 52100f5 commit 8dc9dd1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion intact/intact.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,12 @@ def iterate_sequences(input_file):
for sequence in SeqIO.parse(in_handle, "fasta"):
yield sequence


def iterate_empty_lists():
while True:
yield []


def intact( working_dir,
input_file,
subtype,
Expand Down Expand Up @@ -788,7 +794,7 @@ def intact( working_dir,
rre_locus = [st.convert_from_hxb2_to_subtype(x, subtype) for x in hxb2_rre_locus]

reference = st.subtype_sequence(subtype)
blast_it = blast_iterate(subtype, input_file)
blast_it = blast_iterate(subtype, input_file) if check_internal_inversion or check_nonhiv or check_scramble else iterate_empty_lists()
blast_rows = []

for sequence in iterate_sequences(input_file):
Expand Down

0 comments on commit 8dc9dd1

Please sign in to comment.