NCBI C++ ToolKit
|
Search Toolkit Book for CFeatGapInfo
#include <objtools/edit/gap_trim.hpp>
Public Types | |
typedef vector< CRef< CSeq_loc > > | TLocList |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CFeatGapInfo () | |
CFeatGapInfo (CSeq_feat_Handle sf) | |
~CFeatGapInfo () | |
void | CollectGaps (const CSeq_loc &feat_loc, CScope &scope) |
void | CalculateRelevantIntervals (bool unknown_length, bool known_length, bool ns=false) |
bool | HasKnown () const |
bool | HasUnknown () const |
bool | HasNs () const |
bool | Trimmable () const |
bool | Splittable () const |
bool | ShouldRemove () const |
void | Trim (CSeq_loc &loc, bool make_partial, CScope &scope) |
TLocList | Split (const CSeq_loc &orig, bool in_intron, bool make_partial) |
vector< CRef< CSeq_feat > > | AdjustForRelevantGapIntervals (bool make_partial, bool trim, bool split, bool in_intron, bool create_general_only=false) |
CSeq_feat_Handle | GetFeature () const |
bool | IsRelatedByCrossRef (const CFeatGapInfo &other) const |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
![]() | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Static Public Member Functions | |
static CRef< CBioseq > | AdjustProteinSeq (const CBioseq &seq, const CSeq_feat &feat, const CSeq_feat &orig_cds, CScope &scope) |
![]() | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
![]() | |
static void | EnableDebugDump (bool on) |
Protected Types | |
enum | EGapIntervalType { eGapIntervalType_unknown = 0 , eGapIntervalType_known , eGapIntervalType_n } |
typedef pair< EGapIntervalType, pair< size_t, size_t > > | TGapInterval |
typedef vector< TGapInterval > | TGapIntervalList |
typedef vector< pair< size_t, size_t > > | TIntervalList |
Protected Member Functions | |
void | x_AdjustOrigLabel (CSeq_feat &feat, size_t &id_offset, string &id_label, const string &qual) |
void | x_AdjustCodebreaks (CSeq_feat &feat) |
void | x_AdjustAnticodons (CSeq_feat &feat) |
bool | x_UsableInterval (const TGapInterval &interval, bool unknown_length, bool known_length, bool ns) |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Static Protected Member Functions | |
static void | x_AdjustFrame (CCdregion &cdregion, TSeqPos frame_adjust) |
Additional Inherited Members | |
![]() | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Definition at line 65 of file gap_trim.hpp.
|
protected |
Definition at line 99 of file gap_trim.hpp.
|
protected |
Definition at line 100 of file gap_trim.hpp.
|
protected |
Definition at line 103 of file gap_trim.hpp.
typedef vector< CRef<CSeq_loc> > CFeatGapInfo::TLocList |
Definition at line 82 of file gap_trim.hpp.
|
protected |
Enumerator | |
---|---|
eGapIntervalType_unknown | |
eGapIntervalType_known | |
eGapIntervalType_n |
Definition at line 93 of file gap_trim.hpp.
|
inline |
Definition at line 67 of file gap_trim.hpp.
CFeatGapInfo::CFeatGapInfo | ( | CSeq_feat_Handle | sf | ) |
Definition at line 60 of file gap_trim.cpp.
|
inline |
Definition at line 69 of file gap_trim.hpp.
vector< CRef< CSeq_feat > > CFeatGapInfo::AdjustForRelevantGapIntervals | ( | bool | make_partial, |
bool | trim, | ||
bool | split, | ||
bool | in_intron, | ||
bool | create_general_only = false |
||
) |
Definition at line 493 of file gap_trim.cpp.
References CSerialObject::Assign(), eExtreme_Positional, eOffset_FromStart, FindBestChoice(), CScope::GetBioseqHandle(), CSeq_feat_Base::GetComment(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), CSeq_feat_Handle::GetLocation(), GetNewProtId(), GetNewProtIdFromExistingProt(), CSeq_feat_Handle::GetOriginalSeq_feat(), CSeq_feat_Base::GetProduct(), CSeq_feat_Handle::GetScope(), CSeqFeatData_Base::IsCdregion(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CSeq_feat_Base::IsSetComment(), CSeq_feat_Base::IsSetProduct(), CSeq_loc_Base::IsWhole(), ITERATE, LocationOffset(), m_Feature, NON_CONST_ITERATE, s_FixPartial(), CSeq_id::Score(), CSeq_feat_Base::SetComment(), CSeq_feat_Base::SetData(), CSeq_feat_Base::SetLocation(), CSeq_feat_Base::SetPartial(), CSeq_feat_Base::SetProduct(), ShouldRemove(), Split(), split(), Trim(), Trimmable(), x_AdjustAnticodons(), x_AdjustCodebreaks(), x_AdjustFrame(), and x_AdjustOrigLabel().
|
static |
Definition at line 333 of file gap_trim.cpp.
References AdjustProteinFeaturePartialsToMatchCDS(), AdjustProteinMolInfoToMatchCDS(), CSeq_loc::Assign(), CSerialObject::Assign(), eExtreme_Positional, CSeq_loc_Mapper_Base::eLocationToProduct, CSeq_inst_Base::eMol_aa, NStr::Equal(), CSerialObject::Equals(), CSeq_inst_Base::eRepr_raw, CDbtag_Base::GetDb(), CSeq_id_Base::GetGeneral(), CSeq_loc::GetId(), CBioseq_Base::GetInst(), CSeq_inst_Base::GetLength(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetProduct(), CSeq_loc::GetStart(), CSeq_loc::GetStop(), CSeq_loc_Base::GetWhole(), CBioseq::IsAa(), CBioseq_Base::IsSetAnnot(), CDbtag_Base::IsSetDb(), CBioseq_Base::IsSetDescr(), CSeq_feat_Base::IsSetProduct(), CSeq_loc_Base::IsWhole(), CSeq_loc_Mapper_Base::Map(), NON_CONST_ITERATE, prot, SeqLocAdjustForTrim(), CBioseq_Base::SetAnnot(), CBioseq_Base::SetDescr(), CSeq_loc::SetId(), CBioseq_Base::SetId(), CBioseq_Base::SetInst(), CSeqTranslator::Translate(), and CSeq_id_Base::Which().
Referenced by ProcessForTrimAndSplitUpdates().
void CFeatGapInfo::CalculateRelevantIntervals | ( | bool | unknown_length, |
bool | known_length, | ||
bool | ns = false |
||
) |
Definition at line 150 of file gap_trim.cpp.
References m_Gaps, m_InsideGaps, m_LeftGaps, m_RightGaps, m_Start, m_Stop, offset, and x_UsableInterval().
Definition at line 67 of file gap_trim.cpp.
References CBioseq_Handle::eCoding_Iupac, eExtreme_Positional, eGapIntervalType_known, eGapIntervalType_n, eGapIntervalType_unknown, eNa_strand_plus, CSeqMap::eSeqGap, CSeqMap::fFindData, CSeqMap::fFindGap, CSeq_loc::fMerge_SingleRange, CSeqMap_CI::GetLength(), CSeqMap_CI::GetPosition(), CSeqMap::GetSeqMapForSeq_loc(), CSeq_loc::GetStart(), CSeq_loc::GetStop(), CSeqMap_CI::GetType(), i, CSeq_loc::IsSetStrand(), CSeqMap_CI::IsUnknownLength(), letter(), m_Gaps, m_Known, m_Ns, m_Start, m_Stop, m_Unknown, CSeq_loc::ResetStrand(), CSeqMap::ResolvedRangeIterator(), and Seq_loc_Merge().
|
inline |
Definition at line 86 of file gap_trim.hpp.
Referenced by IsRelatedByCrossRef().
|
inline |
Definition at line 73 of file gap_trim.hpp.
|
inline |
Definition at line 75 of file gap_trim.hpp.
|
inline |
Definition at line 74 of file gap_trim.hpp.
bool CFeatGapInfo::IsRelatedByCrossRef | ( | const CFeatGapInfo & | other | ) | const |
Definition at line 722 of file gap_trim.cpp.
References GetFeature(), CSeq_feat_Handle::GetSeq_feat(), and s_IsRelated().
bool CFeatGapInfo::ShouldRemove | ( | ) | const |
Definition at line 232 of file gap_trim.cpp.
References m_LeftGaps, and m_Stop.
Referenced by AdjustForRelevantGapIntervals(), and Trimmable().
CFeatGapInfo::TLocList CFeatGapInfo::Split | ( | const CSeq_loc & | orig, |
bool | in_intron, | ||
bool | make_partial | ||
) |
Definition at line 273 of file gap_trim.cpp.
References CSeq_id::Assign(), CSeq_loc::Assign(), b, CSeq_loc_Base::e_not_set, eExtreme_Positional, eSplitLocOption_make_partial, eSplitLocOption_split_in_exon, eSplitLocOption_split_in_intron, CSeq_loc::GetId(), CRef< C, Locker >::GetPointer(), m_InsideGaps, orig, CSeq_loc::SetPartialStart(), CSeq_loc::SetPartialStop(), SplitLocationForGap(), and CSeq_loc_Base::Which().
Referenced by AdjustForRelevantGapIntervals().
bool CFeatGapInfo::Splittable | ( | ) | const |
Definition at line 222 of file gap_trim.cpp.
References m_InsideGaps.
Definition at line 242 of file gap_trim.cpp.
References CSeq_id::Assign(), CSeq_loc::Assign(), b, CSeq_loc_Base::e_not_set, eSplitLocOption_make_partial, eSplitLocOption_split_in_exon, eSplitLocOption_split_in_intron, CSeq_loc::GetId(), CRef< C, Locker >::GetPointer(), m_LeftGaps, m_RightGaps, SplitLocationForGap(), and CSeq_loc_Base::Which().
Referenced by AdjustForRelevantGapIntervals().
bool CFeatGapInfo::Trimmable | ( | ) | const |
Definition at line 210 of file gap_trim.cpp.
References m_LeftGaps, m_RightGaps, and ShouldRemove().
Referenced by AdjustForRelevantGapIntervals().
|
protected |
Definition at line 460 of file gap_trim.cpp.
References CTrna_ext_Base::GetAnticodon(), CSeq_feat_Base::GetData(), CRNA_ref_Base::GetExt(), CSeq_feat_Base::GetLocation(), CSeqFeatData_Base::GetRna(), CSeq_loc::Intersect(), CSeq_loc_Base::IsEmpty(), CSeq_loc_Base::IsNull(), CSeqFeatData_Base::IsRna(), CTrna_ext_Base::IsSetAnticodon(), CSeq_feat_Base::IsSetData(), CRNA_ref_Base::IsSetExt(), CRNA_ref_Base::C_Ext::IsTRNA(), CTrna_ext_Base::ResetAnticodon(), CTrna_ext_Base::SetAnticodon(), and CSeq_feat_Base::SetData().
Referenced by AdjustForRelevantGapIntervals().
|
protected |
Definition at line 430 of file gap_trim.cpp.
References CSeq_loc::Assign(), CSeqFeatData_Base::GetCdregion(), CCdregion_Base::GetCode_break(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), CSeq_loc::Intersect(), CSeqFeatData_Base::IsCdregion(), CSeq_loc_Base::IsEmpty(), CSeq_loc_Base::IsNull(), CCdregion_Base::IsSetCode_break(), CSeq_feat_Base::IsSetData(), CCdregion_Base::ResetCode_break(), CCdregion_Base::SetCode_break(), and CSeq_feat_Base::SetData().
Referenced by AdjustForRelevantGapIntervals().
Definition at line 593 of file gap_trim.cpp.
References CCdregion_Base::eFrame_not_set, CCdregion_Base::eFrame_one, CCdregion_Base::eFrame_three, CCdregion_Base::eFrame_two, and CCdregion_Base::SetFrame().
Referenced by AdjustForRelevantGapIntervals().
|
protected |
Definition at line 313 of file gap_trim.cpp.
References NStr::Equal(), NStr::EqualNocase(), NStr::IsBlank(), CSeq_feat_Base::IsSetQual(), NON_CONST_ITERATE, NStr::NumericToString(), and CSeq_feat_Base::SetQual().
Referenced by AdjustForRelevantGapIntervals().
|
protected |
Definition at line 136 of file gap_trim.cpp.
References eGapIntervalType_known, eGapIntervalType_n, and eGapIntervalType_unknown.
Referenced by CalculateRelevantIntervals().
|
protected |
Definition at line 115 of file gap_trim.hpp.
Referenced by AdjustForRelevantGapIntervals().
|
protected |
Definition at line 101 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), and CollectGaps().
|
protected |
Definition at line 104 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), Split(), and Splittable().
|
protected |
Definition at line 111 of file gap_trim.hpp.
Referenced by CollectGaps().
|
protected |
Definition at line 105 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), ShouldRemove(), Trim(), and Trimmable().
|
protected |
Definition at line 113 of file gap_trim.hpp.
Referenced by CollectGaps().
|
protected |
Definition at line 106 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), Trim(), and Trimmable().
|
protected |
Definition at line 108 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), and CollectGaps().
|
protected |
Definition at line 109 of file gap_trim.hpp.
Referenced by CalculateRelevantIntervals(), CollectGaps(), and ShouldRemove().
|
protected |
Definition at line 112 of file gap_trim.hpp.
Referenced by CollectGaps().