From 3babb4868e858468192aff79fd5da7081a7c3b5a Mon Sep 17 00:00:00 2001 From: Andrey Prjibelski Date: Mon, 6 May 2024 14:15:34 +0300 Subject: [PATCH] fix counting strategy flags --- src/long_read_counter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/long_read_counter.py b/src/long_read_counter.py index 0a813c8b..ba4f4a18 100644 --- a/src/long_read_counter.py +++ b/src/long_read_counter.py @@ -34,12 +34,12 @@ def ambiguous(self): return self in [CountingStrategy.all, CountingStrategy.with_ambiguous] def inconsistent_minor(self): - return self == CountingStrategy.unique_splicing_consistent - - def inconsistent(self): return self in [CountingStrategy.unique_splicing_consistent, CountingStrategy.unique_inconsistent, CountingStrategy.all] + def inconsistent(self): + return self in [CountingStrategy.unique_inconsistent, CountingStrategy.all] + COUNTING_STRATEGIES = [CountingStrategy.unique_only.name, CountingStrategy.with_ambiguous.name, @@ -108,7 +108,7 @@ def __init__(self, strategy_str): def process_inconsistent(self, assignment_type, feature_count): # use only for inconsistent assignments if assignment_type == ReadAssignmentType.inconsistent_ambiguous or feature_count > 1: - if self.strategy_flags.use_ambiguous: + if self.strategy_flags.use_ambiguous and self.strategy_flags.use_inconsistent: return 1.0 / feature_count else: return 0.0