~ubuntu-branches/ubuntu/quantal/ncbi-tools6/quantal

« back to all changes in this revision

Viewing changes to algo/blast/core/blast_nalookup.c

Tags: upstream-6.1.20081116a
ImportĀ upstreamĀ versionĀ 6.1.20081116a

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: blast_nalookup.c,v 1.8 2008/01/31 23:55:42 kazimird Exp $
 
1
/* $Id: blast_nalookup.c,v 1.10 2008/07/17 17:55:44 kazimird Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
36
36
 
37
37
#ifndef SKIP_DOXYGEN_PROCESSING
38
38
static char const rcsid[] =
39
 
    "$Id: blast_nalookup.c,v 1.8 2008/01/31 23:55:42 kazimird Exp $";
 
39
    "$Id: blast_nalookup.c,v 1.10 2008/07/17 17:55:44 kazimird Exp $";
40
40
#endif                          /* SKIP_DOXYGEN_PROCESSING */
41
41
 
42
42
/** bitfield used to detect ambiguities in uncompressed
317
317
    return 0;
318
318
}
319
319
 
320
 
static BlastSeqLoc* s_SeqLocListInvert(BlastSeqLoc* locations, Int4 length)
 
320
/** Changes the list of locations into a list of 
 
321
   the intervals between locations (the inverse).
 
322
   @param locations input list [in]
 
323
   @param length (query) sequence length [in]
 
324
   @return inverted BlastSeqLoc
 
325
*/
 
326
 
 
327
static BlastSeqLoc* s_SeqLocListInvert(const BlastSeqLoc* locations, Int4 length)
321
328
{
322
329
     BlastSeqLoc* retval = NULL;
323
330
     BlastSeqLoc* tail = NULL;  /* Tail of the list. */
671
678
      and the optimal templates for one combination of word size
672
679
      and template length. */
673
680
   if (kTwoTemplates) {
674
 
      second_template_type = mb_lt->second_template_type = template_type + 1;
 
681
      /* Use the temporaray to avoid annoying ICC warning. */
 
682
      int temp_int = template_type + 1;
 
683
      second_template_type = 
 
684
           mb_lt->second_template_type = (EDiscTemplateType) temp_int;
675
685
 
676
686
      mb_lt->hashtable2 = (Int4*)calloc(mb_lt->hashsize, sizeof(Int4));
677
687
      mb_lt->next_pos2 = (Int4*)calloc(query->length + 1, sizeof(Int4));
786
796
 * @param query the query sequence [in]
787
797
 * @param location locations on the query to be indexed in table [in]
788
798
 * @param mb_lt the (already allocated) megablast lookup table structure [in|out]
789
 
 * @param lookup_options specifies the word_size [in]
790
799
 * @return zero on success, negative number on failure. 
791
800
 */
792
801
 
793
802
static Int2 
794
803
s_FillContigMBTable(BLAST_SequenceBlk* query, 
795
804
        BlastSeqLoc* location,
796
 
        BlastMBLookupTable* mb_lt, 
797
 
        const LookupTableOptions* lookup_options)
 
805
        BlastMBLookupTable* mb_lt) 
798
806
 
799
807
{
800
808
   BlastSeqLoc* loc;
972
980
   else {
973
981
        /* contiguous megablast */
974
982
        mb_lt->scan_step = mb_lt->word_length - mb_lt->lut_word_length + 1;
975
 
        status = s_FillContigMBTable(query, location, mb_lt, lookup_options);
 
983
        status = s_FillContigMBTable(query, location, mb_lt);
976
984
   }
977
985
 
978
986
   if (status > 0) {