NCBI C++ ToolKit
|
Search Toolkit Book for CMultiReader
#include "multireader.hpp"
(Private to src/app/table2asn
.)
Public Types | |
using | TAnnots = list< CRef< objects::CSeq_annot > > |
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< TTypeInfo > | kSupportedTypes |
Private Attributes | |
int | m_iFlags |
string | m_AnnotName |
string | m_AnnotTitle |
CTable2AsnContext & | m_context |
unique_ptr< CObjectIStream > | m_obj_stream |
shared_ptr< objects::CGff3LocationMerger > | m_gff3_merger |
bool | mAtSequenceData |
shared_mutex | m_Mutex |
Definition at line 41 of file multireader.hpp.
using CMultiReader::TAnnots = list<CRef<objects::CSeq_annot> > |
Definition at line 48 of file multireader.hpp.
CMultiReader::CMultiReader | ( | CTable2AsnContext & | context | ) |
Definition at line 463 of file multireader.cpp.
CMultiReader::~CMultiReader | ( | ) |
Definition at line 1017 of file multireader.cpp.
void CMultiReader::AddAnnots | ( | IIndexedFeatureReader * | reader, |
CBioseq & | bioseq | ||
) | const |
Definition at line 1113 of file multireader.cpp.
References IIndexedFeatureReader::GetAndUseAnnot(), IIndexedFeatureReader::GetAnnotId(), CBioseq_Base::GetId(), l(), r(), and ct::sort().
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.
|
inlineprivate |
Definition at line 75 of file multireader.hpp.
References mAtSequenceData.
Referenced by LoadGFF3Fasta().
CRef< CSerialObject > CMultiReader::FetchEntry | ( | const CFormatGuess::EFormat & | format, |
const string & | objectType, | ||
unique_ptr< CNcbiIstream > & | pIstr, | ||
TAnnots & | annots | ||
) |
Definition at line 742 of file multireader.cpp.
References CFormatGuess::eBinaryASN, CFormatGuess::eFasta, CFormatGuess::eGff3, eSerial_AsnBinary, eSerial_AsnText, eTakeOwnership, CFormatGuess::eTextASN, CFastaReader::fNoUserObjs, format, LoadGFF3Fasta(), m_iFlags, m_obj_stream, NCBI_THROW2, CObjectIStream::Open(), xApplyTemplate(), xReadASN1Binary(), xReadASN1Text(), and xReadFasta().
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.
|
static |
Definition at line 826 of file multireader.cpp.
References CRef< C, Locker >::GetPointer(), CSerialObject::GetThisTypeInfo(), CRef< C, Locker >::Reset(), and CSeq_submit_Base::SetData().
Referenced by LoadIndexedAnnot(), and xApplyTemplate().
void CMultiReader::LoadDescriptors | ( | const string & | ifname, |
CRef< objects::CSeq_descr > & | out_desc | ||
) | const |
Definition at line 469 of file multireader.cpp.
References CObjectIStream::eNoFileHeader, NStr::EqualNocase(), CSeq_descr_Base::Get(), CException::GetMsg(), ObjectInfo(), CRef< C, Locker >::Reset(), CSeq_descr_Base::Set(), CSeqdesc_Base::SetPub(), and xCreateASNStream().
void CMultiReader::LoadGFF3Fasta | ( | istream & | in, |
TAnnots & | annots | ||
) |
Definition at line 725 of file multireader.cpp.
References AtSeqenceData(), eDiag_Info, CFormatGuess::eGff3, g_LogDiagMessage(), CFormatGuess::GetFormatName(), in(), m_context, CTable2AsnContext::m_logger, NCBI_THROW2, x_PostProcessAnnots(), and xReadGFF3().
Referenced by FetchEntry(), and OpenFile().
void CMultiReader::LoadIndexedAnnot | ( | std::unique_ptr< IIndexedFeatureReader > & | reader, |
const string & | filename | ||
) |
Definition at line 1021 of file multireader.cpp.
References eDiag_Info, CFormatGuess::eFiveColFeatureTable, CFormatGuess::eFlatFileEna, CFormatGuess::eFlatFileGenbank, CFormatGuess::eFlatFileUniProt, CFormatGuess::eGff3, CFormatGuess::eGffAugustus, CFormatGuess::eGtf, CFormatGuess::eTextASN, CFormatGuess::eUnknown, CFeature_table_reader::fAllIdsAsLocal, CFeature_table_reader::fCreateGenesFromCDSs, CFeature_table_reader::fLeaveProteinIds, CFeature_table_reader::fPreferGenbankId, g_LogDiagMessage(), CSeq_entry::GetAnnot(), CFormatGuess::GetFormatName(), GetSeqEntry(), in(), CSeq_entry::IsSetAnnot(), m_context, CTable2AsnContext::m_genome_center_id, CTable2AsnContext::m_logger, NCBI_THROW2, CDirEntry::SplitPath(), NStr::ToLower(), unused, xAnnotGetFormat(), xReadASN1Text(), xReadFlatfile(), xReadGFF3(), and xReadGTF().
Definition at line 510 of file multireader.cpp.
References CSerialObject::Assign(), context, CSeqdesc_Base::e_Pub, CSeqdesc_Base::e_Source, CTime::eCurrent, CSeq_inst_Base::eMol_dna, CRef< C, Locker >::Empty(), CObjectIStream::eNoFileHeader, CDate::ePrecision_day, CSeq_inst_Base::eRepr_raw, CSeq_descr_Base::Get(), CSeqdesc_Base::GetUser(), CUser_object::IsDBLink(), CSeqdesc_Base::IsUser(), ITERATE, m_context, CTable2AsnContext::m_entry_template, CTable2AsnContext::m_submit_template, NCBI_USER_THROW_FMT, CRef< C, Locker >::NotEmpty(), ObjectInfo(), CRef< C, Locker >::Reset(), CUser_object_Base::SetData(), CBioseq_Base::SetId(), CBioseq_Base::SetInst(), CPubdesc_Base::SetPub(), CSeqdesc_Base::SetPub(), CSeq_entry_Base::SetSeq(), CPub_Base::SetSub(), CSeqdesc_Base::SetUser(), tmp, and xCreateASNStream().
|
private |
Referenced by ApplyDescriptors().
|
private |
CFormatGuess::EFormat CMultiReader::OpenFile | ( | const string & | filename, |
CRef< CSerialObject > & | input_sequence, | ||
TAnnots & | annots | ||
) |
Definition at line 776 of file multireader.cpp.
References CFormatGuess::eBinaryASN, CFormatGuess::eFasta, CFormatGuess::eGff3, CRef< C, Locker >::Empty(), eSerial_AsnBinary, eSerial_AsnText, CFormatGuess::eTextASN, CFastaReader::fNoUserObjs, format, CBufferedStream< _Stream, _bufsize >::get(), in(), LoadGFF3Fasta(), m_iFlags, m_obj_stream, CFileContentInfo::mInfoGenbank, CFileContentInfoGenbank::mObjectType, NCBI_THROW2, CObjectIStream::Open(), xApplyTemplate(), xInputGetFormat(), xReadASN1Binary(), xReadASN1Text(), and xReadFasta().
CRef< CSeq_entry > CMultiReader::ReadAlignment | ( | CNcbiIstream & | instream, |
const CArgs & | args | ||
) |
Definition at line 285 of file multireader.cpp.
References CAlnReader::eAlpha_Nucleotide, CAlnReader::eAlpha_Protein, CBioseq_set_Base::eClass_eco_set, CBioseq_set_Base::eClass_genbank, CBioseq_set_Base::eClass_mut_set, CBioseq_set_Base::eClass_phy_set, CBioseq_set_Base::eClass_pop_set, CBioseq_set_Base::eClass_small_genome_set, map_checker< Container >::end(), CAlnReader::fGenerateLocalIDs, map_checker< Container >::find(), CAlnReader::GetSeqEntry(), m_context, CTable2AsnContext::m_logger, CAlnReader::Read(), CAlnReader::SetAllGap(), CAlnReader::SetAlphabet(), and CAlnReader::SetMissing().
CRef< CSerialObject > CMultiReader::ReadNextEntry | ( | ) |
Definition at line 877 of file multireader.cpp.
References m_obj_stream, and xReadASN1Text().
void CMultiReader::WriteObject | ( | const CSerialObject & | object, |
ostream & | ostr | ||
) |
Definition at line 453 of file multireader.cpp.
References eSerial_AsnBinary, eSerial_AsnText, CTable2AsnContext::m_binary_asn1_output, and m_context.
|
private |
Definition at line 939 of file multireader.cpp.
References data, m_context, CTable2AsnContext::m_eukaryote, m_gff3_merger, CTable2AsnContext::m_locus_tag_prefix, CTable2AsnContext::m_locus_tags_needed, CTable2AsnContext::m_logger, NCBI_THROW, s_RemoveGenBankDbxrefs(), and CSeq_annot_Base::SetData().
Referenced by LoadGFF3Fasta(), xReadGFF3(), and xReadGTF().
|
private |
Definition at line 417 of file multireader.cpp.
References CFormatGuess::CFormatHints::AddPreferredFormat(), CFormatGuess::CFormatHints::DisableAllNonpreferred(), CFormatGuess::eBinaryASN, CFormatGuess::eFiveColFeatureTable, CFormatGuess::eFlatFileEna, CFormatGuess::eFlatFileGenbank, CFormatGuess::eFlatFileUniProt, CFormatGuess::eGff3, CFormatGuess::eGffAugustus, CFormatGuess::eGtf, eSerial_AsnBinary, eSerial_AsnText, CFormatGuess::eTextASN, file, CFormatGuess::GetFormatHints(), CFormatGuess::GuessFormat(), and in().
Referenced by LoadIndexedAnnot().
|
private |
Definition at line 836 of file multireader.cpp.
References CLineError::Create(), eDiag_Warning, CRef< C, Locker >::Empty(), ILineError::eProblem_Unset, CBioseq_set_Base::GetSeq_set(), GetSeqEntry(), CSeq_entry_Base::GetSet(), CSeq_entry_Base::IsSet(), m_context, CTable2AsnContext::m_logger, CTable2AsnContext::m_t, CTable2AsnContext::MergeWithTemplate(), msg(), CRef< C, Locker >::NotEmpty(), CSeq_entry::Parentize(), CSeq_entry::ResetParentEntry(), CBioseq_set_Base::SetSeq_set(), and CSeq_entry_Base::SetSet().
Referenced by FetchEntry(), and OpenFile().
|
private |
Definition at line 982 of file multireader.cpp.
References CFormatGuess::eBinaryASN, eSerial_AsnBinary, eSerial_AsnText, eSerial_None, eSerial_Xml, eTakeOwnership, CFormatGuess::eTextASN, CFormatGuess::eUnknown, CFormatGuess::eXml, format, CFormatGuess::GetFormatName(), NCBI_USER_THROW_FMT, CObjectIStream::Open(), and xInputGetFormat().
|
private |
Definition at line 976 of file multireader.cpp.
References CFormatGuess::eUnknown.
Referenced by LoadDescriptors(), and LoadTemplate().
|
private |
Definition at line 398 of file multireader.cpp.
References CFormatGuess::CFormatHints::AddPreferredFormat(), CFormatGuess::CFormatHints::DisableAllNonpreferred(), CFormatGuess::eBinaryASN, CFormatGuess::eGff3, CFormatGuess::eTextASN, CFormatGuessEx::GetFormatHints(), CFormatGuessEx::GuessFormat(), CFormatGuessEx::GuessFormatAndContent(), kSupportedTypes, and CFormatGuessEx::SetRecognizedGenbankTypes().
Referenced by OpenFile(), and xCreateASNStream().
|
private |
Definition at line 189 of file multireader.cpp.
References ObjectInfo(), CObjectIStream::Read(), and Ref().
Referenced by FetchEntry(), and OpenFile().
|
private |
Definition at line 219 of file multireader.cpp.
References CGapsEditor::ConvertNs2Gaps(), CRef< C, Locker >::Empty(), CObjectIStream::eNoFileHeader, CSeq_submit_Base::GetData(), CSeq_submit_Base::C_Data::GetEntrys(), m_context, CTable2AsnContext::m_DefaultEvidence, CTable2AsnContext::m_gap_type, CTable2AsnContext::m_gap_Unknown_length, CTable2AsnContext::m_gapNmin, CTable2AsnContext::m_GapsizeToEvidence, ObjectInfo(), CObjectIStream::Read(), CObjectIStream::ReadFileHeader(), CRef< C, Locker >::Reset(), CBioseq_Base::SetAnnot(), CSeq_submit_Base::SetData(), CSeq_entry_Base::SetSeq(), CBioseq_set_Base::SetSeq_set(), and CSeq_entry_Base::SetSet().
Referenced by FetchEntry(), LoadIndexedAnnot(), OpenFile(), and ReadNextEntry().
|
private |
Definition at line 326 of file multireader.cpp.
References eDiag_Warning, CFastaReader::fAssumeNuc, CFastaReader::fDisableParseRange, CFastaReader::fForceType, CFastaReader::fHyphensIgnoreAndWarn, CFastaReader::fIgnoreMods, CFastaReader::fLetterGaps, CFastaReader::fNoSplit, CFastaReader::fParseGaps, CFastaReader::fParseRawID, CFastaReader::fValidate, g_LogGeneralParsingError(), kMax_Int, CTable2AsnContext::m_allow_accession, CTable2AsnContext::m_ClassValue, m_context, CTable2AsnContext::m_current_file, CTable2AsnContext::m_d_fasta, CTable2AsnContext::m_DefaultEvidence, CTable2AsnContext::m_di_fasta, CTable2AsnContext::m_gap_type, CTable2AsnContext::m_gap_Unknown_length, CTable2AsnContext::m_gapNmin, CTable2AsnContext::m_GapsizeToEvidence, CTable2AsnContext::m_HandleAsSet, m_iFlags, CTable2AsnContext::m_logger, CTable2AsnContext::MakeGenomeCenterId(), NCBI_THROW2, and result.
Referenced by FetchEntry(), and OpenFile().
|
private |
Definition at line 1173 of file multireader.cpp.
References Parser::BioseqSet, CSeq_id_Base::e_Embl, CSeq_id_Base::e_Genbank, CSeq_id_Base::e_Swissprot, CFormatGuess::eFlatFileEna, CFormatGuess::eFlatFileGenbank, CFormatGuess::eFlatFileUniProt, Parser::EMBL, format, Parser::GenBank, CBioseq_Base::IsSetAnnot(), m_context, CTable2AsnContext::m_logger, NCBI_THROW2, ParFlat_EMBL_AC, CFlatFileParser::Parse(), Ref(), CBioseq_Base::SetAnnot(), and Parser::SPROT.
Referenced by LoadIndexedAnnot().
|
private |
Definition at line 885 of file multireader.cpp.
References CReadUtil::AsSeqId(), CGff2Reader::AtSequenceData(), CReaderBase::fAllIdsAsLocal, CGff2Reader::fGenbankMode, CGff3Reader::fGeneXrefs, flags, CGff2Reader::fRetainLocusIds, CGff3Reader::GetLocationMerger(), lr(), m_AnnotName, m_AnnotTitle, m_context, m_gff3_merger, CTable2AsnContext::m_logger, mAtSequenceData, msg(), CGff2Reader::ReadSeqAnnots(), and x_PostProcessAnnots().
Referenced by LoadGFF3Fasta(), and LoadIndexedAnnot().
|
private |
Definition at line 1152 of file multireader.cpp.
References CReaderBase::fAllIdsAsLocal, CGff2Reader::fGenbankMode, CGtfReader::fGenerateChildXrefs, flags, lr(), m_AnnotName, m_AnnotTitle, m_context, CTable2AsnContext::m_logger, msg(), CGff2Reader::ReadSeqAnnots(), and x_PostProcessAnnots().
Referenced by LoadIndexedAnnot().
Definition at line 50 of file multireader.hpp.
Referenced by CTbl2AsnApp::ProcessOneFile(), and xInputGetFormat().
|
private |
Definition at line 92 of file multireader.hpp.
Referenced by xReadGFF3(), and xReadGTF().
|
private |
Definition at line 93 of file multireader.hpp.
Referenced by xReadGFF3(), and xReadGTF().
|
private |
Definition at line 94 of file multireader.hpp.
Referenced by GetIndexedAnnot(), LoadGFF3Fasta(), LoadIndexedAnnot(), LoadTemplate(), ReadAlignment(), WriteObject(), x_PostProcessAnnots(), xApplyTemplate(), xReadASN1Text(), xReadFasta(), xReadFlatfile(), xReadGFF3(), and xReadGTF().
|
private |
Definition at line 96 of file multireader.hpp.
Referenced by x_PostProcessAnnots(), and xReadGFF3().
|
private |
Definition at line 91 of file multireader.hpp.
Referenced by FetchEntry(), OpenFile(), and xReadFasta().
|
mutableprivate |
Definition at line 98 of file multireader.hpp.
|
private |
Definition at line 95 of file multireader.hpp.
Referenced by FetchEntry(), OpenFile(), and ReadNextEntry().
|
private |
Definition at line 97 of file multireader.hpp.
Referenced by AtSeqenceData(), and xReadGFF3().