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

Go to the SVN repository for this file.

1 /* $Id: mask_writer_blastdb_maskinfo.hpp 44777 2010-02-12 18:29:18Z camacho $
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  * Author: Christiam Camacho
27  *
28  * File Description:
29  * Header file for CMaskWriterBlastDbMaskInfo class.
30  *
31  */
32 
33 #ifndef CMASK_WRITER_BLASTDB_MASKINFO_H
34 #define CMASK_WRITER_BLASTDB_MASKINFO_H
35 
40 #include <corelib/ncbiargs.hpp>
41 
43 
44 /**
45  ** Output filter to print masked sequence locations as Blast-db-mask-info
46  ** objects.
47  **/
49 {
50 public:
51 
52  /**
53  **\brief Object constructor.
54  **
55  **\param arg_os output stream used to initialize the
56  ** base class instance
57  **\param format format for the Seq-locs (as defined in
58  ** mask_cmdline_args.hpp). \sa kOutputFormats
59  **\param algo_id Identifier for this algorithm
60  **\param filt_program Filtering program being used
61  **\param algo_options algorithm options being used
62  **
63  **/
65  const string & format,
66  int algo_id,
67  objects::EBlast_filter_program filt_program,
68  const string & algo_options
69  );
70 
71  /**
72  **\brief Object destructor.
73  **
74  **/
75  virtual ~CMaskWriterBlastDbMaskInfo();
76 
77  /**
78  **\brief Send the masking data to the output stream.
79  **
80  **\param bsh the bioseq handle
81  **\param mask the resulting list of masked intervals
82  **\param parsed_id bioseq id was parsed by CMaskReader.
83  **
84  **/
85  virtual void Print( objects::CBioseq_Handle& bsh,
86  const TMaskList & mask,
87  bool parsed_id = false );
88 
89  void Print( int gi, const TMaskList & mask );
90  void Print( const objects::CSeq_id& id,
91  const TMaskList & mask );
92 
93 protected:
94  /// The data type objects of this class will print
96  /// convenience typedef
97  typedef vector< CRef<objects::CBlast_mask_list> > TBlastMaskLists;
98  /// vector of list of masks
100  /// Output format for data types above
102 
103 private:
104  /// Consolidate the list of masks so that each element contains the masks
105  /// for multiple OIDs, this should make reading the masks more efficient
106  /// and reduce the storage requirements
107  void x_ConsolidateListOfMasks();
108 };
109 
110 /** Builds an algorithm options string for the filtering applications
111  * (segmasker, dustmasker) by examining the command line arguments specified
112  * @param args Command line arguments [in]
113  * @return string with algorithm parameters or empty string is algorithm cannot
114  * be determined
115  */
117 string BuildAlgorithmParametersString(const CArgs& args);
118 
120 
121 #endif
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
ncbi::TMaskedQueryRegions mask
CArgs –.
Definition: ncbiargs.hpp:379
Output filter to print masked sequence locations as Blast-db-mask-info objects.
CRef< objects::CBlast_db_mask_info > m_BlastDbMaskInfo
The data type objects of this class will print.
ESerialDataFormat m_OutputFormat
Output format for data types above.
vector< CRef< objects::CBlast_mask_list > > TBlastMaskLists
convenience typedef
TBlastMaskLists m_ListOfMasks
vector of list of masks
A base class for winmasker output writers.
Definition: mask_writer.hpp:52
virtual void Print(objects::CBioseq_Handle &bsh, const TMaskList &mask, bool parsed_id=false)=0
Output masked sequence data.
vector< TMaskedInterval > TMaskList
A type representing the total of masking information about a sequence.
Definition: mask_writer.hpp:85
ESerialDataFormat
Data file format.
Definition: serialdef.hpp:71
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define NCBI_XOBJREAD_EXPORT
Definition: ncbi_export.h:1315
EBlast_filter_program
This defines the possible sequence filtering algorithms to be used in a BLAST database.
string BuildAlgorithmParametersString(const CArgs &args)
Builds an algorithm options string for the filtering applications (segmasker, dustmasker) by examinin...
Defines command line argument related classes.
static Format format
Definition: njn_ioutil.cpp:53
Modified on Tue Apr 16 20:14:34 2024 by modify_doxy.py rev. 669887