Skip to content

Commit

Permalink
ktClassifyBLAST optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ondovb committed Feb 3, 2021
1 parent 578fd51 commit 149f21a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions KronaTools/lib/KronaTools.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1011,26 +1011,26 @@ sub classifyBlast
last; # EOF
}

my $acc = getAccFromSeqID($hitID);
my $newTaxID = getTaxIDFromAcc($acc);

if
(
! defined $acc ||
! $options{'includeUnk'} && (! $newTaxID || ! taxIDExists($newTaxID))
)
{
$lastQueryID = $queryID;
next;
}

if # this is a 'best' hit if...
(
$ties == 0 || # first hit
$bitScore >= $topScore - $options{'threshold'} || # within score threshold
$options{'factor'} && $eVal <= $options{'factor'} * $topEVal # within e-val factor
)
{
my $acc = getAccFromSeqID($hitID);
my $newTaxID = getTaxIDFromAcc($acc);

if
(
! defined $acc ||
! $options{'includeUnk'} && (! $newTaxID || ! taxIDExists($newTaxID))
)
{
$lastQueryID = $queryID;
next;
}

if ( $ties == 0 )
{
$topScore = $bitScore;
Expand Down

0 comments on commit 149f21a

Please sign in to comment.