NCBI C++ ToolKit
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CMaskFastaReader Class Reference

Search Toolkit Book for CMaskFastaReader

Class for reading sequences from fasta files. More...

#include <objtools/seqmasks_io/mask_fasta_reader.hpp>

+ Inheritance diagram for CMaskFastaReader:
+ Collaboration diagram for CMaskFastaReader:

Public Member Functions

 CMaskFastaReader (CNcbiIstream &newInputStream, bool is_nucl=true, bool parse_seqids=false)
 Object constructor. More...
virtual ~CMaskFastaReader ()
 Object destructor. More...
virtual CRef< objects::CSeq_entry > GetNextSequence ()
 Read next sequence from fasta stream. More...
- Public Member Functions inherited from CMaskReader
 CMaskReader (CNcbiIstream &newInputStream)
 Object constructor. More...
virtual ~CMaskReader ()
 Object destructor. More...

Private Attributes

bool is_nucleotide_
 This object is reading nucleotide sequences. More...
objects::CFastaReader fasta_reader_
 Fasta reader object. More...

Static Private Attributes

static const objects::CFastaReader::TFlags CONST_FLAGS
 Unchaged subset of flags. More...

Additional Inherited Members

- Protected Attributes inherited from CMaskReader

Detailed Description

Class for reading sequences from fasta files.

Definition at line 45 of file mask_fasta_reader.hpp.

Constructor & Destructor Documentation

◆ CMaskFastaReader()

CMaskFastaReader::CMaskFastaReader ( CNcbiIstream newInputStream,
bool  is_nucl = true,
bool  parse_seqids = false 

Object constructor.

newInputStreaminput stream to read data from.
is_nucltrue if the input is DNA, false if it is protein
parse_seqidsfalse to disable parsing of deflines

Definition at line 57 of file mask_fasta_reader.hpp.

References NCBI_THROW.

◆ ~CMaskFastaReader()

virtual CMaskFastaReader::~CMaskFastaReader ( )

Object destructor.

Definition at line 77 of file mask_fasta_reader.hpp.

Member Function Documentation

◆ GetNextSequence()

CRef< CSeq_entry > CMaskFastaReader::GetNextSequence ( )

Read next sequence from fasta stream.

pointer (reference counting) to the object containing information about the sequence, or CRef( NULL ) if end of file is reached.

Implements CMaskReader.

Definition at line 43 of file mask_fasta_reader.cpp.

References fasta_reader_, CSeq_entry_Base::GetSeq(), CMaskReader::input_stream, is_nucleotide_, CBioseq::IsNa(), CSeq_entry_Base::IsSeq(), and NCBI_THROW.

Member Data Documentation


const objects::CFastaReader::TFlags CMaskFastaReader::CONST_FLAGS
Initial value:
objects::CFastaReader::fForceType |
objects::CFastaReader::fOneSeq |

Unchaged subset of flags.

Definition at line 91 of file mask_fasta_reader.hpp.

◆ fasta_reader_

objects::CFastaReader CMaskFastaReader::fasta_reader_

Fasta reader object.

Definition at line 98 of file mask_fasta_reader.hpp.

Referenced by GetNextSequence().

◆ is_nucleotide_

bool CMaskFastaReader::is_nucleotide_

This object is reading nucleotide sequences.

Definition at line 96 of file mask_fasta_reader.hpp.

Referenced by GetNextSequence().

The documentation for this class was generated from the following files:
Modified on Thu Apr 11 15:05:29 2024 by rev. 669887