Skip to content

Commit

Permalink
fix counting strategy flags
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprzh committed May 7, 2024
1 parent e5c6cb3 commit 3babb48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/long_read_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3babb48

Please sign in to comment.