NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <stack>
#include <corelib/ncbiexpt.hpp>
#include <corelib/ncbimisc.hpp>
#include <corelib/ncbiobj.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <serial/objectio.hpp>
#include <serial/objistr.hpp>
#include <serial/serialdef.hpp>
#include "seqannot_splicer_stats.hpp"
#include "seqannot_splicer_util.hpp"
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | SContext_tag |
Macros | |
#define | ADDFLAG(flag) if ((found_flag = find(fbegin,fend,#flag)) != fend) flags |= fSAMF_##flag; |
#define | ADDFLAG(flag) if ((found_flag = find(fbegin,fend,#flag)) != fend) flags |= fSIMF_##flag; |
Typedefs | |
typedef list< TSeqRef > | TSeqRefCont |
typedef list< CNcbiStreampos > | TPosCont |
typedef CObjectFor< TSeqRefCont > | TSeqRefContOb |
typedef CObjectFor< TPosCont > | TPosContOb |
typedef CRef< TSeqRefContOb > | TSeqRefContRef |
typedef CRef< TPosContOb > | TPosContRef |
typedef set< TSeqRef, PPtrLess< TSeqRef > > | TContextSeqIds |
typedef struct SContext_tag * | TContextPtr |
typedef list< TContextPtr > | TContextList |
typedef stack< TContextPtr > | TContextPtrStack |
typedef map< CNcbiStreampos, TSeqRefContRef > | TAnnotToSeqIdMap |
typedef map< TSeqRef, TPosContRef, PPtrLess< TSeqRef > > | TSeqIdToAnnotMap |
typedef TAnnotToSeqIdMap::const_iterator | TAnnotToSeqIdMapCIter |
typedef TAnnotToSeqIdMap::iterator | TAnnotToSeqIdMapIter |
typedef TContextList::iterator | TContextListIter |
typedef TPosCont::iterator | TPosContIter |
typedef TSeqIdToAnnotMap::const_iterator | TSeqIdToAnnotMapCIter |
typedef TSeqIdToAnnotMap::iterator | TSeqIdToAnnotMapIter |
typedef TSeqRefCont::iterator | TSeqRefContIter |
typedef struct SContext_tag | SContext |
typedef struct SContext_tag SContext |
typedef map<CNcbiStreampos,TSeqRefContRef> TAnnotToSeqIdMap |
Definition at line 73 of file seqannot_splicer_util.cpp.
Definition at line 76 of file seqannot_splicer_util.cpp.
Definition at line 77 of file seqannot_splicer_util.cpp.
typedef list<TContextPtr> TContextList |
Definition at line 70 of file seqannot_splicer_util.cpp.
typedef TContextList::iterator TContextListIter |
Definition at line 78 of file seqannot_splicer_util.cpp.
typedef struct SContext_tag* TContextPtr |
Definition at line 69 of file seqannot_splicer_util.cpp.
typedef stack<TContextPtr> TContextPtrStack |
Definition at line 71 of file seqannot_splicer_util.cpp.
typedef set<TSeqRef,PPtrLess<TSeqRef> > TContextSeqIds |
Definition at line 68 of file seqannot_splicer_util.cpp.
typedef list<CNcbiStreampos> TPosCont |
Definition at line 60 of file seqannot_splicer_util.cpp.
typedef TPosCont::iterator TPosContIter |
Definition at line 79 of file seqannot_splicer_util.cpp.
typedef CObjectFor<TPosCont> TPosContOb |
Definition at line 63 of file seqannot_splicer_util.cpp.
typedef CRef<TPosContOb> TPosContRef |
Definition at line 66 of file seqannot_splicer_util.cpp.
typedef map<TSeqRef,TPosContRef,PPtrLess<TSeqRef> > TSeqIdToAnnotMap |
Definition at line 74 of file seqannot_splicer_util.cpp.
Definition at line 80 of file seqannot_splicer_util.cpp.
Definition at line 81 of file seqannot_splicer_util.cpp.
typedef list<TSeqRef> TSeqRefCont |
Definition at line 59 of file seqannot_splicer_util.cpp.
typedef TSeqRefCont::iterator TSeqRefContIter |
Definition at line 82 of file seqannot_splicer_util.cpp.
typedef CObjectFor<TSeqRefCont> TSeqRefContOb |
Definition at line 62 of file seqannot_splicer_util.cpp.
typedef CRef<TSeqRefContOb> TSeqRefContRef |
Definition at line 65 of file seqannot_splicer_util.cpp.
void AddSeqIdToCurrentContext | ( | TSeqRef | id | ) |
Definition at line 140 of file seqannot_splicer_util.cpp.
References set< Key, Compare >::insert(), IsSeqIdChoiceSelected(), s_CurrentContextPtr, and SContext_tag::seqids.
Referenced by CHookSeq_entry__Skip__Seq_id::SkipObject().
void ContextEnd | ( | void | ) |
Definition at line 151 of file seqannot_splicer_util.cpp.
References NULL, s_ContextPtrStack, and s_CurrentContextPtr.
Referenced by CHookSeq_entry__Skip::SkipObject().
void ContextEnter | ( | void | ) |
Definition at line 194 of file seqannot_splicer_util.cpp.
References s_ContextSequence, s_ContextSequenceIter, and s_CurrentContextPtr.
Referenced by CHookSeq_entry__Copy::CopyObject().
void ContextInit | ( | void | ) |
Definition at line 215 of file seqannot_splicer_util.cpp.
References NULL, s_ContextSequence, s_ContextSequenceIter, and s_CurrentContextPtr.
Referenced by s_PreprocessSeqEntry().
void ContextLeave | ( | void | ) |
Definition at line 208 of file seqannot_splicer_util.cpp.
Referenced by CHookSeq_entry__Copy::CopyObject().
void ContextStart | ( | CObjectIStream & | in, |
EContextType | type | ||
) |
Definition at line 163 of file seqannot_splicer_util.cpp.
References context, NULL, s_ContextPtrStack, s_ContextSequence, s_CurrentContextPtr, s_RootContextPtr, SContext_tag::sub_contexts, and type.
Referenced by CHookSeq_entry__Skip::SkipObject().
void CurrentContextContainsSeqAnnots | ( | void | ) |
Definition at line 224 of file seqannot_splicer_util.cpp.
References SContext_tag::has_annots, and s_CurrentContextPtr.
Referenced by CHookSeq_entry__Skip__Seq_annot::SkipObject().
ESerialDataFormat GetFormat | ( | const string & | name | ) |
Definition at line 231 of file seqannot_splicer_util.cpp.
References eSerial_AsnBinary, eSerial_AsnText, eSerial_Json, eSerial_Xml, eUnknown, and NCBI_THROW.
Referenced by CSeqAnnotSplicerApp::Run(), CRPCClient< TRequest, TReply >::x_ConnectURL(), and CRPCClient< TRequest, TReply >::x_FillConnNetInfo().
bool IsSeqAnnotChoiceSelected | ( | const CSeq_annot * | annot | ) |
Definition at line 255 of file seqannot_splicer_util.cpp.
References s_GetSeqAnnotChoiceMask(), and s_SeqAnnotChoiceMask.
bool IsSeqAnnotChoiceSelected | ( | TSeqAnnotChoiceMaskFlags | flags | ) |
Definition at line 251 of file seqannot_splicer_util.cpp.
References flags, and s_SeqAnnotChoiceMask.
Referenced by CSeqAnnotSplicerApp::Run().
Definition at line 267 of file seqannot_splicer_util.cpp.
References s_GetSeqIdChoiceMask(), and s_SeqIdChoiceMask.
bool IsSeqIdChoiceSelected | ( | TSeqIdChoiceMaskFlags | flags | ) |
Definition at line 263 of file seqannot_splicer_util.cpp.
References flags, and s_SeqIdChoiceMask.
Referenced by AddSeqIdToCurrentContext(), and SeqAnnotMapSeqId().
void ProcessSeqEntryAnnot | ( | unique_ptr< CObjectIStream > & | sai, |
COStreamContainer & | osc | ||
) |
Definition at line 276 of file seqannot_splicer_util.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), g_Stats, s_CurrentContextPtr, s_SeqIdToAnnotMap, s_SpliceAnnotsForSeqId(), CSeqAnnotSplicerStats::SeqEntry_Changed(), and SContext_tag::seqids.
Referenced by CHookSeq_entry__Copy__Seq_annot::CopyClassMember().
void ResetSeqEntryProcessing | ( | void | ) |
Definition at line 307 of file seqannot_splicer_util.cpp.
References _ASSERT, NULL, s_ContextPtrStack, s_ContextSequence, s_CurrentContextPtr, s_DeleteContext(), and s_RootContextPtr.
Referenced by CSeqAnnotSplicerApp::Run().
|
static |
Definition at line 506 of file seqannot_splicer_util.cpp.
References context.
Referenced by ResetSeqEntryProcessing().
|
static |
Definition at line 550 of file seqannot_splicer_util.cpp.
References CSeq_annot_Base::CanGetData(), CSeq_annot_Base::C_Data::e_Align, CSeq_annot_Base::C_Data::e_Ftable, CSeq_annot_Base::C_Data::e_Graph, CSeq_annot_Base::C_Data::e_Ids, CSeq_annot_Base::C_Data::e_Locs, CSeq_annot_Base::C_Data::e_not_set, CSeq_annot_Base::C_Data::e_Seq_table, eUnknown, fSAMF_Align, fSAMF_Ftable, fSAMF_Graph, fSAMF_Ids, fSAMF_Locs, fSAMF_NotSet, fSAMF_Seq_table, CSeq_annot_Base::GetData(), CSeq_annot_Base::IsSetData(), NCBI_THROW, and CSeq_annot_Base::C_Data::Which().
Referenced by IsSeqAnnotChoiceSelected().
|
static |
Definition at line 571 of file seqannot_splicer_util.cpp.
References CSeq_id_Base::e_Ddbj, CSeq_id_Base::e_Embl, CSeq_id_Base::e_Genbank, CSeq_id_Base::e_General, CSeq_id_Base::e_Gi, CSeq_id_Base::e_Gibbmt, CSeq_id_Base::e_Gibbsq, CSeq_id_Base::e_Giim, CSeq_id_Base::e_Gpipe, CSeq_id_Base::e_Local, CSeq_id_Base::e_Named_annot_track, CSeq_id_Base::e_not_set, CSeq_id_Base::e_Other, CSeq_id_Base::e_Patent, CSeq_id_Base::e_Pdb, CSeq_id_Base::e_Pir, CSeq_id_Base::e_Prf, CSeq_id_Base::e_Swissprot, CSeq_id_Base::e_Tpd, CSeq_id_Base::e_Tpe, CSeq_id_Base::e_Tpg, eUnknown, fSIMF_Ddbj, fSIMF_Embl, fSIMF_Genbank, fSIMF_General, fSIMF_Gi, fSIMF_Gibbmt, fSIMF_Gibbsq, fSIMF_Giim, fSIMF_Gpipe, fSIMF_Local, fSIMF_Named_annot_track, fSIMF_NotSet, fSIMF_Other, fSIMF_Patent, fSIMF_Pdb, fSIMF_Pir, fSIMF_Prf, fSIMF_Swissprot, fSIMF_Tpd, fSIMF_Tpe, fSIMF_Tpg, NCBI_THROW, and CSeq_id_Base::Which().
Referenced by IsSeqIdChoiceSelected().
|
static |
Definition at line 603 of file seqannot_splicer_util.cpp.
References _ASSERT, map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), s_AnnotToSeqIdMap, and s_SeqIdToAnnotMap.
Referenced by s_SpliceAnnot().
|
static |
Definition at line 649 of file seqannot_splicer_util.cpp.
References CObjectIStream::eNoFileHeader, g_Stats, s_RemoveAnnot(), and CSeqAnnotSplicerStats::SeqAnnot_Spliced().
Referenced by s_SpliceAnnotsForSeqId().
|
static |
Definition at line 674 of file seqannot_splicer_util.cpp.
References _ASSERT, map_checker< Container >::end(), map_checker< Container >::find(), s_AnnotToSeqIdMap, and s_SpliceAnnot().
Referenced by ProcessSeqEntryAnnot().
void SeqAnnotMapSeqId | ( | TSeqRef | seqid_in_annot | ) |
Definition at line 322 of file seqannot_splicer_util.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), map_checker< Container >::insert(), IsSeqIdChoiceSelected(), s_AnnotPos, s_AnnotToSeqIdMap, and s_SeqIdToAnnotMap.
Referenced by CHookSeq_annot__Seq_id::SkipObject().
void SeqAnnotSet_Pre | ( | CObjectIStream & | in | ) |
Definition at line 398 of file seqannot_splicer_util.cpp.
References in(), and s_AnnotPos.
Referenced by CHookSeq_annot__Seq_annot::SkipObject().
Definition at line 410 of file seqannot_splicer_util.cpp.
References ADDFLAG, flags, fSAMF_All, fSAMF_Default, fSAMF_NotSet, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, mask, and NStr::Split().
Referenced by CSeqAnnotSplicerApp::Run().
void SetSeqAnnotChoiceMask | ( | const TSeqAnnotChoiceMaskFlags | mask | ) |
Definition at line 441 of file seqannot_splicer_util.cpp.
References mask, and s_SeqAnnotChoiceMask.
Definition at line 448 of file seqannot_splicer_util.cpp.
References ADDFLAG, flags, fSIMF_All, fSIMF_AllButLocal, fSIMF_Default, fSIMF_NotSet, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, mask, and NStr::Split().
Referenced by CSeqAnnotSplicerApp::Run().
void SetSeqIdChoiceMask | ( | const TSeqIdChoiceMaskFlags | mask | ) |
Definition at line 496 of file seqannot_splicer_util.cpp.
References mask, and s_SeqIdChoiceMask.
USING_SCOPE | ( | ncbi | ) |
USING_SCOPE | ( | objects | ) |
|
static |
Definition at line 132 of file seqannot_splicer_util.cpp.
Referenced by SeqAnnotMapSeqId(), and SeqAnnotSet_Pre().
|
static |
Definition at line 120 of file seqannot_splicer_util.cpp.
Referenced by s_RemoveAnnot(), s_SpliceAnnotsForSeqId(), and SeqAnnotMapSeqId().
|
static |
Definition at line 127 of file seqannot_splicer_util.cpp.
Referenced by ContextEnd(), ContextStart(), and ResetSeqEntryProcessing().
|
static |
Definition at line 125 of file seqannot_splicer_util.cpp.
Referenced by ContextEnter(), ContextInit(), ContextStart(), and ResetSeqEntryProcessing().
|
static |
Definition at line 126 of file seqannot_splicer_util.cpp.
Referenced by ContextEnter(), and ContextInit().
|
static |
Definition at line 123 of file seqannot_splicer_util.cpp.
Referenced by AddSeqIdToCurrentContext(), ContextEnd(), ContextEnter(), ContextInit(), ContextStart(), CurrentContextContainsSeqAnnots(), ProcessSeqEntryAnnot(), and ResetSeqEntryProcessing().
|
static |
Definition at line 124 of file seqannot_splicer_util.cpp.
Referenced by ContextStart(), and ResetSeqEntryProcessing().
|
static |
Definition at line 129 of file seqannot_splicer_util.cpp.
Referenced by IsSeqAnnotChoiceSelected(), and SetSeqAnnotChoiceMask().
|
static |
Definition at line 130 of file seqannot_splicer_util.cpp.
Referenced by IsSeqIdChoiceSelected(), and SetSeqIdChoiceMask().
|
static |
Definition at line 121 of file seqannot_splicer_util.cpp.
Referenced by ProcessSeqEntryAnnot(), s_RemoveAnnot(), and SeqAnnotMapSeqId().