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

Search Toolkit Book for CMultiReader

#include "multireader.hpp"
(Private to src/app/table2asn.)

+ Collaboration diagram for CMultiReader:

Public Types

using TAnnots = list< CRef< objects::CSeq_annot > >
 

Public Member Functions

 CMultiReader (CTable2AsnContext &context)
 
 ~CMultiReader ()
 
void LoadTemplate (const string &ifname)
 
void LoadGFF3Fasta (istream &in, TAnnots &annots)
 
void AddAnnots (IIndexedFeatureReader *reader, CBioseq &bioseq) const
 
void LoadIndexedAnnot (std::unique_ptr< IIndexedFeatureReader > &reader, const string &filename)
 
void GetIndexedAnnot (std::unique_ptr< IIndexedFeatureReader > &reader, TAnnots &annots)
 
void LoadDescriptors (const string &ifname, CRef< objects::CSeq_descr > &out_desc) const
 
void ApplyDescriptors (objects::CSeq_entry &obj, const objects::CSeq_descr &source) const
 
void WriteObject (const CSerialObject &, ostream &)
 
CRef< objects::CSeq_entry > ReadAlignment (CNcbiIstream &instream, const CArgs &args)
 
CRef< CSerialObjectReadNextEntry ()
 
CFormatGuess::EFormat OpenFile (const string &filename, CRef< CSerialObject > &input_sequence, TAnnots &annots)
 
CRef< CSerialObjectFetchEntry (const CFormatGuess::EFormat &format, const string &objectType, unique_ptr< CNcbiIstream > &pIstr, TAnnots &annots)
 

Static Public Member Functions

static void GetSeqEntry (CRef< objects::CSeq_entry > &entry, CRef< objects::CSeq_submit > &submit, CRef< CSerialObject > obj)
 

Static Public Attributes

static const set< TTypeInfokSupportedTypes
 

Private Member Functions

void MergeDescriptors (objects::CSeq_descr &dest, const objects::CSeq_descr &source) const
 
void MergeDescriptors (objects::CSeq_descr &dest, const objects::CSeqdesc &source) const
 
bool AtSeqenceData () const
 
CRef< objects::CSeq_entry > xReadFasta (CNcbiIstream &instream)
 
CRef< CSerialObjectxApplyTemplate (CRef< CSerialObject > obj, bool merge_template_descriptors) const
 
CRef< CSerialObjectxReadASN1Text (CObjectIStream &pObjIstrm) const
 
CRef< CSerialObjectxReadASN1Binary (CObjectIStream &pObjIstrm, const string &content_type) const
 
TAnnots xReadGFF3 (CNcbiIstream &instream, bool post_process)
 
TAnnots xReadGTF (CNcbiIstream &instream) const
 
CRef< objects::CSeq_entry > xReadFlatfile (CFormatGuess::EFormat format, const string &filename, CNcbiIstream &instream)
 
void x_PostProcessAnnots (TAnnots &annots) const
 
unique_ptr< CObjectIStreamxCreateASNStream (const string &filename) const
 
unique_ptr< CObjectIStreamxCreateASNStream (CFormatGuess::EFormat format, unique_ptr< istream > &instream) const
 
CFormatGuess::EFormat xInputGetFormat (CNcbiIstream &, CFileContentInfo *=nullptr) const
 
void xAnnotGetFormat (objects::edit::CHugeFile &file) const
 

Private Attributes

int m_iFlags
 
string m_AnnotName
 
string m_AnnotTitle
 
CTable2AsnContextm_context
 
unique_ptr< CObjectIStreamm_obj_stream
 
shared_ptr< objects::CGff3LocationMerger > m_gff3_merger
 
bool mAtSequenceData
 
shared_mutex m_Mutex
 

Detailed Description

Definition at line 41 of file multireader.hpp.

Member Typedef Documentation

◆ TAnnots

using CMultiReader::TAnnots = list<CRef<objects::CSeq_annot> >

Definition at line 48 of file multireader.hpp.

Constructor & Destructor Documentation

◆ CMultiReader()

CMultiReader::CMultiReader ( CTable2AsnContext context)

Definition at line 463 of file multireader.cpp.

◆ ~CMultiReader()

CMultiReader::~CMultiReader ( )

Definition at line 1017 of file multireader.cpp.

Member Function Documentation

◆ AddAnnots()

void CMultiReader::AddAnnots ( IIndexedFeatureReader reader,
CBioseq bioseq 
) const

◆ ApplyDescriptors()

void CMultiReader::ApplyDescriptors ( objects::CSeq_entry &  obj,
const objects::CSeq_descr &  source 
) const

Definition at line 701 of file multireader.cpp.

References MergeDescriptors(), CSeq_entry::SetDescr(), and rapidjson::source.

◆ AtSeqenceData()

bool CMultiReader::AtSeqenceData ( ) const
inlineprivate

Definition at line 75 of file multireader.hpp.

References mAtSequenceData.

Referenced by LoadGFF3Fasta().

◆ FetchEntry()

CRef< CSerialObject > CMultiReader::FetchEntry ( const CFormatGuess::EFormat format,
const string objectType,
unique_ptr< CNcbiIstream > &  pIstr,
TAnnots annots 
)

◆ GetIndexedAnnot()

void CMultiReader::GetIndexedAnnot ( std::unique_ptr< IIndexedFeatureReader > &  reader,
TAnnots annots 
)

Definition at line 1222 of file multireader.cpp.

References m_context, and CTable2AsnContext::m_genome_center_id.

◆ GetSeqEntry()

void CMultiReader::GetSeqEntry ( CRef< objects::CSeq_entry > &  entry,
CRef< objects::CSeq_submit > &  submit,
CRef< CSerialObject obj 
)
static

◆ LoadDescriptors()

void CMultiReader::LoadDescriptors ( const string ifname,
CRef< objects::CSeq_descr > &  out_desc 
) const

◆ LoadGFF3Fasta()

void CMultiReader::LoadGFF3Fasta ( istream &  in,
TAnnots annots 
)

◆ LoadIndexedAnnot()

void CMultiReader::LoadIndexedAnnot ( std::unique_ptr< IIndexedFeatureReader > &  reader,
const string filename 
)

◆ LoadTemplate()

void CMultiReader::LoadTemplate ( const string ifname)

◆ MergeDescriptors() [1/2]

void CMultiReader::MergeDescriptors ( objects::CSeq_descr &  dest,
const objects::CSeq_descr &  source 
) const
private

Referenced by ApplyDescriptors().

◆ MergeDescriptors() [2/2]

void CMultiReader::MergeDescriptors ( objects::CSeq_descr &  dest,
const objects::CSeqdesc &  source 
) const
private

◆ OpenFile()

CFormatGuess::EFormat CMultiReader::OpenFile ( const string filename,
CRef< CSerialObject > &  input_sequence,
TAnnots annots 
)

◆ ReadAlignment()

CRef< CSeq_entry > CMultiReader::ReadAlignment ( CNcbiIstream instream,
const CArgs args 
)

◆ ReadNextEntry()

CRef< CSerialObject > CMultiReader::ReadNextEntry ( )

Definition at line 877 of file multireader.cpp.

References m_obj_stream, and xReadASN1Text().

◆ WriteObject()

void CMultiReader::WriteObject ( const CSerialObject object,
ostream &  ostr 
)

◆ x_PostProcessAnnots()

void CMultiReader::x_PostProcessAnnots ( TAnnots annots) const
private

◆ xAnnotGetFormat()

void CMultiReader::xAnnotGetFormat ( objects::edit::CHugeFile &  file) const
private

◆ xApplyTemplate()

CRef< CSerialObject > CMultiReader::xApplyTemplate ( CRef< CSerialObject obj,
bool  merge_template_descriptors 
) const
private

◆ xCreateASNStream() [1/2]

unique_ptr< CObjectIStream > CMultiReader::xCreateASNStream ( CFormatGuess::EFormat  format,
unique_ptr< istream > &  instream 
) const
private

◆ xCreateASNStream() [2/2]

unique_ptr< CObjectIStream > CMultiReader::xCreateASNStream ( const string filename) const
private

Definition at line 976 of file multireader.cpp.

References CFormatGuess::eUnknown.

Referenced by LoadDescriptors(), and LoadTemplate().

◆ xInputGetFormat()

CFormatGuess::EFormat CMultiReader::xInputGetFormat ( CNcbiIstream istr,
CFileContentInfo content_info = nullptr 
) const
private

◆ xReadASN1Binary()

CRef< CSerialObject > CMultiReader::xReadASN1Binary ( CObjectIStream pObjIstrm,
const string content_type 
) const
private

Definition at line 189 of file multireader.cpp.

References ObjectInfo(), CObjectIStream::Read(), and Ref().

Referenced by FetchEntry(), and OpenFile().

◆ xReadASN1Text()

CRef< CSerialObject > CMultiReader::xReadASN1Text ( CObjectIStream pObjIstrm) const
private

◆ xReadFasta()

CRef< CSeq_entry > CMultiReader::xReadFasta ( CNcbiIstream instream)
private

◆ xReadFlatfile()

CRef< CSeq_entry > CMultiReader::xReadFlatfile ( CFormatGuess::EFormat  format,
const string filename,
CNcbiIstream instream 
)
private

◆ xReadGFF3()

CMultiReader::TAnnots CMultiReader::xReadGFF3 ( CNcbiIstream instream,
bool  post_process 
)
private

◆ xReadGTF()

CMultiReader::TAnnots CMultiReader::xReadGTF ( CNcbiIstream instream) const
private

Member Data Documentation

◆ kSupportedTypes

const set< TTypeInfo > CMultiReader::kSupportedTypes
static
Initial value:
= {
CBioseq_set::GetTypeInfo(),
CBioseq::GetTypeInfo(),
CSeq_entry::GetTypeInfo(),
CSeq_submit::GetTypeInfo(),
CSeq_annot::GetTypeInfo(),
}

Definition at line 50 of file multireader.hpp.

Referenced by CTbl2AsnApp::ProcessOneFile(), and xInputGetFormat().

◆ m_AnnotName

string CMultiReader::m_AnnotName
private

Definition at line 92 of file multireader.hpp.

Referenced by xReadGFF3(), and xReadGTF().

◆ m_AnnotTitle

string CMultiReader::m_AnnotTitle
private

Definition at line 93 of file multireader.hpp.

Referenced by xReadGFF3(), and xReadGTF().

◆ m_context

CTable2AsnContext& CMultiReader::m_context
private

◆ m_gff3_merger

shared_ptr<objects::CGff3LocationMerger> CMultiReader::m_gff3_merger
private

Definition at line 96 of file multireader.hpp.

Referenced by x_PostProcessAnnots(), and xReadGFF3().

◆ m_iFlags

int CMultiReader::m_iFlags
private

Definition at line 91 of file multireader.hpp.

Referenced by FetchEntry(), OpenFile(), and xReadFasta().

◆ m_Mutex

shared_mutex CMultiReader::m_Mutex
mutableprivate

Definition at line 98 of file multireader.hpp.

◆ m_obj_stream

unique_ptr<CObjectIStream> CMultiReader::m_obj_stream
private

Definition at line 95 of file multireader.hpp.

Referenced by FetchEntry(), OpenFile(), and ReadNextEntry().

◆ mAtSequenceData

bool CMultiReader::mAtSequenceData
private

Definition at line 97 of file multireader.hpp.

Referenced by AtSeqenceData(), and xReadGFF3().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887