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

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_tabular.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_tabular.h,v 1.5 2004/08/31 16:59:15 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_tabular.h
 
29
 
 
30
Author: Ilya Dondoshansky
 
31
 
 
32
Contents: Functions needed for formatting of BLAST results
 
33
 
 
34
******************************************************************************
 
35
 * $Revision: 1.5 $
 
36
 * */
 
37
#ifndef __BLAST_TABULAR__
 
38
#define __BLAST_TABULAR__
 
39
 
 
40
#ifdef __cplusplus
 
41
extern "C" {
 
42
#endif
 
43
 
 
44
#ifndef NCBI_C_TOOLKIT
 
45
#define NCBI_C_TOOLKIT
 
46
#endif
 
47
 
 
48
#include <ncbi.h>
 
49
#include <asn.h>
 
50
#include <algo/blast/core/blast_hits.h>
 
51
#include <algo/blast/core/lookup_wrap.h>
 
52
#include <algo/blast/core/blast_seqsrc.h>
 
53
#include <algo/blast/core/blast_hspstream.h>
 
54
#include <algo/blast/core/blast_gapalign.h>
 
55
#include <objloc.h>
 
56
 
 
57
/** Tabular formatting options. */
 
58
typedef enum {
 
59
   eBlastTabularDefault=1,
 
60
   eBlastTabularAddSequences
 
61
} EBlastTabularFormatOptions;
 
62
 
 
63
/** Data structure containing all information necessary for production of the
 
64
 * tabular output.
 
65
 */
 
66
typedef struct BlastTabularFormatData {
 
67
   EBlastProgramType program; /**< Type of BLAST program */
 
68
   BlastHSPStream* hsp_stream; /**< Source of the BLAST results */
 
69
   BlastSeqSrc* seq_src; /**< Source of the subject sequences */
 
70
   BLAST_SequenceBlk* query; /**< Query sequence */
 
71
   BlastQueryInfo* query_info; /**< Query information, including context
 
72
                                  offsets and effective lengths. */
 
73
   BlastScoringParameters* score_params;
 
74
   BlastExtensionParameters* ext_params;
 
75
   BlastHitSavingParameters* hit_params;
 
76
   BlastEffectiveLengthsParameters* eff_len_params;
 
77
   Uint1* gen_code_string;
 
78
   BlastGapAlignStruct* gap_align;
 
79
   SeqLoc* query_slp; /**< Source of query sequences identifiers */
 
80
   FILE* outfp; /**< Output stream */
 
81
   Boolean perform_traceback; /**< Must gapped extension with traceback be
 
82
                                 performed before formatting? */
 
83
   Boolean show_gi; /**< Show gi's instead of full ids in output, if 
 
84
                       possible. */
 
85
   Boolean show_accession; /**< Show accessions instead of full ids in output,
 
86
                              if possible. This option has lower priority than
 
87
                              show_gi. */
 
88
   EBlastTabularFormatOptions format_options; /**< Tabular formatting options. */
 
89
} BlastTabularFormatData;
 
90
 
 
91
/** Function initializing the BlastTabularFormatData data structure fields. */
 
92
BlastTabularFormatData* 
 
93
Blast_TabularFormatDataInit(EBlastProgramType program, 
 
94
   BlastHSPStream* hsp_stream, BlastSeqSrc* seq_src, 
 
95
   BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
 
96
   const BlastScoringOptions* scoring_options, BlastScoreBlk* sbp,
 
97
   const BlastEffectiveLengthsOptions* eff_len_options,
 
98
   const BlastExtensionOptions* ext_options,
 
99
   const BlastHitSavingOptions* hit_options,
 
100
   const BlastDatabaseOptions* db_options, SeqLoc* query_slp, FILE* outfp);
 
101
 
 
102
/** Free the tabular formatting data structure and all its internally 
 
103
 * allocated substructures. 
 
104
 */
 
105
void BlastTabularFormatDataFree(BlastTabularFormatData* tf_data);
 
106
 
 
107
/** Driver for the thread producing tabular output. */
 
108
void* Blast_TabularFormatThread(void* data);
 
109
 
 
110
#ifdef __cplusplus
 
111
}
 
112
#endif
 
113
#endif /* !__BLAST_TABULAR__ */
 
114