@@ -1736,7 +1736,7 @@ computeBlastMatch(typename TBlastRecord::TBlastMatch & bm,
17361736 computeBitScore (bm, context (lH.gH .outfile ));
17371737
17381738 computeEValueThreadSafe (bm, record.qLength , context (lH.gH .outfile ));
1739- if (bm.eValue > lH.options .eCutOff )
1739+ if (bm.eValue > lH.options .maxEValue )
17401740 return EVALUE;
17411741
17421742 _setFrames (bm, m, lH);
@@ -2431,17 +2431,28 @@ iterateMatchesFullSimd(TLocalHolder & lH)
24312431 {
24322432 TBlastMatch & bm = *it;
24332433
2434- computeEValueThreadSafe (bm,
2435- qIsTranslated (TGlobalHolder::blastProgram)
2436- ? lH.gH .untransQrySeqLengths [bm._n_qId ]
2437- : length (lH.gH .qrySeqs [_untrueQryId (bm, lH)]),
2438- context (lH.gH .outfile ));
2434+ if (lH.options .minBitScore > 0 )
2435+ {
2436+ seqan::computeBitScore (bm, seqan::context (lH.gH .outfile ));
2437+
2438+ if (bm.bitScore < lH.options .minBitScore )
2439+ {
2440+ ++lH.stats .hitsFailedExtendBitScoreTest ;
2441+ it = blastMatches.erase (it);
2442+ continue ;
2443+ }
2444+ }
24392445
2440- if (bm. eValue > lH.options .eCutOff )
2446+ if (lH.options .maxEValue < 100 )
24412447 {
2442- ++lH.stats .hitsFailedExtendEValueTest ;
2443- it = blastMatches.erase (it);
2444- continue ;
2448+ computeEValueThreadSafe (bm, bm.qLength , seqan::context (lH.gH .outfile ));
2449+
2450+ if (bm.eValue > lH.options .maxEValue )
2451+ {
2452+ ++lH.stats .hitsFailedExtendEValueTest ;
2453+ it = blastMatches.erase (it);
2454+ continue ;
2455+ }
24452456 }
24462457
24472458 ++it;
@@ -2484,9 +2495,12 @@ iterateMatchesFullSimd(TLocalHolder & lH)
24842495 continue ;
24852496 }
24862497
2487- computeBitScore (bm, context (lH.gH .outfile ));
2498+ // not computed previously
2499+ if (lH.options .minBitScore == 0 )
2500+ seqan::computeBitScore (bm, seqan::context (lH.gH .outfile ));
24882501
2489- // evalue computed previously
2502+ if (lH.options .maxEValue == 100 )
2503+ computeEValueThreadSafe (bm, bm.qLength , seqan::context (lH.gH .outfile ));
24902504
24912505 ++it;
24922506 }
@@ -2597,9 +2611,16 @@ iterateMatchesFullSerial(TLocalHolder & lH)
25972611 -band,
25982612 +band);
25992613
2600- computeEValueThreadSafe (bm, record.qLength , context (lH.gH .outfile ));
2614+ computeBitScore (bm, context (lH.gH .outfile ));
2615+ if (bm.bitScore < lH.options .minBitScore )
2616+ {
2617+ ++lH.stats .hitsFailedExtendBitScoreTest ;
2618+ record.matches .pop_back ();
2619+ continue ;
2620+ }
26012621
2602- if (bm.eValue > lH.options .eCutOff )
2622+ computeEValueThreadSafe (bm, record.qLength , context (lH.gH .outfile ));
2623+ if (bm.eValue > lH.options .maxEValue )
26032624 {
26042625 ++lH.stats .hitsFailedExtendEValueTest ;
26052626 record.matches .pop_back ();
@@ -2624,7 +2645,6 @@ iterateMatchesFullSerial(TLocalHolder & lH)
26242645 continue ;
26252646 }
26262647
2627- computeBitScore (bm, context (lH.gH .outfile ));
26282648
26292649 if (lH.options .hasSTaxIds )
26302650 bm.sTaxIds = lH.gH .sTaxIds [bm._n_sId ];
0 commit comments