Skip to content

Commit

Permalink
Quit rel.abun. calculation if there are no strains
Browse files Browse the repository at this point in the history
  • Loading branch information
lrvdijk committed Apr 13, 2021
1 parent c0a6476 commit 3435c15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/strainge/search_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def calc_relative_abundance(self, sample, result):
Applies a regression model to estimate the relative abundances of reported strains.
"""

if not result.strains:
return

# Reset cache because the StrainGST algorithm may have removed k-mers from the reference k-mer sets
self.pangenome.reset_cache()
if self.top == 1:
Expand Down

0 comments on commit 3435c15

Please sign in to comment.