diff --git a/truvari/variant_record.py b/truvari/variant_record.py index 60f717a5..db9a2ba2 100644 --- a/truvari/variant_record.py +++ b/truvari/variant_record.py @@ -960,6 +960,8 @@ def within_tree(self, tree): Extract entry and tree boundaries to call `truvari.coords_within` """ qstart, qend = self.boundaries() + if self.chrom not in tree: + return False m_ovl = tree[self.chrom].overlap(qstart, qend) if len(m_ovl) != 1: return False