~ubuntu-branches/debian/experimental/ncbi-tools6/experimental

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_returns.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-07-14 19:43:15 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080714194315-ed44u9ek7txva2rz
Tags: 6.1.20080302-3
tools/readdb.c: enable madvise()-based code on all glibc (hence all
Debian) systems, not just Linux.  (Closes: #490437.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: blast_returns.c,v 1.34 2006/10/13 18:44:29 papadopo Exp $
 
1
/* $Id: blast_returns.c,v 1.38 2007/07/10 15:28:07 papadopo Exp $
2
2
* ===========================================================================
3
3
*
4
4
*                            PUBLIC DOMAIN NOTICE
29
29
 */
30
30
 
31
31
#ifndef SKIP_DOXYGEN_PROCESSING
32
 
static char const rcsid[] = "$Id: blast_returns.c,v 1.34 2006/10/13 18:44:29 papadopo Exp $";
 
32
static char const rcsid[] = "$Id: blast_returns.c,v 1.38 2007/07/10 15:28:07 papadopo Exp $";
33
33
#endif /* SKIP_DOXYGEN_PROCESSING */
34
34
 
35
35
#include <algo/blast/api/blast_returns.h>
194
194
       add_string_to_buffer(buffer, &ret_buffer, &ret_buffer_length);
195
195
   }
196
196
   if (search_params->threshold) {
197
 
       sprintf(buffer, "Neighboring words threshold: %ld", 
198
 
               (long) search_params->threshold);
 
197
       if (search_params->threshold == floor(search_params->threshold))
 
198
           sprintf(buffer, "Neighboring words threshold: %ld", 
 
199
                   (long)search_params->threshold);
 
200
       else
 
201
           sprintf(buffer, "Neighboring words threshold: %.2f", 
 
202
                   search_params->threshold);
199
203
       add_string_to_buffer(buffer, &ret_buffer, &ret_buffer_length);
200
204
   }
201
205
   if (search_params->window_size) {
366
370
         itr = BlastSeqSrcIteratorFree(itr);
367
371
      }
368
372
   }
369
 
      
370
 
   if (program_number == eBlastTypeTblastn || 
371
 
       program_number == eBlastTypeRpsTblastn ||
372
 
       program_number == eBlastTypeTblastx)
 
373
 
 
374
   if (Blast_SubjectIsTranslated(program_number) ||
 
375
       program_number == eBlastTypeRpsTblastn)
373
376
      total_length /= 3;
374
377
 
375
378
   (*db_stats)->dblength = total_length;
400
403
      /** FIXME: Should this be different for RPS BLAST? */
401
404
      (*db_stats)->qlen = qlen;
402
405
      (*db_stats)->eff_qlen = qlen - ((*db_stats)->hsp_length);
403
 
      (*db_stats)->eff_dblength = 
404
 
          total_length - num_entries*((*db_stats)->hsp_length);
 
406
      (*db_stats)->eff_dblength = total_length;
 
407
      if (eff_len_options->db_length == 0) {
 
408
         (*db_stats)->eff_dblength -= (Int8)num_entries *
 
409
                                        ((*db_stats)->hsp_length);
 
410
      }
405
411
      (*db_stats)->eff_searchsp = 
406
412
          query_info->contexts[query_info->first_context].eff_searchsp;
407
413
      if (eff_len_options &&