NCBI C++ ToolKit
|
Search Toolkit Book for CCleanupHugeAsnReader
#include "huge_file_cleanup.hpp"
(Private to src/app/asn_cleanup
.)
Classes | |
struct | TFeatIdInfo |
Public Types | |
enum | EOptions { eExtendedCleanup = 1 , eNoNcbiUserObjects = 1<<1 , eEnableSmallGenomeSets = 1<<2 } |
using | TOptions = int |
using | TParent = edit::CHugeAsnReader |
using | TFeatId = CFeat_id::TLocal::TId |
Public Member Functions | |
CCleanupHugeAsnReader (TOptions options) | |
virtual | ~CCleanupHugeAsnReader ()=default |
void | FlattenGenbankSet () override |
CRef< CSeq_entry > | LoadSeqEntry (const TBioseqSetInfo &info, eAddTopEntry add_top_entry=eAddTopEntry::yes) const override |
const CCleanupChangeCore & | GetChanges () const |
Private Types | |
using | TIdToFluLabel = map< CConstRef< CSeq_id >, string, CRefLess > |
Private Member Functions | |
bool | x_IsExtendedCleanup () const |
void | x_SetHooks (CObjectIStream &objStream, TContext &context) override |
void | x_SetBioseqHooks (CObjectIStream &objStream, TContext &context) override |
void | x_SetBioseqSetHooks (CObjectIStream &objStream, TContext &context) override |
void | x_SetSeqFeatHooks (CObjectIStream &objStream, TContext &context) |
void | x_RecordFeatureId (const CFeat_id &featId) |
void | x_CreateSmallGenomeSets () |
void | x_PruneIfFeatsIncomplete () |
void | x_PruneAndReorderTopIds () |
void | x_PruneIfSegsMissing (const string &fluLabel, const set< size_t > &segsFound) |
void | x_CleanupTopLevelDescriptors () |
bool | x_LooksLikeNucProtSet () const |
void | x_AddTopLevelDescriptors (CSeq_entry &entry) const |
TIdToFluLabel::iterator | x_GetFluLabel (const CConstRef< CSeq_id > &pId) |
Private Attributes | |
list< CRef< CSeqdesc > > | m_TopLevelBiosources |
CRef< CSeqdesc > | m_pTopLevelMolInfo |
const TOptions | m_CleanupOptions |
CCleanupChangeCore | m_Changes |
TIdToFluLabel | m_IdToFluLabel |
map< string, list< TBioseqSetInfo > > | m_FluLabelToSetInfo |
map< TFileSize, string > | m_SetPosToFluLabel |
set< CConstRef< CSeq_id >, CRefLess > | m_HasIncompleteFeats |
TFeatIdInfo | m_FeatIdInfo |
Definition at line 49 of file huge_file_cleanup.hpp.
Definition at line 69 of file huge_file_cleanup.hpp.
|
private |
Definition at line 91 of file huge_file_cleanup.hpp.
using CCleanupHugeAsnReader::TOptions = int |
Definition at line 58 of file huge_file_cleanup.hpp.
using CCleanupHugeAsnReader::TParent = edit::CHugeAsnReader |
Definition at line 62 of file huge_file_cleanup.hpp.
Enumerator | |
---|---|
eExtendedCleanup | |
eNoNcbiUserObjects | |
eEnableSmallGenomeSets |
Definition at line 52 of file huge_file_cleanup.hpp.
CCleanupHugeAsnReader::CCleanupHugeAsnReader | ( | TOptions | options | ) |
Definition at line 54 of file huge_file_cleanup.cpp.
|
virtualdefault |
|
override |
Definition at line 64 of file huge_file_cleanup.cpp.
References CCleanupChangeCore::eChangeBioseqSetClass, CBioseq_set_Base::eClass_genbank, CBioseq_set_Base::eClass_not_set, CBioseq_set_Base::eClass_nuc_prot, eEnableSmallGenomeSets, m_Changes, m_CleanupOptions, next(), CCleanupChangeCore::SetChanged(), x_CleanupTopLevelDescriptors(), x_CreateSmallGenomeSets(), x_LooksLikeNucProtSet(), and x_PruneAndReorderTopIds().
const CCleanupChangeCore & CCleanupHugeAsnReader::GetChanges | ( | ) | const |
Definition at line 58 of file huge_file_cleanup.cpp.
References m_Changes.
|
override |
Definition at line 344 of file huge_file_cleanup.cpp.
References CBioseq_set_Base::eClass_small_genome_set, eEnableSmallGenomeSets, map_checker< Container >::end(), map_checker< Container >::find(), info, m_CleanupOptions, m_FeatIdInfo, m_FluLabelToSetInfo, m_SetPosToFluLabel, CCleanupHugeAsnReader::TFeatIdInfo::PosToIdMap, Ref(), s_UpdateFeatureIds(), x_AddTopLevelDescriptors(), x_IsExtendedCleanup(), and yes.
|
private |
Definition at line 209 of file huge_file_cleanup.cpp.
References CCleanupChangeCore::eAddDescriptor, CRef< C, Locker >::Empty(), CSeq_descr_Base::Get(), CSeq_entry::GetDescr(), CSeq_descr_Base::IsSet(), CSeq_entry::IsSetDescr(), m_Changes, m_pTopLevelMolInfo, m_TopLevelBiosources, CCleanupChangeCore::SetChanged(), CSeq_entry::SetDescr(), and x_IsExtendedCleanup().
Referenced by LoadSeqEntry().
|
private |
Definition at line 151 of file huge_file_cleanup.cpp.
References CCleanup::AddNcbiCleanupObject(), cleanup(), CCleanupChangeCore::eAddDescriptor, CCleanupChangeCore::eAddNcbiCleanupObject, CCleanupChangeCore::eMoveDescriptor, eNoNcbiUserObjects, CCleanupChangeCore::eRemoveDescriptor, m_Changes, m_CleanupOptions, m_pTopLevelMolInfo, m_TopLevelBiosources, CCleanup::NormalizeDescriptorOrder(), CRef< C, Locker >::Reset(), CCleanupChangeCore::SetChanged(), and x_IsExtendedCleanup().
Referenced by FlattenGenbankSet().
|
private |
Definition at line 473 of file huge_file_cleanup.cpp.
References CBioseq_set_Base::eClass_nuc_prot, NStr::IsBlank(), CSeq_inst::IsNa(), m_FluLabelToSetInfo, m_IdToFluLabel, m_SetPosToFluLabel, s_CheckForSegments(), s_GetInfluenzaLabel(), x_PruneIfFeatsIncomplete(), and x_PruneIfSegsMissing().
Referenced by FlattenGenbankSet().
|
private |
Definition at line 564 of file huge_file_cleanup.cpp.
References map_checker< Container >::end(), map_checker< Container >::lower_bound(), and m_IdToFluLabel.
Referenced by x_PruneAndReorderTopIds().
|
private |
Definition at line 145 of file huge_file_cleanup.cpp.
References eExtendedCleanup, and m_CleanupOptions.
Referenced by LoadSeqEntry(), x_AddTopLevelDescriptors(), x_CleanupTopLevelDescriptors(), x_SetBioseqHooks(), x_SetBioseqSetHooks(), and x_SetSeqFeatHooks().
|
private |
Definition at line 112 of file huge_file_cleanup.cpp.
References _ASSERT, CBioseq_set_Base::eClass_parts, CBioseq_set_Base::eClass_segset, CSeq_inst::IsAa(), CSeq_inst::IsNa(), and next().
Referenced by FlattenGenbankSet().
|
private |
Definition at line 88 of file huge_file_cleanup.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), m_IdToFluLabel, and x_GetFluLabel().
Referenced by FlattenGenbankSet().
|
private |
Definition at line 536 of file huge_file_cleanup.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), set< Key, Compare >::insert(), m_FluLabelToSetInfo, m_HasIncompleteFeats, m_IdToFluLabel, m_SetPosToFluLabel, s_IdInSet(), and s_RemoveEntriesWithVal().
Referenced by x_CreateSmallGenomeSets().
|
private |
Definition at line 522 of file huge_file_cleanup.cpp.
References map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), CInfluenzaSet::GetInfluenzaType(), CInfluenzaSet::GetNumRequired(), m_FluLabelToSetInfo, m_IdToFluLabel, m_SetPosToFluLabel, s_RemoveEntriesWithVal(), and set< Key, Compare >::size().
Referenced by x_CreateSmallGenomeSets().
Definition at line 594 of file huge_file_cleanup.cpp.
References map_checker< Container >::end(), set< Key, Compare >::end(), CCleanupHugeAsnReader::TFeatIdInfo::ExistingIds, map_checker< Container >::find(), set< Key, Compare >::find(), CObject_id_Base::GetId(), CFeat_id_Base::GetLocal(), CCleanupHugeAsnReader::TFeatIdInfo::IdOffset, set< Key, Compare >::insert(), CObject_id_Base::IsId(), CFeat_id_Base::IsLocal(), m_FeatIdInfo, CCleanupHugeAsnReader::TFeatIdInfo::NewExistingIds, CCleanupHugeAsnReader::TFeatIdInfo::NewIds, CCleanupHugeAsnReader::TFeatIdInfo::RemappedIds, and s_FindNextOffset().
Referenced by x_SetSeqFeatHooks().
|
overrideprivate |
Definition at line 620 of file huge_file_cleanup.cpp.
References set< Key, Compare >::begin(), map_checker< Container >::clear(), set< Key, Compare >::clear(), context, CBioseq_set_Base::eClass_genbank, map_checker< Container >::empty(), set< Key, Compare >::end(), CCleanupHugeAsnReader::TFeatIdInfo::ExistingIds, in(), set< Key, Compare >::insert(), m_FeatIdInfo, CCleanupHugeAsnReader::TFeatIdInfo::NewExistingIds, CCleanupHugeAsnReader::TFeatIdInfo::NewIds, CCleanupHugeAsnReader::TFeatIdInfo::PosToIdMap, CCleanupHugeAsnReader::TFeatIdInfo::RemappedIds, SetLocalSkipHook(), and x_IsExtendedCleanup().
|
overrideprivate |
Definition at line 656 of file huge_file_cleanup.cpp.
References set< Key, Compare >::begin(), map_checker< Container >::clear(), set< Key, Compare >::clear(), context, CBioseq_set_Base::eClass_genbank, map_checker< Container >::empty(), set< Key, Compare >::end(), CCleanupHugeAsnReader::TFeatIdInfo::ExistingIds, CObjectInfoMI::GetMember(), CObjectInfo::GetObjectPtr(), in(), set< Key, Compare >::insert(), last(), m_FeatIdInfo, CCleanupHugeAsnReader::TFeatIdInfo::NewExistingIds, CCleanupHugeAsnReader::TFeatIdInfo::NewIds, CCleanupHugeAsnReader::TFeatIdInfo::PosToIdMap, prev(), CCleanupHugeAsnReader::TFeatIdInfo::RemappedIds, CTypeConverter< T >::SafeCast(), SetLocalSkipHook(), and x_IsExtendedCleanup().
|
overrideprivate |
Definition at line 790 of file huge_file_cleanup.cpp.
References context, and x_SetSeqFeatHooks().
|
private |
Definition at line 716 of file huge_file_cleanup.cpp.
References eEnableSmallGenomeSets, eExtreme_Biological, in(), set< Key, Compare >::insert(), m_CleanupOptions, m_HasIncompleteFeats, Ref(), CTypeConverter< T >::SafeCast(), SetLocalReadHook(), SetLocalSkipHook(), x_IsExtendedCleanup(), and x_RecordFeatureId().
Referenced by x_SetHooks().
|
mutableprivate |
Definition at line 90 of file huge_file_cleanup.hpp.
Referenced by FlattenGenbankSet(), GetChanges(), x_AddTopLevelDescriptors(), and x_CleanupTopLevelDescriptors().
Definition at line 89 of file huge_file_cleanup.hpp.
Referenced by FlattenGenbankSet(), LoadSeqEntry(), x_CleanupTopLevelDescriptors(), x_IsExtendedCleanup(), and x_SetSeqFeatHooks().
|
private |
Definition at line 111 of file huge_file_cleanup.hpp.
Referenced by LoadSeqEntry(), x_RecordFeatureId(), x_SetBioseqHooks(), and x_SetBioseqSetHooks().
Definition at line 94 of file huge_file_cleanup.hpp.
Referenced by LoadSeqEntry(), x_CreateSmallGenomeSets(), x_PruneIfFeatsIncomplete(), and x_PruneIfSegsMissing().
Definition at line 96 of file huge_file_cleanup.hpp.
Referenced by x_PruneIfFeatsIncomplete(), and x_SetSeqFeatHooks().
|
private |
Definition at line 92 of file huge_file_cleanup.hpp.
Referenced by x_CreateSmallGenomeSets(), x_GetFluLabel(), x_PruneAndReorderTopIds(), x_PruneIfFeatsIncomplete(), and x_PruneIfSegsMissing().
Definition at line 88 of file huge_file_cleanup.hpp.
Referenced by x_AddTopLevelDescriptors(), and x_CleanupTopLevelDescriptors().
Definition at line 95 of file huge_file_cleanup.hpp.
Referenced by LoadSeqEntry(), x_CreateSmallGenomeSets(), x_PruneIfFeatsIncomplete(), and x_PruneIfSegsMissing().
Definition at line 87 of file huge_file_cleanup.hpp.
Referenced by x_AddTopLevelDescriptors(), and x_CleanupTopLevelDescriptors().