~ubuntu-branches/ubuntu/oneiric/ncbi-tools6/oneiric

« back to all changes in this revision

Viewing changes to algo/blast/core/blast_aascan.h

  • 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_aascan.h,v 1.3 2007/03/07 19:25:34 kazimird Exp $
 
2
 * ===========================================================================
 
3
 *
 
4
 *                            PUBLIC DOMAIN NOTICE
 
5
 *               National Center for Biotechnology Information
 
6
 *
 
7
 *  This software/database is a "United States Government Work" under the
 
8
 *  terms of the United States Copyright Act.  It was written as part of
 
9
 *  the author's official duties as a United States Government employee and
 
10
 *  thus cannot be copyrighted.  This software/database is freely available
 
11
 *  to the public for use. The National Library of Medicine and the U.S.
 
12
 *  Government have not placed any restriction on its use or reproduction.
 
13
 *
 
14
 *  Although all reasonable efforts have been taken to ensure the accuracy
 
15
 *  and reliability of the software and data, the NLM and the U.S.
 
16
 *  Government do not and cannot warrant the performance or results that
 
17
 *  may be obtained by using this software or data. The NLM and the U.S.
 
18
 *  Government disclaim all warranties, express or implied, including
 
19
 *  warranties of performance, merchantability or fitness for any particular
 
20
 *  purpose.
 
21
 *
 
22
 *  Please cite the author in any work or product based on this material.
 
23
 *
 
24
 * ===========================================================================
 
25
 */
 
26
 
 
27
/** @file blast_aascan.h
 
28
 *  Routines for creating protein BLAST lookup tables.
 
29
 *  Contains definitions and prototypes for the lookup 
 
30
 *  table scanning phase of blastp and RPS blast.
 
31
 */
 
32
 
 
33
#ifndef ALGO_BLAST_CORE__BLAST_AASCAN__H
 
34
#define ALGO_BLAST_CORE__BLAST_AASCAN__H
 
35
 
 
36
#include <algo/blast/core/ncbi_std.h>
 
37
#include <algo/blast/core/blast_def.h>
 
38
#include <algo/blast/core/lookup_wrap.h>
 
39
 
 
40
#ifdef __cplusplus
 
41
extern "C" {
 
42
#endif
 
43
 
 
44
/** Generic prototype for nucleotide subject scanning routines */
 
45
typedef Int4 (*TAaScanSubjectFunction)(const LookupTableWrap* lookup_wrap,
 
46
                                  const BLAST_SequenceBlk* subject,
 
47
                                  Int4 *start_offset,
 
48
                                  BlastOffsetPair* NCBI_RESTRICT offset_pairs,
 
49
                                  Int4 max_hits);
 
50
 
 
51
/** Choose the most appropriate function to scan through
 
52
 * protein subject sequences
 
53
 * @param lookup_wrap Structure containing lookup table [in][out]
 
54
 */
 
55
void BlastChooseProteinScanSubject(LookupTableWrap *lookup_wrap);
 
56
 
 
57
/**
 
58
 * Scans the RPS query sequence from "offset" to the end of the sequence.
 
59
 * Copies at most array_size hits.
 
60
 * Returns the number of hits found.
 
61
 * If there isn't enough room to copy all the hits, return early, and update
 
62
 * "offset". 
 
63
 *
 
64
 * @param lookup_wrap the lookup table [in]
 
65
 * @param sequence the subject sequence [in]
 
66
 * @param offset the offset in the subject at which to begin scanning [in/out]
 
67
 * @return The number of hits found.
 
68
 */
 
69
Int4 BlastRPSScanSubject(const LookupTableWrap* lookup_wrap,
 
70
                        const BLAST_SequenceBlk *sequence,
 
71
                        Int4* offset);
 
72
 
 
73
#ifdef __cplusplus
 
74
}
 
75
#endif
 
76
 
 
77
#endif /* !ALGO_BLAST_CORE__BLAST_AASCAN__H */