From c4468f5faf4824bebc2590c1e856055aec418a6a Mon Sep 17 00:00:00 2001 From: Adam English Date: Fri, 17 Feb 2023 12:26:34 -0500 Subject: [PATCH] Collapse consolidation fix For #144 --- repo_utils/test_files/answer_key/help.txt | 2 +- truvari/__init__.py | 2 +- truvari/collapse.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/repo_utils/test_files/answer_key/help.txt b/repo_utils/test_files/answer_key/help.txt index 2208d9ff..78846db3 100644 --- a/repo_utils/test_files/answer_key/help.txt +++ b/repo_utils/test_files/answer_key/help.txt @@ -1,6 +1,6 @@ usage: truvari [-h] CMD ... -Truvari v4.0.0-dev Structural Variant Benchmarking and Annotation +Truvari v3.5.1 Structural Variant Benchmarking and Annotation Available commands: bench Performance metrics from comparison of two VCFs diff --git a/truvari/__init__.py b/truvari/__init__.py index 345d91eb..0c26c7ab 100644 --- a/truvari/__init__.py +++ b/truvari/__init__.py @@ -74,7 +74,7 @@ :data:`truvari.SZBINTYPE` """ -__version__ = '4.0.0-dev' +__version__ = '3.5.1' from truvari.annotations.af_calc import ( diff --git a/truvari/collapse.py b/truvari/collapse.py index a625621e..ec4a9a12 100644 --- a/truvari/collapse.py +++ b/truvari/collapse.py @@ -132,6 +132,11 @@ def collapse_into_entry(entry, others, hap_mode=False): "Unable to set FORMAT %s for sample %s", key, sample) logging.warning("Kept entry: %s:%d %s", entry.chrom, entry.pos, entry.id) logging.warning("Colap entry: %s:%d %s", o_entry.chrom, o_entry.pos, o_entry.id) + except KeyError: + logging.debug("Unshared format %s in sample %s ignored for pair %s:%d %s %s:%d %s", + key, sample, entry.chrom, entry.pos, entry.id, o_entry.chrom, + o_entry.pos, o_entry.id) + return entry, n_consolidate