1
/* $Id: blast_tabular.h,v 1.5 2004/08/31 16:59:15 dondosha Exp $
2
* ===========================================================================
5
* National Center for Biotechnology Information
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.
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
22
* Please cite the author in any work or product based on this material.
24
* ===========================================================================*/
26
/*****************************************************************************
28
File name: blast_tabular.h
30
Author: Ilya Dondoshansky
32
Contents: Functions needed for formatting of BLAST results
34
******************************************************************************
37
#ifndef __BLAST_TABULAR__
38
#define __BLAST_TABULAR__
44
#ifndef NCBI_C_TOOLKIT
45
#define NCBI_C_TOOLKIT
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>
57
/** Tabular formatting options. */
59
eBlastTabularDefault=1,
60
eBlastTabularAddSequences
61
} EBlastTabularFormatOptions;
63
/** Data structure containing all information necessary for production of the
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
85
Boolean show_accession; /**< Show accessions instead of full ids in output,
86
if possible. This option has lower priority than
88
EBlastTabularFormatOptions format_options; /**< Tabular formatting options. */
89
} BlastTabularFormatData;
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);
102
/** Free the tabular formatting data structure and all its internally
103
* allocated substructures.
105
void BlastTabularFormatDataFree(BlastTabularFormatData* tf_data);
107
/** Driver for the thread producing tabular output. */
108
void* Blast_TabularFormatThread(void* data);
113
#endif /* !__BLAST_TABULAR__ */