GoodSrcId(
const CSeq_id&
id)
const;
92{
returnm_Dst_id_Handle; }
114 boolMap_Strand(
boolis_set_strand,
123 voidx_Map_Fuzz(
TFuzz& fuzz)
const;
204 boolext_to =
false,
257 if( rg.
Empty() ) {
262m_Ranges.push_back(offset_rg);
263m_TotalRange.CombineWith(offset_rg);
300 boolGetAlign_Dense_seg_TotalRange(
void)
const;
306 boolGetAlign_Sparse_ToFirst(
void)
const;
307 boolGetAlign_Sparse_ToSecond(
void)
const;
313 boolGetMapSingleLevel(
void)
const;
318 boolGetTrimMappedLocation(
void)
const;
326 boolx_IsSetOption(
intopt)
const;
327 voidx_SetOption(
intopt,
boolenable);
354fAlign_Dense_seg_TotalRange = 1 << 0,
358fAlign_Sparse_ToFirst = 0,
359fAlign_Sparse_ToSecond = 1 << 1,
367fMapSingleLevel = 1 << 2,
372fTrimMappedLocation = 1 << 3
378eSplicedRow_Prod = 0,
386fFuzzOption_CStyle = 1 << 0,
389fFuzzOption_RemoveLimTlOrTr = 1 << 1
540fAnnotMap_Location = 1 << 0,
541fAnnotMap_Product = 1 << 1,
542fAnnotMap_Both = fAnnotMap_Location | fAnnotMap_Product,
547fAnnotMap_RemoveNonMapping = 1 << 2,
550fAnnotMap_ThrowOnFailure = 1 << 3,
552fAnnotMap_Default = fAnnotMap_Both
573 boolLastIsPartial(
void);
607InitAlignMapper(
const CSeq_align& src_align);
612 voidx_InitializeFeat(
const CSeq_feat& map_feat,
613EFeatMapDirection dir);
623 voidx_InitializeAlign(
const CSeq_align& map_align,
625 const CSeq_id* from_id =
nullptr);
627 voidx_InitializeAlign(
const CSeq_align& map_align,
628 constTSynonyms& to_ids,
629 constTSynonyms* from_ids =
nullptr);
631 voidx_InitializeAlign(
const CSeq_align& map_align,
633 size_tfrom_row =
size_t(-1));
643 voidx_PreserveDestinationLocs(
void);
647 voidx_NextMappingRange(
const CSeq_id& src_id,
663 voidx_AddConversion(
const CSeq_id& src_id,
676 voidx_MapSeq_loc(
const CSeq_loc& src_loc);
682 voidx_PushRangesToDstMix(
void);
705: range(rg), fuzz(fz), group(grp) {}
713 returnrange < rg.
range;
749 boolx_CheckSeqTypes(
const CSeq_loc& loc,
758ESeqType x_ForceSeqTypes(
const CSeq_loc& loc)
const;
772 voidx_InitAlign(
const CDense_diag& diag,
size_tto_row,
size_tfrom_row);
773 voidx_InitAlign(
const CDense_seg& denseg,
size_tto_row,
size_tfrom_row);
774 voidx_InitAlign(
const CStd_seg& sseg,
size_tto_row);
775 voidx_InitAlign(
const CPacked_seg& pseg,
size_tto_row,
size_tfrom_row);
777 constTSynonyms& to_ids);
778 voidx_InitSpliced(
const CSpliced_seg& spliced, ESplicedRow to_row);
779 voidx_InitSparse(
const CSparse_seg& sparse,
size_tto_row);
791 voidx_AddExonPartsMapping(
TSeqPos& mapping_len,
806 boolx_MapNextRange(
const TRange& src_rg,
809 constTRangeFuzz& src_fuzz,
810TSortedMappings& mappings,
814 boolx_MapInterval(
const CSeq_id& src_id,
818TRangeFuzz orig_fuzz);
821 voidx_SetLastTruncated(
void);
829 voidx_PushNullLoc(
void);
839 size_tstrand_idx)
const;
845 constTRangeFuzz& fuzz,
891 boolx_ReverseRangeOrder(
int str)
const;
902 boolx_IsSynonym(
const CSeq_id&
id,
constTSynonyms& synonyms)
const;
917fTrimSplicedSegs = 1 << 0,
919fKeepNonmapping = 1 << 1,
922fCheckStrand = 1 << 2,
924fIncludeSrcLocs = 1 << 3,
926fMixedAlignsAsSpliced = 1 << 4,
929fErrorOnPartial = 1 << 5
934 voidx_SetMiscFlag(EMiscFlags flag,
bool value);
994 intGetWidthById(
const CSeq_id&
id)
const;
1002 voidCollectSynonyms(
const CSeq_id_Handle&
id, TSynonyms& synonyms)
const;
1008 static boolGetNonMappingAsNull(
void);
1068 voidSetLoc(
const CSeq_loc& loc);
1075 const CSeq_feat* GetFeat(
void)
const;
1088 voidResetObject(
void);
1116 if(x->m_Src_from != y->m_Src_from) {
1117 returnx->m_Src_from < y->m_Src_from;
1120 if(x->m_Src_to != y->m_Src_to) {
1121 returnx->m_Src_to > y->m_Src_to;
1132 if(x->m_Src_to != y->m_Src_to) {
1133 returnx->m_Src_to > y->m_Src_to;
1136 if(x->m_Src_from != y->m_Src_from) {
1137 returnx->m_Src_from < y->m_Src_from;
1338: m_SeqInfo(0), m_Options(0) {}
1343: m_SeqInfo(seq_info), m_Options(opts) {}
1347: m_SeqInfo(0), m_Options(opts) {}
User-defined methods of the data storage class.
CLocalRange< TOffset > TRange
define for the fundamental building block of sequence ranges
Helper class for mapping graphs.
CMappingRange - describes a single interval to interval mapping.
Storage for multiple mapping ranges.
Default IMessage implementation: text and severity only.
Class used to map seq-alignments.
namespace ncbi::objects::
Seq-loc iterator class â iterates all intervals from a seq-loc in the correct order.
CSeq_loc_Mapper_Base â.
CSeq_loc_Mapper_Options â.
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char si[8][64]
std::ofstream out("events_result.xml")
main entry point for tests
static const char * str(char *buf, int n)
CRange< Position > Map(const CRange< Position > &target, const CRange< Position > &range)
unsigned int TSeqPos
Type for sequence locations and lengths.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
EDiagSev
Severity level for the posted diagnostics.
void Write(CObjectOStream &out, TConstObjectPtr object, const CTypeRef &type)
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
CRef< IMapper_Sequence_Info > m_SeqInfo
pair< TFuzz, TFuzz > TRangeFuzz
TDstStrandMap m_DstRanges
CSeq_loc_Mapper_Options & SetMapperSequenceInfo(IMapper_Sequence_Info *seq_info)
CSeq_loc_Mapper_Base & SetErrorOnPartial(bool value=true)
Report source range trimming as an error.
void x_SetMiscFlag(EMiscFlags flag, bool value)
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
bool operator()(const CRef< CMappingRange > &x, const CRef< CMappingRange > &y) const
set< CSeq_id_Handle > TSynonyms
virtual void CollectSynonyms(const CSeq_id_Handle &id, TSynonyms &synonyms)=0
Collect all synonyms for the id including the id itself.
ESeqType GetSeqTypeById(const CSeq_id_Handle &idh) const
Methods for getting sequence types, use cached types (m_SeqTypes) if possible.
TRangeMap::const_iterator TRangeIterator
CRef< CGraphRanges > m_GraphRanges
bool operator<(const SMappedRange &rg) const
CSeq_loc_Mapper_Base & TruncateNonmappingRanges(void)
map< CSeq_id_Handle, TRangeMap > TIdMap
EMapResult
Result of seq-annot mapping.
CSeq_id_Handle m_Dst_id_Handle
void AddRange(const TRange &rg)
const CSeq_id_Handle & GetDstIdHandle(void) const
CSeq_align::C_Segs::TDendiag TDendiag
CSeq_loc_Mapper_Options(void)
list< SMappedRange > TMappedRanges
const TIdMap & GetIdMap() const
TSeqPos GetLength(void) const
CSeq_loc_Mapper_Options & SetTrimMappedLocation(bool value=true)
ESplicedRow
Spliced-seg row indexing constants.
bool operator()(const CRef< CMappingRange > &x, const CRef< CMappingRange > &y) const
IMapper_Sequence_Info * GetMapperSequenceInfo(void) const
Sequence type, length etc.
CMappingRanges::TRangeIterator TRangeIterator
FAnnotMapFlag
Flags defining seq-annot mapping options.
virtual TSeqPos GetSequenceLength(const CSeq_id_Handle &idh)=0
Get sequence length or kInvalidSeqPos.
bool GetTrimMappedLocation(void) const
Mapped location trimming at sequence end.
void SetSeqTypeById(const CSeq_id_Handle &idh, ESeqType seqtype) const
Methods for setting sequence types.
CSeq_loc_Mapper_Base & SetGapPreserve(void)
Whether to preserve or remove NULL sub-locations (usually indicating gaps) from the result.
EFeatMapDirection
Mapping direction used when initializing the mapper with a feature.
vector< TMappedRanges > TRangesByStrand
CRangeMultimap< CRef< CMappingRange >, TSeqPos > TRangeMap
CSeq_loc_Mapper_Options m_MapOptions
const CSeq_id_Handle & CollectSynonyms(const CSeq_id_Handle &id) const
map< CSeq_id_Handle, TDstRanges > TDstIdMap
CSeq_loc_Mapper_Base & SetMergeNone(void)
Intervals' merging mode MergeNone and MergeAbutting do not change the order of ranges in the destinat...
CSeq_loc_Mapper_Base & SetTrimSplicedSeg(bool trim)
For mapping spliced-segs only: preserve or trim starting/ending indels.
EMapOptions
Options for interpretations of locations.
void SetReverseSrc(bool value=true)
CSeq_loc_Mapper_Options & SetAlign_Sparse_ToFirst(bool value=true)
CSeq_align::C_Segs::TStd TStd
bool GoodSrcId(const CSeq_id &id) const
Check if the id is on the source sequence.
TSeqPos GetDst_from(void) const
void SetReverseDst(bool value=true)
CSeq_loc_Mapper_Options & SetAlign_Dense_seg_TotalRange(bool value=true)
EObjectType Which(void) const
Check type of the object stored in the message.
list< TRange > TDstRanges
map< CSeq_id_Handle, CSeq_id_Handle > TSynonymMap
vector< CRef< CMappingRange > > TSortedMappings
bool x_IsSetOption(int opt) const
CSeq_loc_Mapper_Base::ESeqType TSeqType
bool GetAlign_Dense_seg_TotalRange(void) const
Dense-seg mapping option.
CSeq_loc_Mapper_Base & SetMergeAbutting(void)
Merge only abutting intervals, keep overlapping.
int GetWidthById(const CSeq_id_Handle &idh) const
Get sequence width.
CMappingRange::TRange TRange
bool GetAlign_Sparse_ToFirst(void) const
Mapping direction when mapping through a sparse-seg.
CMappingRanges::TRangeMap TRangeMap
TSeqPos GetOffset(void) const
CSeq_loc_Mapper_Base & SetMergeContained(void)
Merge intervals only if one is completely covered by another.
bool GetReverseSrc(void) const
CRef< CSeq_loc > m_Dst_loc
void IncOffset(TSeqPos inc)
CSeq_loc_Mapper_Base & operator=(const CSeq_loc_Mapper_Base &)
bool x_IsSetMiscFlag(EMiscFlags flag) const
CSeq_loc_Mapper_Base & SetMergeAll(void)
Merge any abutting or overlapping intervals.
map< CSeq_id_Handle, TSeqPos > TLengthMap
bool LastIsPartial(void)
Check if the last mapping resulted in partial location (not all ranges from the original location cou...
const CMappingRanges & GetMappingRanges(void) const
Get mapping ranges.
bool GetReverseDst(void) const
bool GetReverse(void) const
CRef< CSeq_loc > m_SrcLocs
CSeq_loc_Mapper_Base & MixedAlignsAsSpliced(bool value=true)
When set to 'true' if mapped alignment has exactly one genomic and one protein row,...
CMappingRange::TRange TRange
vector< TRange > TGraphRanges
CRef< CSeq_align > x_MapSeq_align(const CSeq_align &src_align, size_t *row)
virtual TSeqType GetSequenceType(const CSeq_id_Handle &idh)=0
Get information about sequence type (nuc or prot).
CSeq_loc_Mapper_Base & SetCheckStrand(bool value=true)
Check strands before mapping a range.
CRef< CMappingRanges > m_Mappings
const TGraphRanges & GetRanges(void) const
TSeqPos GetSrc_from(void) const
CSeq_loc_Mapper_Base & SetMergeBySeg(void)
Merge only intervals from the same group.
SMappedRange(const TRange &rg, const TRangeFuzz &fz, int grp=0)
TIdMap::const_iterator TIdIterator
ESeqType GetSeqType(const CSeq_id_Handle &idh) const
CMappingRanges::TSortedMappings TSortedMappings
CSeq_id_Handle m_Src_id_Handle
map< CSeq_id_Handle, ESeqType > TSeqTypeById
const TRange & GetTotalRange(void) const
map< CSeq_id_Handle, TRangesByStrand > TRangesById
CSeq_loc_Mapper_Options & SetMapSingleLevel(bool value=true)
CSeq_loc_Mapper_Base & SetGapRemove(void)
bool GetAlign_Sparse_ToSecond(void) const
pair< TFuzz, TFuzz > TRangeFuzz
CSeq_loc_Mapper_Base & KeepNonmappingRanges(void)
Keep ranges which can not be mapped.
void x_SetOption(int opt, bool enable)
CSeq_loc_Mapper_Base(const CSeq_loc_Mapper_Base &)
CSeq_loc_Mapper_Base & IncludeSourceLocs(bool value=true)
Include source ranges in the mapped location.
vector< TDstIdMap > TDstStrandMap
CSeq_loc_Mapper_Options & SetAlign_Sparse_ToSecond(bool value=true)
CRef< CSeq_id > GetDstId(void) const
bool GetMapSingleLevel(void) const
Mapping depth when using a seq-map, a bioseq or a GC-assembly.
void SetOffset(TSeqPos offset)
CSeq_loc_Mapper_Base::TSynonyms TSynonyms
@ eMapped_Some
Some (not all) annotations were mapped.
@ eLocationToProduct
Map from the feature's location to product.
@ fAlign_Dense_seg_TotalRange
Ignore internal dense-seg structure - map each dense-seg according to the total ranges involved.
@ fTrimMappedLocation
Enable trimming of source/destination ranges at sequence end.
@ fMapSingleLevel
Flag used when mapping through a seq-map (this includes mapping through a bioseq or a GC-assembly).
@ fAlign_Sparse_ToSecond
Map to second-id.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
list< CRef< CStd_seg > > TStd
list< CRef< CSpliced_exon_chunk > > TParts
list< CRef< CDense_diag > > TDendiag
ENa_strand
strand of nucleic acid
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
IMessage/IMessageListener interfaces and basic implementations.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
int GetLoc(const string &acc, const string &pat, CSeq_loc &loc, CScope &scope)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4