Skip to content

Commit

Permalink
val/test split: Fix wrong syntax for region checking
Browse files Browse the repository at this point in the history
  • Loading branch information
cblaauw committed Nov 19, 2024
1 parent 64fba66 commit e9e7abb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crested/pp/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _split_by_chromosome_auto(
"""
chrom_count = defaultdict(int)
for region in regions:
if not region.contains(":"):
if ":" not in region:
raise ValueError(f"Region names should start with the chromosome name, bound by a colon (:). Offending region: {region}")
chrom = region.split(":")[0]
chrom_count[chrom] += 1
Expand Down

0 comments on commit e9e7abb

Please sign in to comment.