~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_seq.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: blast_seq.h,v 1.17 2004/10/06 15:00:23 dondosha 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 offical 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
 
 
28
File name: blast_seq.h
 
29
 
 
30
Author: Ilya Dondoshansky
 
31
 
 
32
Contents: Functions converting from SeqLocs to structures used in BLAST and 
 
33
          back.
 
34
 
 
35
Detailed Contents: 
 
36
 
 
37
******************************************************************************
 
38
 * $Revision: 1.17 $
 
39
 * */
 
40
#ifndef __BLAST_SEQ__
 
41
#define __BLAST_SEQ__
 
42
 
 
43
#ifdef __cplusplus
 
44
extern "C" {
 
45
#endif
 
46
 
 
47
#ifndef NCBI_C_TOOLKIT
 
48
#define NCBI_C_TOOLKIT
 
49
#endif
 
50
 
 
51
#include <objseq.h>
 
52
#include <algo/blast/core/blast_def.h>
 
53
#include <algo/blast/core/blast_options.h>
 
54
 
 
55
#define NUM_FRAMES 6
 
56
 
 
57
/** Convert a BlastMaskLoc list to a list of SeqLocs, used for formatting 
 
58
 * BLAST results.
 
59
 * @param program_number identifies blastn, blastp, etc. [in]
 
60
 * @param mask_loc internal mask structure [in]
 
61
 * @param slp SeqLoc of query [in]
 
62
 * @return Pointer to SeqLoc
 
63
 */
 
64
SeqLocPtr 
 
65
BlastMaskLocToSeqLoc(EBlastProgramType program_number, 
 
66
                     const BlastMaskLoc* mask_loc, 
 
67
                     const SeqLoc* slp);
 
68
 
 
69
/* Converts a SeqLocPtr to a BlastSeqLoc, used for formatting.
 
70
 * @param mask_slp SeqLocPtr to be converted [in]
 
71
 * @return pointer to BlastSeqLoc
 
72
 */
 
73
BlastSeqLoc* BlastSeqLocFromSeqLoc(SeqLocPtr mask_slp);
 
74
 
 
75
/** Duplicate masks in 6 frames for each nucleotide sequence, converting
 
76
 * all masks' coordinates from DNA to protein.
 
77
 * @param mask_loc_ptr Masks list to be modified [in] [out]
 
78
 * @param slp List of nucleotide query SeqLoc's [in]
 
79
 */
 
80
Int2 BlastMaskLocDNAToProtein(BlastSeqLoc* dna_seqloc, BlastMaskLoc* prot_maskloc, Int4 start, SeqLocPtr slp);
 
81
/*
 
82
Int2 BlastMaskLocDNAToProtein(BlastMaskLoc** mask_loc_ptr, SeqLocPtr slp);
 
83
*/
 
84
 
 
85
/** Convert all masks' protein coordinates to nucleotide.
 
86
 * @param mask_loc_ptr Masks list to be modified [in] [out]
 
87
 * @param slp List of nucleotide query SeqLoc's [in]
 
88
 */
 
89
Int2 BlastMaskLocProteinToDNA(BlastMaskLoc** mask_loc_ptr, SeqLocPtr slp);
 
90
 
 
91
/** Given a list of query SeqLoc's, create the sequence block and the query
 
92
 * info structure. This is the last time SeqLoc is needed before formatting.
 
93
 * @param query_slp List of query SeqLoc's [in]
 
94
 * @param query_options Query setup options, containing genetic code for
 
95
 *                      translation [in]
 
96
 * @param program_number Type of BLAST program [in]
 
97
 * @param query_info Query information structure, containing offsets into 
 
98
 *                   the concatenated sequence [out]
 
99
 * @param query_blk Query block, containing (concatenated) sequence [out]
 
100
 */
 
101
Int2 BLAST_SetUpQuery(EBlastProgramType program_number, SeqLocPtr query_slp, 
 
102
        const QuerySetUpOptions* query_options, 
 
103
        BlastQueryInfo** query_info, BLAST_SequenceBlk* *query_blk);
 
104
 
 
105
/** Set up the subject sequence block in case of two sequences BLAST.
 
106
 * @param program_number Type of BLAST program [in]
 
107
 * @param subject_slp SeqLoc for the subject sequence [in]
 
108
 * @param subject Subject sequence block [out]
 
109
 */
 
110
Int2 BLAST_SetUpSubject(EBlastProgramType program_number, 
 
111
        SeqLocPtr subject_slp, BLAST_SequenceBlk** subject);
 
112
 
 
113
/** Find a genetic code string in ncbistdaa encoding, given an integer
 
114
 *  genetic code value.
 
115
 * @param gc genetic code value [in]
 
116
 * @param genetic_code genetic code string [out]
 
117
 */
 
118
 
 
119
Int2 BLAST_GeneticCodeFind(Int4 gc, Uint1** genetic_code);
 
120
 
 
121
#ifdef __cplusplus
 
122
}
 
123
#endif
 
124
#endif /* !__BLAST_SEQ__ */