NCBI C++ ToolKit
|
Search Toolkit Book for CSeq_loc_Mapper_Base
CSeq_loc_Mapper_Base –. More...
#include <objects/seq/seq_loc_mapper_base.hpp>
Classes | |
struct | SMappedRange |
Public Types | |
enum | EFeatMapDirection { eLocationToProduct , eProductToLocation } |
Mapping direction used when initializing the mapper with a feature. More... | |
enum | EMapOptions { fAlign_Dense_seg_TotalRange = 1 << 0 , fAlign_Sparse_ToFirst = 0 , fAlign_Sparse_ToSecond = 1 << 1 , fMapSingleLevel = 1 << 2 , fTrimMappedLocation = 1 << 3 } |
Options for interpretations of locations. More... | |
enum | ESplicedRow { eSplicedRow_Prod = 0 , eSplicedRow_Gen = 1 } |
Spliced-seg row indexing constants. More... | |
enum | FFuzzOption { fFuzzOption_CStyle = 1 << 0 , fFuzzOption_RemoveLimTlOrTr = 1 << 1 } |
enum | FAnnotMapFlag { fAnnotMap_Location = 1 << 0 , fAnnotMap_Product = 1 << 1 , fAnnotMap_Both = fAnnotMap_Location | fAnnotMap_Product , fAnnotMap_RemoveNonMapping = 1 << 2 , fAnnotMap_ThrowOnFailure = 1 << 3 , fAnnotMap_Default = fAnnotMap_Both } |
Flags defining seq-annot mapping options. More... | |
enum | EMapResult { eMapped_None = 0 , eMapped_Some , eMapped_All } |
Result of seq-annot mapping. More... | |
enum | ESeqType { eSeq_unknown = 0 , eSeq_nuc = 1 , eSeq_prot = 3 } |
typedef int | TMapOptions |
typedef int | TFuzzOption |
typedef int | TAnnotMapFlags |
typedef set< CSeq_id_Handle > | TSynonyms |
![]() | |
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 | |
CSeq_loc_Mapper_Base (CMappingRanges *mapping_ranges, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping through a pre-filled CMappipngRanges. More... | |
CSeq_loc_Mapper_Base (const CSeq_feat &map_feat, EFeatMapDirection dir, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping through a feature, both location and product must be set. More... | |
CSeq_loc_Mapper_Base (const CSeq_loc &source, const CSeq_loc &target, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping between two seq_locs. More... | |
CSeq_loc_Mapper_Base (const CSeq_align &map_align, const CSeq_id &to_id, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping through an alignment. More... | |
CSeq_loc_Mapper_Base (const CSeq_id &from_id, const CSeq_id &to_id, const CSeq_align &map_align, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping through an alignment using specific source and target ids. More... | |
CSeq_loc_Mapper_Base (const CSeq_align &map_align, const CSeq_id &to_id, TMapOptions opts, IMapper_Sequence_Info *seq_info) | |
CSeq_loc_Mapper_Base (const CSeq_align &map_align, size_t to_row, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Sparse alignments require special row indexing since each row contains two seq-ids. More... | |
CSeq_loc_Mapper_Base (size_t from_row, size_t to_row, const CSeq_align &map_align, CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
Mapping through an alignment using specific source and target row numbers. More... | |
CSeq_loc_Mapper_Base (const CSeq_align &map_align, size_t to_row, TMapOptions opts, IMapper_Sequence_Info *seq_info) | |
~CSeq_loc_Mapper_Base (void) | |
void | SetFuzzOption (TFuzzOption newOption) |
CSeq_loc_Mapper_Base & | SetMergeNone (void) |
Intervals' merging mode MergeNone and MergeAbutting do not change the order of ranges in the destination seq-loc. More... | |
CSeq_loc_Mapper_Base & | SetMergeAbutting (void) |
Merge only abutting intervals, keep overlapping. More... | |
CSeq_loc_Mapper_Base & | SetMergeBySeg (void) |
Merge only intervals from the same group. More... | |
CSeq_loc_Mapper_Base & | SetMergeContained (void) |
Merge intervals only if one is completely covered by another. More... | |
CSeq_loc_Mapper_Base & | SetMergeAll (void) |
Merge any abutting or overlapping intervals. More... | |
CSeq_loc_Mapper_Base & | SetGapPreserve (void) |
Whether to preserve or remove NULL sub-locations (usually indicating gaps) from the result. More... | |
CSeq_loc_Mapper_Base & | SetGapRemove (void) |
CSeq_loc_Mapper_Base & | SetTrimSplicedSeg (bool trim) |
For mapping spliced-segs only: preserve or trim starting/ending indels. More... | |
CSeq_loc_Mapper_Base & | KeepNonmappingRanges (void) |
Keep ranges which can not be mapped. More... | |
CSeq_loc_Mapper_Base & | TruncateNonmappingRanges (void) |
CSeq_loc_Mapper_Base & | SetCheckStrand (bool value=true) |
Check strands before mapping a range. More... | |
CSeq_loc_Mapper_Base & | MixedAlignsAsSpliced (bool value=true) |
When set to 'true' if mapped alignment has exactly one genomic and one protein row, convert it to spliced-seg. More... | |
CSeq_loc_Mapper_Base & | IncludeSourceLocs (bool value=true) |
Include source ranges in the mapped location. More... | |
CSeq_loc_Mapper_Base & | SetErrorOnPartial (bool value=true) |
Report source range trimming as an error. More... | |
CRef< CSeq_loc > | Map (const CSeq_loc &src_loc) |
Map seq-loc. More... | |
CRef< CSeq_loc > | MapTotalRange (const CSeq_loc &seq_loc) |
Take the total range from the location and run it through the mapper. More... | |
CRef< CSeq_align > | Map (const CSeq_align &src_align) |
Map the whole alignment. More... | |
CRef< CSeq_align > | Map (const CSeq_align &src_align, size_t row) |
Map a single row of the alignment. More... | |
CRef< CSeq_graph > | Map (const CSeq_graph &src_graph) |
Map seq-graph. More... | |
EMapResult | Map (CSeq_annot &annot, TAnnotMapFlags flags=fAnnotMap_Default) |
Map each object from the Seq-annot and replace the original with the mapped one. More... | |
bool | LastIsPartial (void) |
Check if the last mapping resulted in partial location (not all ranges from the original location could be mapped to the target). More... | |
const CSeq_id_Handle & | CollectSynonyms (const CSeq_id_Handle &id) const |
CSeq_loc_Mapper_Base (CSeq_loc_Mapper_Options options=CSeq_loc_Mapper_Options()) | |
ESeqType | GetSeqTypeById (const CSeq_id_Handle &idh) const |
Methods for getting sequence types, use cached types (m_SeqTypes) if possible. More... | |
ESeqType | GetSeqTypeById (const CSeq_id &id) const |
void | SetSeqTypeById (const CSeq_id_Handle &idh, ESeqType seqtype) const |
Methods for setting sequence types. More... | |
void | SetSeqTypeById (const CSeq_id &id, ESeqType seqtype) const |
int | GetWidthById (const CSeq_id_Handle &idh) const |
Get sequence width. More... | |
int | GetWidthById (const CSeq_id &id) const |
const CMappingRanges & | GetMappingRanges (void) const |
Get mapping ranges. More... | |
void | CollectSynonyms (const CSeq_id_Handle &id, TSynonyms &synonyms) const |
NOTE: In most cases CollectSynonyms(const CSeq_id_Handle& id) should be used instead, since it takes care of synonym storage and mapping. More... | |
![]() | |
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 bool | GetNonMappingAsNull (void) |
![]() | |
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 | |
typedef CMappingRange::TRange | TRange |
typedef CMappingRanges::TRangeMap | TRangeMap |
typedef CMappingRanges::TRangeIterator | TRangeIterator |
typedef CMappingRanges::TSortedMappings | TSortedMappings |
typedef list< TRange > | TDstRanges |
typedef map< CSeq_id_Handle, TDstRanges > | TDstIdMap |
typedef vector< TDstIdMap > | TDstStrandMap |
typedef CRef< CInt_fuzz > | TFuzz |
typedef pair< TFuzz, TFuzz > | TRangeFuzz |
typedef list< SMappedRange > | TMappedRanges |
typedef vector< TMappedRanges > | TRangesByStrand |
typedef map< CSeq_id_Handle, TRangesByStrand > | TRangesById |
typedef map< CSeq_id_Handle, ESeqType > | TSeqTypeById |
typedef CSeq_align::C_Segs::TDendiag | TDendiag |
typedef CSeq_align::C_Segs::TStd | TStd |
Protected Member Functions | |
ESeqType | GetSeqType (const CSeq_id_Handle &idh) const |
TSeqPos | GetSequenceLength (const CSeq_id &id) |
virtual CSeq_align_Mapper_Base * | InitAlignMapper (const CSeq_align &src_align) |
void | x_InitializeFeat (const CSeq_feat &map_feat, EFeatMapDirection dir) |
void | x_InitializeLocs (const CSeq_loc &source, const CSeq_loc &target, int src_frame=0, int dst_frame=0) |
void | x_InitializeAlign (const CSeq_align &map_align, const CSeq_id &to_id, const CSeq_id *from_id=nullptr) |
void | x_InitializeAlign (const CSeq_align &map_align, const TSynonyms &to_ids, const TSynonyms *from_ids=nullptr) |
void | x_InitializeAlign (const CSeq_align &map_align, size_t to_row, size_t from_row=size_t(-1)) |
void | x_PreserveDestinationLocs (void) |
void | x_NextMappingRange (const CSeq_id &src_id, TSeqPos &src_start, TSeqPos &src_len, ENa_strand src_strand, const CSeq_id &dst_id, TSeqPos &dst_start, TSeqPos &dst_len, ENa_strand dst_strand, const CInt_fuzz *fuzz_from=0, const CInt_fuzz *fuzz_to=0, int frame=0, TSeqPos src_bioseq_len=kInvalidSeqPos) |
void | x_AddConversion (const CSeq_id &src_id, TSeqPos src_start, ENa_strand src_strand, const CSeq_id &dst_id, TSeqPos dst_start, ENa_strand dst_strand, TSeqPos length, bool ext_right, int frame, TSeqPos src_bioseq_len, TSeqPos dst_length) |
void | x_MapSeq_loc (const CSeq_loc &src_loc) |
void | x_PushRangesToDstMix (void) |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Private Types | |
enum | EMergeFlags { eMergeNone , eMergeAbutting , eMergeContained , eMergeBySeg , eMergeAll } |
enum | EGapFlags { eGapPreserve , eGapRemove } |
enum | EMiscFlags { fTrimSplicedSegs = 1 << 0 , fKeepNonmapping = 1 << 1 , fCheckStrand = 1 << 2 , fIncludeSrcLocs = 1 << 3 , fMixedAlignsAsSpliced = 1 << 4 , fErrorOnPartial = 1 << 5 } |
typedef map< CSeq_id_Handle, CSeq_id_Handle > | TSynonymMap |
typedef map< CSeq_id_Handle, TSeqPos > | TLengthMap |
typedef int | TMiscFlags |
Static Private Member Functions | |
static TSeqPos | sx_GetExonPartLength (const CSpliced_exon_chunk &part) |
Friends | |
class | CSeq_align_Mapper_Base |
class | CTotalRangeSynonymMapper |
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... | |
Mapping locations and alignments between bioseqs through seq-locs, features, alignments or between parts of segmented bioseqs.
Definition at line 341 of file seq_loc_mapper_base.hpp.