From e9e7abb070eaf248d7556cdd54a9805738662dfb Mon Sep 17 00:00:00 2001 From: cblaauw Date: Tue, 19 Nov 2024 22:13:18 +0100 Subject: [PATCH] val/test split: Fix wrong syntax for region checking --- src/crested/pp/_split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crested/pp/_split.py b/src/crested/pp/_split.py index d8653b7..149a2f4 100644 --- a/src/crested/pp/_split.py +++ b/src/crested/pp/_split.py @@ -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