Skip to content

Commit

Permalink
Fix bug in fast5 read id subset pre-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus1487 committed Oct 20, 2022
1 parent 47422cc commit 717f414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bonito/fast5.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def get_meta_data(filename, read_ids=None, skip=False):
meta_reads = []
with get_fast5_file(filename, 'r') as f5_fh:
try:
read_ids = f5_fh.get_read_ids()
all_read_ids = f5_fh.get_read_ids()
except RuntimeError as e:
sys.stderr.write(f"> warning: f{filename} - {e}\n")
return meta_reads
for read_id in read_ids:
for read_id in all_read_ids:
if read_ids is None or (read_id in read_ids) ^ skip:
meta_reads.append(
Read(f5_fh.get_read(read_id), filename, meta=True)
Expand Down

0 comments on commit 717f414

Please sign in to comment.