Skip to content

Commit

Permalink
resolve first failing transform test
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm authored Nov 27, 2024
1 parent d900024 commit b86ee57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haptools/data/haplotypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ def __iter__(
# if the user requested a specific region or subset of haplotypes and the file
# is indexed, then we should handle it using tabix
# else, we use a regular text opener - b/c there's no benefit to using tabix
if region or (haplotypes and indexed):
if (region or haplotypes) and indexed:
haps_file = TabixFile(str(self.fname))
metas, extras = self.check_header(list(haps_file.header))
types = self._get_field_types(extras, metas.get("order"))
Expand Down Expand Up @@ -1232,8 +1232,8 @@ def __iter__(
)
haps_file.close()
else:
# the file is not indexed, so we can't assume it's sorted, either
# use hook_compressed to automatically handle gz files
# The file is not indexed, so we can't assume it's sorted, either
# Use hook_compressed to automatically handle gz files
with self.hook_compressed(self.fname, mode="r") as haps:
self.log.info("Not taking advantage of indexing.")
header_lines = []
Expand Down

0 comments on commit b86ee57

Please sign in to comment.