NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
seqannot_splicer_util.cpp File Reference
#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"
+ Include dependency graph for seqannot_splicer_util.cpp:

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< TSeqRefTSeqRefCont
 
typedef list< CNcbiStreamposTPosCont
 
typedef CObjectFor< TSeqRefContTSeqRefContOb
 
typedef CObjectFor< TPosContTPosContOb
 
typedef CRef< TSeqRefContObTSeqRefContRef
 
typedef CRef< TPosContObTPosContRef
 
typedef set< TSeqRef, PPtrLess< TSeqRef > > TContextSeqIds
 
typedef struct SContext_tagTContextPtr
 
typedef list< TContextPtrTContextList
 
typedef stack< TContextPtrTContextPtrStack
 
typedef map< CNcbiStreampos, TSeqRefContRefTAnnotToSeqIdMap
 
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
 

Functions

 USING_SCOPE (ncbi)
 
 USING_SCOPE (objects)
 
static void s_DeleteContext (TContextPtr context)
 
static TSeqAnnotChoiceMaskFlags s_GetSeqAnnotChoiceMask (const CSeq_annot *annot)
 
static TSeqIdChoiceMaskFlags s_GetSeqIdChoiceMask (const CSeq_id *seqid)
 
static bool s_RemoveAnnot (TAnnotToSeqIdMapIter annot_in_map_iter)
 
static bool s_SpliceAnnot (unique_ptr< CObjectIStream > &sai, COStreamContainer &osc, TAnnotToSeqIdMapIter annot_in_map)
 
static void s_SpliceAnnotsForSeqId (unique_ptr< CObjectIStream > &sai, COStreamContainer &osc, TSeqIdToAnnotMapIter seqid_iter)
 
void AddSeqIdToCurrentContext (TSeqRef id)
 
void ContextEnd (void)
 
void ContextStart (CObjectIStream &in, EContextType type)
 
void ContextEnter (void)
 
void ContextLeave (void)
 
void ContextInit (void)
 
void CurrentContextContainsSeqAnnots (void)
 
ESerialDataFormat GetFormat (const string &name)
 
bool IsSeqAnnotChoiceSelected (TSeqAnnotChoiceMaskFlags flags)
 
bool IsSeqAnnotChoiceSelected (const CSeq_annot *annot)
 
bool IsSeqIdChoiceSelected (TSeqIdChoiceMaskFlags flags)
 
bool IsSeqIdChoiceSelected (const CSeq_id *seqid)
 
void ProcessSeqEntryAnnot (unique_ptr< CObjectIStream > &sai, COStreamContainer &osc)
 
void ResetSeqEntryProcessing (void)
 
void SeqAnnotMapSeqId (TSeqRef seqid_in_annot)
 
void SeqAnnotSet_Pre (CObjectIStream &in)
 
void SetSeqAnnotChoiceMask (const string &mask)
 
void SetSeqAnnotChoiceMask (const TSeqAnnotChoiceMaskFlags mask)
 
void SetSeqIdChoiceMask (const string &mask)
 
void SetSeqIdChoiceMask (const TSeqIdChoiceMaskFlags mask)
 

Variables

static TAnnotToSeqIdMap s_AnnotToSeqIdMap
 
static TSeqIdToAnnotMap s_SeqIdToAnnotMap
 
static TContextPtr s_CurrentContextPtr = NULL
 
static TContextPtr s_RootContextPtr = NULL
 
static TContextList s_ContextSequence
 
static TContextListIter s_ContextSequenceIter
 
static TContextPtrStack s_ContextPtrStack
 
static TSeqAnnotChoiceMaskFlags s_SeqAnnotChoiceMask = fSAMF_Default
 
static TSeqIdChoiceMaskFlags s_SeqIdChoiceMask = fSIMF_Default
 
static CNcbiStreampos s_AnnotPos
 

Macro Definition Documentation

◆ ADDFLAG [1/2]

#define ADDFLAG (   flag)     if ((found_flag = find(fbegin,fend,#flag)) != fend) flags |= fSAMF_##flag;

◆ ADDFLAG [2/2]

#define ADDFLAG (   flag)     if ((found_flag = find(fbegin,fend,#flag)) != fend) flags |= fSIMF_##flag;

Typedef Documentation

◆ SContext

typedef struct SContext_tag SContext

◆ TAnnotToSeqIdMap

Definition at line 73 of file seqannot_splicer_util.cpp.

◆ TAnnotToSeqIdMapCIter

Definition at line 76 of file seqannot_splicer_util.cpp.

◆ TAnnotToSeqIdMapIter

Definition at line 77 of file seqannot_splicer_util.cpp.

◆ TContextList

typedef list<TContextPtr> TContextList

Definition at line 70 of file seqannot_splicer_util.cpp.

◆ TContextListIter

typedef TContextList::iterator TContextListIter

Definition at line 78 of file seqannot_splicer_util.cpp.

◆ TContextPtr

typedef struct SContext_tag* TContextPtr

Definition at line 69 of file seqannot_splicer_util.cpp.

◆ TContextPtrStack

typedef stack<TContextPtr> TContextPtrStack

Definition at line 71 of file seqannot_splicer_util.cpp.

◆ TContextSeqIds

Definition at line 68 of file seqannot_splicer_util.cpp.

◆ TPosCont

typedef list<CNcbiStreampos> TPosCont

Definition at line 60 of file seqannot_splicer_util.cpp.

◆ TPosContIter

typedef TPosCont::iterator TPosContIter

Definition at line 79 of file seqannot_splicer_util.cpp.

◆ TPosContOb

Definition at line 63 of file seqannot_splicer_util.cpp.

◆ TPosContRef

Definition at line 66 of file seqannot_splicer_util.cpp.

◆ TSeqIdToAnnotMap

Definition at line 74 of file seqannot_splicer_util.cpp.

◆ TSeqIdToAnnotMapCIter

Definition at line 80 of file seqannot_splicer_util.cpp.

◆ TSeqIdToAnnotMapIter

Definition at line 81 of file seqannot_splicer_util.cpp.

◆ TSeqRefCont

typedef list<TSeqRef> TSeqRefCont

Definition at line 59 of file seqannot_splicer_util.cpp.

◆ TSeqRefContIter

typedef TSeqRefCont::iterator TSeqRefContIter

Definition at line 82 of file seqannot_splicer_util.cpp.

◆ TSeqRefContOb

Definition at line 62 of file seqannot_splicer_util.cpp.

◆ TSeqRefContRef

Definition at line 65 of file seqannot_splicer_util.cpp.

Function Documentation

◆ AddSeqIdToCurrentContext()

void AddSeqIdToCurrentContext ( TSeqRef  id)

◆ ContextEnd()

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().

◆ ContextEnter()

void ContextEnter ( void  )

◆ ContextInit()

void ContextInit ( void  )

◆ ContextLeave()

void ContextLeave ( void  )

Definition at line 208 of file seqannot_splicer_util.cpp.

Referenced by CHookSeq_entry__Copy::CopyObject().

◆ ContextStart()

void ContextStart ( CObjectIStream in,
EContextType  type 
)

◆ CurrentContextContainsSeqAnnots()

void CurrentContextContainsSeqAnnots ( void  )

◆ GetFormat()

ESerialDataFormat GetFormat ( const string name)

◆ IsSeqAnnotChoiceSelected() [1/2]

bool IsSeqAnnotChoiceSelected ( const CSeq_annot annot)

Definition at line 255 of file seqannot_splicer_util.cpp.

References s_GetSeqAnnotChoiceMask(), and s_SeqAnnotChoiceMask.

◆ IsSeqAnnotChoiceSelected() [2/2]

bool IsSeqAnnotChoiceSelected ( TSeqAnnotChoiceMaskFlags  flags)

Definition at line 251 of file seqannot_splicer_util.cpp.

References flags, and s_SeqAnnotChoiceMask.

Referenced by CSeqAnnotSplicerApp::Run().

◆ IsSeqIdChoiceSelected() [1/2]

bool IsSeqIdChoiceSelected ( const CSeq_id seqid)

Definition at line 267 of file seqannot_splicer_util.cpp.

References s_GetSeqIdChoiceMask(), and s_SeqIdChoiceMask.

◆ IsSeqIdChoiceSelected() [2/2]

bool IsSeqIdChoiceSelected ( TSeqIdChoiceMaskFlags  flags)

Definition at line 263 of file seqannot_splicer_util.cpp.

References flags, and s_SeqIdChoiceMask.

Referenced by AddSeqIdToCurrentContext(), and SeqAnnotMapSeqId().

◆ ProcessSeqEntryAnnot()

void ProcessSeqEntryAnnot ( unique_ptr< CObjectIStream > &  sai,
COStreamContainer osc 
)

◆ ResetSeqEntryProcessing()

void ResetSeqEntryProcessing ( void  )

◆ s_DeleteContext()

static void s_DeleteContext ( TContextPtr  context)
static

Definition at line 506 of file seqannot_splicer_util.cpp.

References context.

Referenced by ResetSeqEntryProcessing().

◆ s_GetSeqAnnotChoiceMask()

static TSeqAnnotChoiceMaskFlags s_GetSeqAnnotChoiceMask ( const CSeq_annot annot)
static

◆ s_GetSeqIdChoiceMask()

static TSeqIdChoiceMaskFlags s_GetSeqIdChoiceMask ( const CSeq_id seqid)
static

◆ s_RemoveAnnot()

static bool s_RemoveAnnot ( TAnnotToSeqIdMapIter  annot_in_map_iter)
static

◆ s_SpliceAnnot()

static bool s_SpliceAnnot ( unique_ptr< CObjectIStream > &  sai,
COStreamContainer osc,
TAnnotToSeqIdMapIter  annot_in_map 
)
static

◆ s_SpliceAnnotsForSeqId()

static void s_SpliceAnnotsForSeqId ( unique_ptr< CObjectIStream > &  sai,
COStreamContainer osc,
TSeqIdToAnnotMapIter  seqid_iter 
)
static

◆ SeqAnnotMapSeqId()

void SeqAnnotMapSeqId ( TSeqRef  seqid_in_annot)

◆ SeqAnnotSet_Pre()

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().

◆ SetSeqAnnotChoiceMask() [1/2]

void SetSeqAnnotChoiceMask ( const string mask)

◆ SetSeqAnnotChoiceMask() [2/2]

void SetSeqAnnotChoiceMask ( const TSeqAnnotChoiceMaskFlags  mask)

Definition at line 441 of file seqannot_splicer_util.cpp.

References mask, and s_SeqAnnotChoiceMask.

◆ SetSeqIdChoiceMask() [1/2]

void SetSeqIdChoiceMask ( const string mask)

◆ SetSeqIdChoiceMask() [2/2]

void SetSeqIdChoiceMask ( const TSeqIdChoiceMaskFlags  mask)

Definition at line 496 of file seqannot_splicer_util.cpp.

References mask, and s_SeqIdChoiceMask.

◆ USING_SCOPE() [1/2]

USING_SCOPE ( ncbi  )

◆ USING_SCOPE() [2/2]

USING_SCOPE ( objects  )

Variable Documentation

◆ s_AnnotPos

CNcbiStreampos s_AnnotPos
static

Definition at line 132 of file seqannot_splicer_util.cpp.

Referenced by SeqAnnotMapSeqId(), and SeqAnnotSet_Pre().

◆ s_AnnotToSeqIdMap

TAnnotToSeqIdMap s_AnnotToSeqIdMap
static

◆ s_ContextPtrStack

TContextPtrStack s_ContextPtrStack
static

Definition at line 127 of file seqannot_splicer_util.cpp.

Referenced by ContextEnd(), ContextStart(), and ResetSeqEntryProcessing().

◆ s_ContextSequence

TContextList s_ContextSequence
static

◆ s_ContextSequenceIter

TContextListIter s_ContextSequenceIter
static

Definition at line 126 of file seqannot_splicer_util.cpp.

Referenced by ContextEnter(), and ContextInit().

◆ s_CurrentContextPtr

TContextPtr s_CurrentContextPtr = NULL
static

◆ s_RootContextPtr

TContextPtr s_RootContextPtr = NULL
static

Definition at line 124 of file seqannot_splicer_util.cpp.

Referenced by ContextStart(), and ResetSeqEntryProcessing().

◆ s_SeqAnnotChoiceMask

TSeqAnnotChoiceMaskFlags s_SeqAnnotChoiceMask = fSAMF_Default
static

Definition at line 129 of file seqannot_splicer_util.cpp.

Referenced by IsSeqAnnotChoiceSelected(), and SetSeqAnnotChoiceMask().

◆ s_SeqIdChoiceMask

TSeqIdChoiceMaskFlags s_SeqIdChoiceMask = fSIMF_Default
static

Definition at line 130 of file seqannot_splicer_util.cpp.

Referenced by IsSeqIdChoiceSelected(), and SetSeqIdChoiceMask().

◆ s_SeqIdToAnnotMap

TSeqIdToAnnotMap s_SeqIdToAnnotMap
static
Modified on Wed Apr 17 13:10:34 2024 by modify_doxy.py rev. 669887