Skip to content

Commit dbf3271

Browse files
Fix issues with target database residue count
1 parent 1a6a082 commit dbf3271

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/bathsearch.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,8 @@ serial_master(ESL_GETOPTS *go, struct cfg_s *cfg)
851851
default:
852852
esl_fatal("Unexpected error %d reading sequence file %s", sstatus, dbfp->filename);
853853
}
854-
854+
855+
resCnt = 0;
855856
//need to re-compute e-values before merging (when list will be sorted)
856857
if (esl_opt_IsUsed(go, "-Z")) {
857858
resCnt = 1000000*esl_opt_GetReal(go, "-Z");
@@ -1050,7 +1051,7 @@ serial_loop(WORKER_INFO *info, ID_LENGTH_LIST *id_length_list, ESL_SQFILE *dbfp,
10501051

10511052
if (info->pli->strands != p7_STRAND_BOTTOMONLY)
10521053
{
1053-
info->pli->nres += dbsq_dna->n;
1054+
info->pli->nres += dbsq_dna->W;
10541055

10551056
/* translate DNA sequence to 3 frame ORFs */
10561057
do_sq_by_sequences(info->gcode, info->wrk1, dbsq_dna);
@@ -1063,7 +1064,7 @@ serial_loop(WORKER_INFO *info, ID_LENGTH_LIST *id_length_list, ESL_SQFILE *dbfp,
10631064

10641065
if (info->pli->strands != p7_STRAND_TOPONLY)
10651066
{
1066-
info->pli->nres += dbsq_dna->n;
1067+
info->pli->nres += dbsq_dna->W;
10671068

10681069
/* Reverse complement and translate DNA sequence to 3 frame ORFs */
10691070
esl_sq_ReverseComplement(dbsq_dna);
@@ -1237,7 +1238,7 @@ pipeline_thread(void *arg)
12371238

12381239
if (info->pli->strands != p7_STRAND_BOTTOMONLY) {
12391240

1240-
info->pli->nres += dnaSeq->n;
1241+
info->pli->nres += dnaSeq->W;
12411242
do_sq_by_sequences(info->gcode, info->wrk1, dnaSeq);
12421243

12431244
p7_Pipeline_BATH(info->pli, info->om, info->gm, info->gm_fs, info->scoredata, info->bg, info->th, block->first_seqidx + i, dnaSeq, info->wrk1->orf_block, info->wrk2, info->gcode, p7_NOCOMPLEMENT);
@@ -1248,7 +1249,7 @@ pipeline_thread(void *arg)
12481249
}
12491250

12501251
if (info->pli->strands != p7_STRAND_TOPONLY) {
1251-
info->pli->nres += dnaSeq->n;
1252+
info->pli->nres += dnaSeq->W;
12521253
esl_sq_ReverseComplement(dnaSeq);
12531254
do_sq_by_sequences(info->gcode, info->wrk1, dnaSeq);
12541255

0 commit comments

Comments
 (0)