NCBI C++ ToolKit
format_flags.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: format_flags.hpp 102916 2024-08-06 15:09:32Z ivanov $
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 
28 #ifndef OBJTOOLS_ALIGN_FORMAT___FORMAT_FLAGS_HPP
29 #define OBJTOOLS_ALIGN_FORMAT___FORMAT_FLAGS_HPP
30 
31 // Note: move this to corelib and define properly (see blastformat equivalent)
32 // #define NCBI_ALIGN_FORMAT_EXPORT
33 
34 //Note: The following definitions have been refactored
35 // from algo/blast/blastinput/cmdline_flags.hpp
36 
37 #include <corelib/ncbistd.hpp>
38 #include <corelib/ncbistl.hpp>
39 #include <string>
40 
42 BEGIN_SCOPE(align_format)
43 
44 /* Formatting options */
45 
46 /// Argument to select formatted output type
48 /// Default value for formatted output type
50 /// Argument to specify whether the GIs should be shown in the deflines in the
51 /// traditional BLAST report
52 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgShowGIs;
53 /// Default value for the "show GIs" formatter option
55 /// Argument to specify the number of one-line descriptions to show in the
56 /// traditional BLAST report
58 /// Default number of one-line descriptions to display in the traditional
59 /// BLAST report
61 /// Argument to specify the number of alignments to show in the traditional
62 /// BLAST report
64 /// Default number of alignments to display in the traditional BLAST report
66 /// Argument to specify whether to create output as HTML or not
67 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgProduceHtml;
68 /// Default value which specifies whether to create output as HTML or not
70 
71 /* Formatting options: tabular/comma-separated value output formats */
72 
73 /// Default value for tabular and comma-separated value output formats
75 /// Tag/keyword which is equivalent to using kDfltArgTabularOutputFmt
77 
78 NCBI_ALIGN_FORMAT_EXPORT extern const size_t kDfltLineLength;
80 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgMetadata;
81 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgQueryIndex;
82 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgSortHits;
83 NCBI_ALIGN_FORMAT_EXPORT extern const char* kArgSortHSPs;
84 
85 
86 
87 
88 /// Enumeration for all fields that are supported in the tabular output
90  eQuerySeqId = 0, ///< Query Seq-id(s)
91  eQueryGi, ///< Query gi
92  eQueryAccession, ///< Query accession
93  eQueryAccessionVersion,///< Query accession.version
94  eQueryLength, ///< Query sequence length
95  eSubjectSeqId, ///< Subject Seq-id(s)
96  eSubjectAllSeqIds, ///< If multiple redundant sequences, all sets
97  /// of subject Seq-ids, separated by ';'
98  eSubjectGi, ///< Subject gi
99  eSubjectAllGis, ///< All subject gis
100  eSubjectAccession, ///< Subject accession
101  eSubjAccessionVersion, ///< Subject accession.version
102  eSubjectAllAccessions, ///< All subject accessions, separated by ';'
103  eSubjectLength, ///< Subject sequence length
104  eQueryStart, ///< Start of alignment in query
105  eQueryEnd, ///< End of alignment in query
106  eSubjectStart, ///< Start of alignment in subject
107  eSubjectEnd, ///< End of alignment in subject
108  eQuerySeq, ///< Aligned part of query sequence
109  eSubjectSeq, ///< Aligned part of subject sequence
110  eEvalue, ///< Expect value
111  eBitScore, ///< Bit score
112  eScore, ///< Raw score
113  eAlignmentLength, ///< Alignment length
114  ePercentIdentical, ///< Percentage of identical matches
115  eNumIdentical, ///< Number of identical matches
116  eMismatches, ///< Number of mismatches
117  ePositives, ///< Number of positive-scoring matches
118  eGapOpenings, ///< Number of gap openings
119  eGaps, ///< Total number of gaps
120  ePercentPositives, ///< Percentage of positive-scoring matches
121  eFrames, ///< Query and subject frames separated by a '/'
122  eQueryFrame, ///< Query frame
123  eSubjFrame, ///< Subject frame
124  eBTOP, ///< BLAST traceback operations.
125  eSubjectTaxIds, ///< Subject Tax IDs
126  eSubjectSciNames, ///< Subject Scientific Names
127  eSubjectCommonNames, ///< Subject Common Names
128  eSubjectBlastNames, ///< Subject Blast Names
129  eSubjectSuperKingdoms, ///< Subject Super Kingdoms
130  eSubjectTitle, ///< Only the first subject defline
131  eSubjectAllTitles, ///< All subject deflines
132  eSubjectStrand, ///< Subject Strand
133  eQueryCovSubject, ///< Query Coverage per Subject
134  eQueryCovSeqalign, ///< Query Coverage per Seqalign
135  eQueryCovUniqSubject, ///< Query Coverage per Subject
136  eSubjectTaxId, ///< Subject Tax ID
137  eSubjectSciName, ///< Subject Scientific Name
138  eSubjectCommonName, ///< Subject Common Name
139  eSubjectBlastName, ///< Subject Blast Name
140  eSubjectSuperKingdom, ///< Subject Super Kingdom
141  eMaxTabularField ///< Sentinel value
142 };
143 
144 /// Structure to store the format specification strings, their description and
145 /// their corresponding enumeration
146 struct SFormatSpec {
147  /// Format specification name
148  const char* name;
149  /// A description of what the above name represents
150  const char* description;
151  /// Enumeration that corresponds to this field
153 
154  /// Constructor
155  /// @param n format specification name [in]
156  /// @param d format specification description [in]
157  /// @param f enumeration value [in]
158  SFormatSpec(const char* n, const char* d, ETabularField f)
159  : name(n), description(d), field(f) {}
160 };
161 
162 /// Array containing the supported output formats for tabular output.
164 /// Number of elements in the sc_FormatSpecifiers array.
166 
167 /// Returns a string documenting the available format specifiers
169 
170 enum ESAMField {
171  eSAM_SeqData = 0, ///< Include seq data
172  eSAM_SubjAsRefSeq ///< Subject as reference seqs
173 };
174 
176  /// Format specification name
177  const char* name;
178  /// A description of what the above name represents
179  const char* description;
180  /// Enumeration that corresponds to this field
182 
183  /// Constructor
184  /// @param n format specification name [in]
185  /// @param d format specification description [in]
186  /// @param f enumeration value [in]
187  SSAMFormatSpec(const char* n, const char* d, ESAMField f)
188  : name(n), description(d), field(f) {}
189 };
190 
191 /// Array containing the supported output formats for SAM output.
193 /// Number of elements in the sc_SAMFormatSpecifiers array.
195 
196 /// Returns a string documenting the available format specifiers
198 
199 END_SCOPE(align_format)
201 
202 #endif /* OBJTOOLS_ALIGN_FORMAT___FORMAT_FLAGS_HPP */
Include a standard set of the NCBI C++ Toolkit most basic headers.
ETabularField
Enumeration for all fields that are supported in the tabular output.
@ eAlignmentLength
Alignment length.
@ eSubjectEnd
End of alignment in subject.
@ eSubjectAllAccessions
All subject accessions, separated by ';'.
@ eQueryCovSubject
Query Coverage per Subject.
@ ePositives
Number of positive-scoring matches.
@ eSubjectAllGis
All subject gis.
@ eSubjectSciName
Subject Scientific Name.
@ eSubjectGi
Subject gi.
@ eSubjFrame
Subject frame.
@ eSubjectSeq
Aligned part of subject sequence.
@ eQueryStart
Start of alignment in query.
@ eFrames
Query and subject frames separated by a '/'.
@ eSubjectTaxIds
Subject Tax IDs.
@ eQueryEnd
End of alignment in query.
@ eSubjectCommonNames
Subject Common Names.
@ eQueryAccession
Query accession.
@ eSubjectLength
Subject sequence length.
@ eSubjectSeqId
Subject Seq-id(s)
@ eQueryAccessionVersion
Query accession.version.
@ eGapOpenings
Number of gap openings.
@ eQuerySeqId
Query Seq-id(s)
@ eSubjectAccession
Subject accession.
@ ePercentPositives
Percentage of positive-scoring matches.
@ eSubjectBlastName
Subject Blast Name.
@ eNumIdentical
Number of identical matches.
@ eSubjectAllSeqIds
If multiple redundant sequences, all sets of subject Seq-ids, separated by ';'.
@ eMismatches
Number of mismatches.
@ eSubjectStrand
Subject Strand.
@ eSubjectBlastNames
Subject Blast Names.
@ eQueryCovUniqSubject
Query Coverage per Subject.
@ eBitScore
Bit score.
@ ePercentIdentical
Percentage of identical matches.
@ eSubjectSciNames
Subject Scientific Names.
@ eSubjectTitle
Only the first subject defline.
@ eSubjectSuperKingdoms
Subject Super Kingdoms.
@ eQuerySeq
Aligned part of query sequence.
@ eSubjectTaxId
Subject Tax ID.
@ eSubjectStart
Start of alignment in subject.
@ eQueryGi
Query gi.
@ eSubjAccessionVersion
Subject accession.version.
@ eSubjectSuperKingdom
Subject Super Kingdom.
@ eSubjectAllTitles
All subject deflines.
@ eGaps
Total number of gaps.
@ eScore
Raw score.
@ eBTOP
BLAST traceback operations.
@ eMaxTabularField
Sentinel value.
@ eEvalue
Expect value.
@ eQueryFrame
Query frame.
@ eQueryLength
Query sequence length.
@ eQueryCovSeqalign
Query Coverage per Seqalign.
@ eSubjectCommonName
Subject Common Name.
const char * kArgSortHSPs
const char * kArgQueryIndex
const char * kDfltArgTabularOutputFmtTag
Tag/keyword which is equivalent to using kDfltArgTabularOutputFmt.
const int kDfltArgOutputFormat
Default value for formatted output type.
const bool kDfltArgShowGIs
Default value for the "show GIs" formatter option.
const char * kArgMetadata
const char * kDfltArgTabularOutputFmt
Default value for tabular and comma-separated value output formats.
const char * kArgNumDescriptions
Argument to specify the number of one-line descriptions to show in the traditional BLAST report.
const size_t kNumSAMOutputFormatSpecifiers
Number of elements in the sc_SAMFormatSpecifiers array.
const char * kArgAlignSeqList
ESAMField
@ eSAM_SubjAsRefSeq
Subject as reference seqs.
@ eSAM_SeqData
Include seq data.
const SSAMFormatSpec sc_SAMFormatSpecifiers[]
Array containing the supported output formats for SAM output.
const bool kDfltArgProduceHtml
Default value which specifies whether to create output as HTML or not.
const size_t kNumTabularOutputFormatSpecifiers
Number of elements in the sc_FormatSpecifiers array.
const size_t kDfltArgNumDescriptions
Default number of one-line descriptions to display in the traditional BLAST report.
const SFormatSpec sc_FormatSpecifiers[]
Array containing the supported output formats for tabular output.
string DescribeSAMOutputFormatSpecifiers()
Returns a string documenting the available format specifiers.
const char * kArgProduceHtml
Argument to specify whether to create output as HTML or not.
const size_t kDfltArgNumAlignments
Default number of alignments to display in the traditional BLAST report.
const size_t kDfltLineLength
const char * kArgShowGIs
Argument to specify whether the GIs should be shown in the deflines in the traditional BLAST report.
const char * kArgSortHits
string DescribeTabularOutputFormatSpecifiers(bool is_igblast=false)
Returns a string documenting the available format specifiers.
const char * kArgOutputFormat
Argument to select formatted output type.
const char * kArgNumAlignments
Argument to specify the number of alignments to show in the traditional BLAST report.
static FILE * f
Definition: readconf.c:23
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_ALIGN_FORMAT_EXPORT
Definition: ncbi_export.h:1081
yy_size_t n
The NCBI C++/STL use hints.
Structure to store the format specification strings, their description and their corresponding enumer...
ETabularField field
Enumeration that corresponds to this field.
SFormatSpec(const char *n, const char *d, ETabularField f)
Constructor.
const char * description
A description of what the above name represents.
const char * name
Format specification name.
const char * name
Format specification name.
ESAMField field
Enumeration that corresponds to this field.
SSAMFormatSpec(const char *n, const char *d, ESAMField f)
Constructor.
const char * description
A description of what the above name represents.
Modified on Fri Sep 20 14:57:39 2024 by modify_doxy.py rev. 669887