Skip to content

Commit

Permalink
Fix issue with retrieving records from the database
Browse files Browse the repository at this point in the history
  • Loading branch information
GopiGugan committed Apr 8, 2024
1 parent 5fc81b8 commit a83b610
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions covizu/utils/gisaid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ def extract_features(batcher, ref_file, cur=None, binpath='minimap2', nthread=3,
reflen = len(convert_fasta(handle)[0][1])

for fasta, batch in batcher:
# If fasta is empty, no need to run minimap2
if len(fasta) == 0:
continue

new_records = {}
for record in batch:
if 'diffs' in record:
Expand All @@ -174,6 +170,10 @@ def extract_features(batcher, ref_file, cur=None, binpath='minimap2', nthread=3,
record['covv_accession_id'])
new_records[record_id] = record

# If fasta is empty, no need to run minimap2
if len(fasta) == 0:
continue

mm2 = minimap2.minimap2(fasta, ref_file, stream=True, path=binpath, nthread=nthread,
minlen=minlen)
result = list(minimap2.encode_diffs(mm2, reflen=reflen))
Expand Down

0 comments on commit a83b610

Please sign in to comment.