NCBI C++ ToolKit
Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
CMaskWriterBlastDbMaskInfo Class Reference

Search Toolkit Book for CMaskWriterBlastDbMaskInfo

Output filter to print masked sequence locations as Blast-db-mask-info objects. More...

#include <objtools/seqmasks_io/mask_writer_blastdb_maskinfo.hpp>

+ Inheritance diagram for CMaskWriterBlastDbMaskInfo:
+ Collaboration diagram for CMaskWriterBlastDbMaskInfo:

Public Member Functions

 CMaskWriterBlastDbMaskInfo (CNcbiOstream &arg_os, const string &format, int algo_id, objects::EBlast_filter_program filt_program, const string &algo_options)
 Object constructor. More...
 
virtual ~CMaskWriterBlastDbMaskInfo ()
 Object destructor. More...
 
virtual void Print (objects::CBioseq_Handle &bsh, const TMaskList &mask, bool parsed_id=false)
 Send the masking data to the output stream. More...
 
void Print (int gi, const TMaskList &mask)
 
void Print (const objects::CSeq_id &id, const TMaskList &mask)
 
- Public Member Functions inherited from CMaskWriter
 CMaskWriter (CNcbiOstream &arg_os)
 Object constructor. More...
 
virtual ~CMaskWriter ()
 Object destructor. More...
 

Protected Types

typedef vector< CRef< objects::CBlast_mask_list > > TBlastMaskLists
 convenience typedef More...
 

Protected Attributes

CRef< objects::CBlast_db_mask_info > m_BlastDbMaskInfo
 The data type objects of this class will print. More...
 
TBlastMaskLists m_ListOfMasks
 vector of list of masks More...
 
ESerialDataFormat m_OutputFormat
 Output format for data types above. More...
 
- Protected Attributes inherited from CMaskWriter
CNcbiOstreamos
 the standard C++ ostream object More...
 

Private Member Functions

void x_ConsolidateListOfMasks ()
 Consolidate the list of masks so that each element contains the masks for multiple OIDs, this should make reading the masks more efficient and reduce the storage requirements. More...
 

Additional Inherited Members

- Public Types inherited from CMaskWriter
typedef pair< TSeqPos, TSeqPosTMaskedInterval
 Type representing a masked interval within a sequence. More...
 
typedef vector< TMaskedIntervalTMaskList
 A type representing the total of masking information about a sequence. More...
 
- Protected Member Functions inherited from CMaskWriter
virtual void PrintId (objects::CBioseq_Handle &bsh, bool parsed_id)
 Output of the sequence id. More...
 
virtual string IdToString (objects::CBioseq_Handle &bsh, bool parsed_id)
 Convert the sequence id to a string. More...
 

Detailed Description

Output filter to print masked sequence locations as Blast-db-mask-info objects.

Definition at line 48 of file mask_writer_blastdb_maskinfo.hpp.

Member Typedef Documentation

◆ TBlastMaskLists

typedef vector< CRef<objects::CBlast_mask_list> > CMaskWriterBlastDbMaskInfo::TBlastMaskLists
protected

convenience typedef

Definition at line 97 of file mask_writer_blastdb_maskinfo.hpp.

Constructor & Destructor Documentation

◆ CMaskWriterBlastDbMaskInfo()

CMaskWriterBlastDbMaskInfo::CMaskWriterBlastDbMaskInfo ( CNcbiOstream arg_os,
const string format,
int  algo_id,
objects::EBlast_filter_program  filt_program,
const string algo_options 
)

Object constructor.

Parameters
arg_osoutput stream used to initialize the base class instance
formatformat for the Seq-locs (as defined in mask_cmdline_args.hpp).
See also
kOutputFormats
Parameters
algo_idIdentifier for this algorithm
filt_programFiltering program being used
algo_optionsalgorithm options being used

Definition at line 45 of file mask_writer_blastdb_maskinfo.cpp.

References eSerial_AsnBinary, eSerial_AsnText, eSerial_None, eSerial_Xml, format, m_BlastDbMaskInfo, m_OutputFormat, and CRef< C, Locker >::Reset().

◆ ~CMaskWriterBlastDbMaskInfo()

CMaskWriterBlastDbMaskInfo::~CMaskWriterBlastDbMaskInfo ( )
virtual

Member Function Documentation

◆ Print() [1/3]

void CMaskWriterBlastDbMaskInfo::Print ( const objects::CSeq_id &  id,
const TMaskList mask 
)

◆ Print() [2/3]

void CMaskWriterBlastDbMaskInfo::Print ( int  gi,
const TMaskList mask 
)

Definition at line 174 of file mask_writer_blastdb_maskinfo.cpp.

References CSeq_id_Base::e_Gi, mask, and Print().

◆ Print() [3/3]

void CMaskWriterBlastDbMaskInfo::Print ( objects::CBioseq_Handle &  bsh,
const TMaskList mask,
bool  parsed_id = false 
)
virtual

Send the masking data to the output stream.

Parameters
bshthe bioseq handle
maskthe resulting list of masked intervals
parsed_idbioseq id was parsed by CMaskReader.

Implements CMaskWriter.

Definition at line 167 of file mask_writer_blastdb_maskinfo.cpp.

References mask.

Referenced by Print().

◆ x_ConsolidateListOfMasks()

void CMaskWriterBlastDbMaskInfo::x_ConsolidateListOfMasks ( )
private

Consolidate the list of masks so that each element contains the masks for multiple OIDs, this should make reading the masks more efficient and reduce the storage requirements.

Definition at line 110 of file mask_writer_blastdb_maskinfo.cpp.

References _ASSERT, ctll::empty(), i, m_ListOfMasks, and ncbi::grid::netcache::search::fields::size.

Referenced by ~CMaskWriterBlastDbMaskInfo().

Member Data Documentation

◆ m_BlastDbMaskInfo

CRef<objects::CBlast_db_mask_info> CMaskWriterBlastDbMaskInfo::m_BlastDbMaskInfo
protected

The data type objects of this class will print.

Definition at line 95 of file mask_writer_blastdb_maskinfo.hpp.

Referenced by CMaskWriterBlastDbMaskInfo(), and ~CMaskWriterBlastDbMaskInfo().

◆ m_ListOfMasks

TBlastMaskLists CMaskWriterBlastDbMaskInfo::m_ListOfMasks
protected

vector of list of masks

Definition at line 99 of file mask_writer_blastdb_maskinfo.hpp.

Referenced by Print(), x_ConsolidateListOfMasks(), and ~CMaskWriterBlastDbMaskInfo().

◆ m_OutputFormat

ESerialDataFormat CMaskWriterBlastDbMaskInfo::m_OutputFormat
protected

Output format for data types above.

Definition at line 101 of file mask_writer_blastdb_maskinfo.hpp.

Referenced by CMaskWriterBlastDbMaskInfo(), Print(), and ~CMaskWriterBlastDbMaskInfo().


The documentation for this class was generated from the following files:
Modified on Tue Apr 16 20:12:35 2024 by modify_doxy.py rev. 669887