58 #define NCBI_USE_ERRCODE_X Objects_SeqLoc
158 if ( points.size() == 1 ) {
159 SetPnt(*
new CSeq_point(
id, points.front(), strand));
176 if ( ranges.size() == 1 ) {
178 ranges.front().GetFrom(), ranges.front().GetTo(), strand));
194 switch ( src.
Which() ) {
216 "Int-fuzz is not set");
320 data.back()->Assign(**
i);
332 data.back()->Assign(**
i);
341 const CSeq_loc& loc =
static_cast<const CSeq_loc&
>(obj);
342 switch ( loc.Which() ) {
350 SetEmpty().Assign(loc.GetEmpty());
353 SetWhole().Assign(loc.GetWhole());
362 x_Assign(SetPacked_int(), loc.GetPacked_int());
365 x_Assign(SetPacked_pnt(), loc.GetPacked_pnt());
371 x_Assign(SetEquiv(), loc.GetEquiv());
377 SetFeat().Assign(loc.GetFeat());
387 TSeqPos range_from = m_TotalRangeCacheFrom.load(memory_order_acquire);
388 if ( range_from ==
TSeqPos(kDirtyCache) ) {
390 TRange range = x_CalculateTotalRangeCheckId(
id);
391 m_IdCache.store(
id, memory_order_release);
392 m_TotalRangeCacheToOpen.store(range.
GetToOpen(), memory_order_relaxed);
393 m_TotalRangeCacheFrom.store(range.
GetFrom(), memory_order_release);
397 TSeqPos range_to_open = m_TotalRangeCacheToOpen.load(memory_order_relaxed);
404 bool may_throw)
const
406 if ( total_id ==
id ) {
412 }
else if ( (
id && !total_id->
Equals(*
id)) ) {
415 "CSeq_loc::GetTotalRange() is not defined "
416 "for seq-loc with several different seq-ids");
442 x_UpdateId(
id, &GetEmpty());
448 x_UpdateId(
id, &GetWhole());
455 x_UpdateId(
id, &loc.
GetId());
462 x_UpdateId(
id, &pnt.
GetId());
464 total_range.
Set(pos, pos);
474 x_UpdateId(
id, &loc.
GetId());
482 x_UpdateId(
id, &pnts.
GetId());
486 total_range +=
TRange(pos, pos);
497 total_range += (*li)->x_CalculateTotalRangeCheckId(
id);
507 total_range += (*li)->x_CalculateTotalRangeCheckId(
id);
516 x_UpdateId(
id, &pointA.
GetId());
518 total_range =
TRange(pos, pos);
521 x_UpdateId(
id, &pointB.
GetId());
523 total_range +=
TRange(pos, pos);
531 "CSeq_loc::CalculateTotalRange(): "
532 "unsupported location type: "<<
533 SelectionName(Which()));
544 if ( !id1 || !id2 ) {
546 "CSeq_loc::Compare(): "
547 "cannot compare locations with several different seq-ids");
562 bool circular1 = from1 > to1;
563 bool circular2 = from2 > to2;
564 if (
int diff = circular2 - circular1 ) {
569 if ( from1 != from2 ) {
570 return from1 < from2? -1: 1;
574 return to1 > to2? -1: 1;
576 if (
flags & fCompare_Strand) {
577 if (!IsSetStrand()) {
578 return loc.IsSetStrand() ? -1 : 0;
581 if (!loc.IsSetStrand())
return 1;
584 auto s2 = loc.GetStrand();
585 if (s1 != s2)
return s1 < s2 ? -1 : 1;
592 return Compare(loc_arg, fCompare_Default);
602 return x_CompareSingleId(loc_arg, id1, id2,
flags);
608 for ( ; iter1 && iter2; ) {
610 for (
int k = 0; k < 2; ++k ) {
611 CSeq_loc_CI& iter = k? iter2: iter1;
622 const CSeq_id&
id = iter.GetSeq_id();
623 loc =
const_cast<CSeq_loc*
>(&*iter.GetRangeAsSeq_loc());
626 if ( !iter.GetSeq_id().Equals(
id) ) {
636 if ( !loc->
IsMix() ) {
641 loc->
SetMix().AddSeqLoc(
const_cast<CSeq_loc&
>(*iter.GetRangeAsSeq_loc()));
644 if ( loc1 && !loc2 ) {
648 if ( loc2 && !loc1 ) {
652 if ( !loc1 && !loc2 ) {
663 if ( iter1 && !iter2 ) {
667 if ( iter2 && !iter1 ) {
691 return loc.GetTotalRange();
712 return !filter || (*filter)( loc.GetId() );
719 return !filter || (*filter)( &loc.
GetId() );
728 if ( minus_strand ) {
756 template<
class Container1,
class Container2 >
758 const Container2& container2,
762 typename Container1::const_iterator iter1 = container1.begin();
763 typename Container1::const_iterator iter1end = container1.end();
764 typename Container2::const_iterator iter2 = container2.begin();
765 typename Container2::const_iterator iter2end = container2.end();
766 for( ; iter1 != iter1end && iter2 != iter2end ; ++iter1, ++iter2 ) {
769 if(
NULL != filter ) {
776 if( iter1 == iter1end || iter2 == iter2end ) {
790 if( iter1 == iter1end ) {
791 if( iter2 == iter2end ) {
810 if ( loc2.IsMix() ) {
816 else if ( loc2.IsPacked_int() ) {
818 loc2.GetPacked_int().Get(),
824 return minus_strand? -1: 1;
827 else if ( IsPacked_int() ) {
828 if ( loc2.IsMix() ) {
830 GetPacked_int().
Get(),
834 else if ( loc2.IsPacked_int() ) {
836 loc2.GetPacked_int().Get(),
842 return minus_strand? -1: 1;
846 if ( loc2.IsMix() || loc2.IsPacked_int() ) {
848 return minus_strand? 1: -1;
862 return GetInt().IsSetStrand();
864 return GetPnt().IsSetStrand();
866 return GetPacked_int().IsSetStrand(flag);
868 return GetPacked_pnt().IsSetStrand();
870 return GetMix().IsSetStrand(flag);
872 return GetBond().IsSetStrand(flag);
896 return GetPacked_int().GetStrand();
898 return GetPacked_pnt().IsSetStrand() ?
901 return GetMix().GetStrand();
903 return GetBond().GetStrand();
909 "CSeq_loc::GetStrand(): unsupported location type"<<
910 SelectionName(Which()));
930 return GetInt().GetStart(ext);
934 return GetPnt().GetPoint();
938 return GetPacked_int().GetStart(ext);
942 return GetPacked_pnt().GetStart(ext);
946 return GetMix().GetStart(ext);
950 return GetBond().GetStart(ext);
957 "CSeq_loc::GetStart(): "
958 "unsupported location type: "<<SelectionName(Which()));
978 return GetInt().GetStop(ext);
982 return GetPnt().GetPoint();
986 return GetPacked_int().GetStop(ext);
990 return GetPacked_pnt().GetStop(ext);
994 return GetMix().GetStop(ext);
998 return GetBond().GetStop(ext);
1005 "CSeq_loc::GetStop(): "
1006 "unsupported location type: "<<SelectionName(Which()));
1014 return GetTotalRange().GetLength();
1018 bool minus = IsReverseStrand();
1021 return minus ? (seq_len - stop + start + 1) : (stop - start + 1);
1023 return minus ? (start - stop + 1) : (seq_len - start + stop + 1);
1030 return CSeq_loc_CI(*
this);
1036 return CSeq_loc_CI();
1043 : m_IsSetStrand(
false),
1113 return part ==
m_Parts.begin()? 0: *--part;
1190 return info.m_Loc &&
info.m_Loc->IsPnt();
1194 if ( !
info.m_Loc ) {
1197 switch (
info.m_Loc->Which() ) {
1241 bool CanBeBond(
size_t idx_begin,
size_t idx_end)
const;
1250 return info.m_Loc &&
info.m_Loc->IsBond();
1293 if ( it->Contains(idx) ) {
1303 if ( it->Contains(idx) ) {
1311 vector<const SEquivSet*> sets;
1313 if ( it->Contains(idx) ) {
1314 sets.push_back(&*it);
1317 if ( level >= sets.size() ) {
1319 "CSeq_loc_CI: bad equiv set level: "<<level);
1322 return *sets[level];
1379 const CSeq_loc& loc);
1381 const CSeq_loc& loc);
1401 : m_HasChanges(
false),
1411 m_EmptyFlag(empty_flag),
1412 m_HasChanges(
false),
1430 template<
class Container>
1433 if ( cont.size()+add_size > cont.capacity() ) {
1434 cont.reserve(
max(cont.size()+add_size, cont.capacity()*2));
1441 switch ( loc.Which() ) {
1528 size_t part_start =
m_Ranges.size();
1531 if ( part_start != part_end ) {
1533 eq_set.
m_Parts.push_back(part_end-start);
1536 if ( !eq_set.
m_Parts.empty() ) {
1553 "CSeq_loc_CI: unsupported location type: "<<
1554 loc.SelectionName(loc.Which()));
1560 const CSeq_loc& loc)
1582 const CSeq_loc& loc)
1608 if ( eq_end <= begin || eq_begin >= end ) {
1612 if ( eq_begin > begin && eq_begin < end ) {
1614 ret =
min(ret, eq_begin);
1625 return ret == end? 0: ret;
1639 if ( eq_begin < begin || eq_end > end ) {
1642 if ( used_equivs.
find(&eq_set) != used_equivs.
end() ) {
1646 if ( !ret ||
PByLevel()(ret, &eq_set) ) {
1662 if ( idx < start_index ) {
1667 size_t offset = idx - start_index;
1668 size_t prev_offset = 0;
1672 if ( *it2 == prev_offset ) {
1689 return (idx > start && idx <= end) || (idx == start && idx == 0);
1704 else if ( idx <
m_Ranges.size() ) {
1709 switch ( loc->
Which() ) {
1739 vector<SEquivSet*> add_to_set_mid;
1746 if ( idx == eq_start &&
1752 if ( !add_to_set_beg ||
PByLevel()(&eq_set, add_to_set_beg) ) {
1753 add_to_set_beg = &eq_set;
1756 else if ( idx == eq_end &&
1760 if ( !add_to_set_end ||
PByLevel()(&eq_set, add_to_set_end) ) {
1761 add_to_set_end = &eq_set;
1764 else if ( idx > eq_start && idx < eq_end ) {
1766 add_to_set_mid.push_back(&eq_set);
1768 else if ( idx <= eq_start ) {
1773 sort(add_to_set_mid.begin(), add_to_set_mid.end(),
PByLevel());
1774 if ( add_to_set_beg ) {
1781 add_to_set_beg->
m_Parts.insert(add_to_set_beg->
m_Parts.begin(), 1);
1785 else if ( add_to_set_end ) {
1789 add_to_set_end->
m_Parts.push_back(add_to_set_end->
m_Parts.back()+1);
1793 ++add_to_set_end->
m_Parts.back();
1797 !add_to_set_mid.empty() ) {
1798 SEquivSet& eq_set = **add_to_set_mid.begin();
1799 add_to_set_mid.erase(add_to_set_mid.begin());
1802 for ( ; it != eq_set.
m_Parts.end(); ++it ) {
1807 ITERATE ( vector<SEquivSet*>, set_it, add_to_set_mid ) {
1810 for ( ; it != eq_set.
m_Parts.end(); ++it ) {
1830 if (
info.m_Range.GetLength() != 1 ) {
1833 if (
info.m_Fuzz.first !=
info.m_Fuzz.second ) {
1836 if ( !
info.m_IdHandle ) {
1845 if (
info.m_Range.Empty() ||
info.m_Range.IsWhole() ) {
1848 if ( !
info.m_IdHandle ) {
1857 size_t count = idx_end - idx_begin;
1864 if (
GetBondRange(idx_begin) != make_pair(idx_begin, idx_end) ) {
1867 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
1883 const CSeq_loc* loc =
m_Ranges[idx].m_Loc.GetPointerOrNull();
1884 _ASSERT(loc && loc->IsBond());
1885 while ( idx > 0 &&
m_Ranges[idx-1].m_Loc == loc ) {
1894 const CSeq_loc* loc =
m_Ranges[idx].m_Loc.GetPointerOrNull();
1895 _ASSERT(loc && loc->IsBond());
1907 "CSeq_loc_I::RemoveBond(): "
1908 "there is no bond at current position");
1913 for ( idx = range.first; idx < range.second; ++idx ) {
1921 pair<size_t, size_t> range;
1925 size_t bond_len = range.second-range.first;
1926 if ( bond_len > 0 ) {
1928 if ( idx != range.first ) {
1930 "CSeq_loc_I::MakeBondA(): "
1931 "current position is B part of other bond");
1933 if ( bond_len == 1 ) {
1939 for ( idx = range.first+1; idx < range.second; ++idx ) {
1954 "CSeq_loc_I::MakeBondAB(): "
1955 "no more parts in the location");
1957 pair<size_t, size_t> range;
1961 size_t bond_len = range.second-range.first;
1962 if ( bond_len > 0 ) {
1964 if ( idx != range.first ) {
1966 "CSeq_loc_I::MakeBondAB(): "
1967 "current position is B part of other bond");
1969 if ( bond_len == 2 ) {
1974 if ( bond_len > 2 ) {
1976 for ( idx = range.first+2; idx < range.second; ++idx ) {
1995 "CSeq_loc_I::MakeBondB(): "
1996 "no parts before current");
1998 pair<size_t, size_t> range;
2005 size_t bond_len = range.second-range.first;
2006 if ( bond_len > 0 ) {
2008 if ( range.first != idx + 1 ) {
2010 "CSeq_loc_I::MakeBondB(): "
2011 "current position is not a B part of other bond");
2013 if ( bond_len == 2 ) {
2018 if ( bond_len > 2 ) {
2020 for ( idx = range.first+2; idx < range.second; ++idx ) {
2037 size_t idx_end)
const
2041 if ( idx_begin+1 < idx_end ) {
2051 if ( !
info.m_IdHandle ) {
2053 "CSeq_loc_I: part id is null");
2070 if (
info.m_IsSetStrand ) {
2076 if (
info.m_Fuzz.first ) {
2122 switch (
info.m_Loc->Which() ) {
2144 if (
info.m_IsSetStrand ) {
2147 if (
info.m_Fuzz.first ) {
2150 if (
info.m_Fuzz.second ) {
2170 if (
info.m_Range.IsWhole() ) {
2174 if ( !
info.m_Range.Empty() ) {
2176 "CSeq_loc_I::MakeSeq_loc(): "
2177 "cannot determine type of loc part");
2179 if (
info.m_IdHandle ) {
2196 else if (
info.m_Range.IsWhole() ||
info.m_Range.Empty() ) {
2206 size_t idx_end)
const
2208 _ASSERT(idx_end >= idx_begin);
2209 if ( idx_end == idx_begin ) {
2213 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
2221 if ( idx != idx_begin ) {
2231 if (
info.m_Fuzz.first != info0.
m_Fuzz.first ) {
2244 size_t idx_end)
const
2246 _ASSERT(idx_end >= idx_begin);
2247 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
2263 size_t idx_end)
const
2272 if ( info0.
m_Fuzz.first ) {
2275 pnts.
SetPoints().reserve(idx_end-idx_begin);
2276 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
2285 size_t idx_end)
const
2289 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
2303 if ( !loc->
IsMix() ) {
2306 loc->
SetMix().Set().push_back(loc1);
2308 loc->
SetMix().Set().push_back(loc2);
2318 used_equivs.
insert(eq_set);
2319 size_t idx = eq_set->GetStartIndex();
2321 if ( idx > idx_begin ) {
2322 loc =
MakeLoc(idx_begin, idx, make_type, used_equivs);
2327 size_t part_end = eq_set->GetPartEndIndex(it);
2329 MakeLoc(idx, part_end, make_type, used_equivs);
2330 equiv.
Set().push_back(part_loc);
2334 if ( idx < idx_end ) {
2335 loc2 =
MakeLoc(idx, idx_end, make_type, used_equivs);
2336 if ( loc2->
IsMix() ) {
2350 "CSeq_loc_I::MakeSeq_loc: equiv set overlaps with range");
2353 if ( idx_begin == idx_end ) {
2373 idx_end - idx_begin > 1 ) {
2384 for (
size_t idx = idx_begin; idx < idx_end; ++idx ) {
2387 if ( range.first < idx || range.second > idx_end ||
2388 !
CanBeBond(range.first, range.second) ) {
2390 "CSeq_loc_I::MakeSeq_loc: "
2394 idx = range.second-1;
2403 if ( (!
info.m_Loc ||
info.m_Loc->IsInt()) &&
2441 EEmptyFlag empty_flag,
2450 : m_Impl(iter.m_Impl),
2463 : m_Impl(iter.m_Impl),
2464 m_Index(iter.m_Index)
2471 m_Impl = iter.m_Impl;
2472 m_Index = iter.m_Index;
2480 bool is_end = m_Impl->IsEnd(m_Index);
2481 if ( iter.m_Impl->IsEnd(iter.m_Index) ) {
2485 return !is_end && m_Impl == iter.m_Impl && m_Index == iter.m_Index;
2492 return !(*
this == iter);
2498 x_CheckValid(
"IsInBond()");
2499 return m_Impl->IsInBond(m_Index);
2505 x_CheckValid(
"IsBondA()");
2506 return m_Impl->IsBondPartA(m_Index);
2512 x_CheckValid(
"IsBondB()");
2513 return m_Impl->IsBondPartB(m_Index);
2517 pair<CSeq_loc_CI, CSeq_loc_CI>
2520 x_CheckValid(
"GetBondRange()");
2521 pair<size_t, size_t> indexes = m_Impl->GetBondRange(m_Index);
2522 return make_pair(CSeq_loc_CI(*
this, indexes.first),
2523 CSeq_loc_CI(*
this, indexes.second));
2529 return m_Impl->HasEquivSets();
2535 x_CheckValid(
"IsInEquivSet()");
2536 return m_Impl->IsInEquivSet(m_Index);
2542 x_CheckValid(
"GetEquivSetsCount()");
2543 return m_Impl->GetEquivSetsCount(m_Index);
2547 pair<CSeq_loc_CI, CSeq_loc_CI>
2550 x_CheckValid(
"GetEquivSetRange()");
2551 pair<size_t, size_t> indexes = m_Impl->GetEquivSetRange(m_Index, level);
2552 return make_pair(CSeq_loc_CI(*
this, indexes.first),
2553 CSeq_loc_CI(*
this, indexes.second));
2557 pair<CSeq_loc_CI, CSeq_loc_CI>
2560 x_CheckValid(
"GetEquivPartRange()");
2561 pair<size_t, size_t> indexes = m_Impl->GetEquivPartRange(m_Index, level);
2562 return make_pair(CSeq_loc_CI(*
this, indexes.first),
2563 CSeq_loc_CI(*
this, indexes.second));
2569 return GetEmbeddingSeq_loc();
2575 x_CheckValid(
"GetEmbeddingSeq_loc()");
2579 "CSeq_loc_CI::GetSeq_loc(): NULL seq-loc");
2587 x_CheckValid(
"GetRangeAsSeq_loc()");
2590 switch (
info.m_Loc->Which() ) {
2611 return m_Impl && m_Index < m_Impl->GetRanges().size();
2618 x_GetIteratorType() <<
"::" << where <<
": "
2619 "iterator is not valid");
2625 return "CSeq_loc_CI";
2632 return m_Impl->GetRanges()[m_Index];
2638 return m_Impl->GetRanges().size();
2644 if ( pos > GetSize() ) {
2646 x_GetIteratorType() <<
"::SetPos(): "
2647 "position is too big: "<<pos<<
" > "<<GetSize());
2662 : CSeq_loc_CI(loc, eEmpty_Allow, eOrder_Biological)
2681 return m_Impl && m_Index <= m_Impl->GetRanges().size();
2687 return "CSeq_loc_I";
2694 return m_Impl->GetRanges()[m_Index];
2701 info.m_Id =
id.GetSeqId();
2702 info.m_IdHandle = id;
2708 return m_Impl->HasChanges();
2714 return m_Impl->GetEquivMode();
2720 m_Impl->SetEquivMode(
mode);
2726 x_CheckValid(
"Delete()");
2727 m_Impl->DeleteRange(m_Index);
2768 info.m_Range.SetFrom(pos).SetLength(1);
2770 info.SetStrand(strand);
2772 m_Impl->SetPoint(
info);
2785 info.m_Range = range;
2787 info.SetStrand(strand);
2790 info.m_Loc = m_Impl->MakeLocInterval(
info);
2798 x_CheckValid(
"SetSeq_id_Handle()");
2800 if (
info.m_IdHandle !=
id ) {
2802 m_Impl->UpdatePoint(
info);
2809 x_CheckValid(
"SetRange()");
2811 if (
info.m_Range != range ) {
2812 info.m_Range = range;
2813 m_Impl->UpdateLoc(
info);
2820 x_CheckValid(
"SetFrom()");
2822 if (
info.m_Range.GetFrom() != from ) {
2823 info.m_Range.SetFrom(from);
2824 m_Impl->UpdateLoc(
info);
2831 x_CheckValid(
"SetTo()");
2833 if (
info.m_Range.GetTo() != to ) {
2834 info.m_Range.SetTo(to);
2835 m_Impl->UpdateLoc(
info);
2842 x_CheckValid(
"SetPoint()");
2844 if ( !m_Impl->WasPoint(
info) ||
info.m_Range !=
TRange(pos, pos) ) {
2846 if ( m_Impl->WasPoint(
info) ) {
2847 m_Impl->UpdatePoint(
info);
2850 m_Impl->SetPoint(
info);
2858 x_CheckValid(
"ResetStrand()");
2860 if (
info.m_IsSetStrand ) {
2861 info.m_IsSetStrand =
false;
2863 m_Impl->UpdatePoint(
info);
2870 x_CheckValid(
"SetStrand()");
2872 if ( !
info.m_IsSetStrand ||
info.m_Strand != strand ) {
2873 info.SetStrand(strand);
2874 m_Impl->UpdatePoint(
info);
2881 x_CheckValid(
"ResetFuzzFrom()");
2883 if (
info.m_Fuzz.first ) {
2884 info.m_Fuzz.first =
null;
2885 m_Impl->UpdateLoc(
info);
2892 x_CheckValid(
"SetFuzzFrom()");
2894 if ( !
info.m_Fuzz.first || !
info.m_Fuzz.first->Equals(fuzz) ) {
2896 m_Impl->UpdateLoc(
info);
2903 x_CheckValid(
"ResetFuzzTo()");
2905 if (
info.m_Fuzz.second ) {
2906 info.m_Fuzz.second =
null;
2907 m_Impl->UpdateLoc(
info);
2914 x_CheckValid(
"SetFuzzTo()");
2916 if ( !
info.m_Fuzz.second || !
info.m_Fuzz.second->Equals(fuzz) ) {
2918 m_Impl->UpdateLoc(
info);
2925 x_CheckValid(
"ResetFuzz()");
2927 if (
info.m_Fuzz.first ||
info.m_Fuzz.second ) {
2928 info.m_Fuzz.first =
info.m_Fuzz.second =
null;
2929 m_Impl->UpdatePoint(
info);
2936 x_CheckValid(
"SetFuzz()");
2938 if ( !
info.m_Fuzz.first || !
info.m_Fuzz.first->Equals(fuzz) ||
2939 info.m_Fuzz.first !=
info.m_Fuzz.second ) {
2941 m_Impl->UpdatePoint(
info);
2948 return m_Impl->MakeLoc(make_type);
2952 pair<CSeq_loc_I, CSeq_loc_I>
2955 x_CheckValid(
"GetEquivSetRange()");
2956 pair<size_t, size_t> indexes = m_Impl->GetEquivSetRange(m_Index, level);
2957 return make_pair(
CSeq_loc_I(*
this, indexes.first),
2962 pair<CSeq_loc_I, CSeq_loc_I>
2965 x_CheckValid(
"GetEquivPartRange()");
2966 pair<size_t, size_t> indexes = m_Impl->GetEquivPartRange(m_Index, level);
2967 return make_pair(
CSeq_loc_I(*
this, indexes.first),
2974 x_CheckValid(
"RemoveBond()");
2975 m_Impl->RemoveBond(m_Index);
2981 x_CheckValid(
"MakeBondA()");
2982 m_Impl->MakeBondA(m_Index);
2988 x_CheckValid(
"MakeBondAB()");
2989 m_Impl->MakeBondAB(m_Index);
2995 x_CheckValid(
"MakeBondB()");
2996 m_Impl->MakeBondB(m_Index);
3009 id.WriteAsFasta(os);
3022 if ( !last_id || !last_id->
Match(pnt.
GetId()) ) {
3041 last_id = &pnt.
GetId();
3054 if ( !last_id || !last_id->
Match(pnts.
GetId()) ) {
3077 last_id = &pnts.
GetId();
3089 if (!last_id || !last_id->
Match(itval.
GetId())) {
3093 last_id = &itval.
GetId();
3146 (
const CSeq_loc& loc,
3149 bool first =
false);
3173 (
const CSeq_loc& loc,
3190 switch (loc.Which()) {
3197 last_id = &loc.GetEmpty();
3202 last_id = &loc.GetWhole();
3229 if (loc.GetBond().IsSetB()) {
3253 return GetInt().IsPartialStart(ext);
3256 return GetPacked_int().IsPartialStart(ext);
3259 return GetPnt().IsPartialStart(ext);
3262 return GetPacked_pnt().IsPartialStart(ext);
3265 return GetMix().IsPartialStart(ext);
3282 return GetInt().IsPartialStop(ext);
3285 return GetPacked_int().IsPartialStop(ext);
3288 return GetPnt().IsPartialStop(ext);
3291 return GetPacked_pnt().IsPartialStop(ext);
3294 return GetMix().IsPartialStop(ext);
3306 if (
val == IsPartialStart(ext)) {
3312 SetInt().SetPartialStart(
val, ext);
3316 SetPacked_int().SetPartialStart(
val, ext);
3320 SetPnt().SetPartialStart(
val, ext);
3324 SetPacked_pnt().SetPartialStart(
val, ext);
3328 SetMix().SetPartialStart(
val, ext);
3339 if (
val == IsPartialStop(ext)) {
3345 SetInt().SetPartialStop(
val, ext);
3349 SetPacked_int().SetPartialStop(
val, ext);
3353 SetPnt().SetPartialStop(
val, ext);
3357 SetPacked_pnt().SetPartialStop(
val, ext);
3361 SetMix().SetPartialStop(
val, ext);
3374 return GetInt().IsTruncatedStart(ext);
3377 return GetPacked_int().IsTruncatedStart(ext);
3380 return GetPnt().IsTruncatedStart(ext);
3383 return GetPacked_pnt().IsTruncatedStart(ext);
3386 return GetMix().IsTruncatedStart(ext);
3400 return GetInt().IsTruncatedStop(ext);
3403 return GetPacked_int().IsTruncatedStop(ext);
3406 return GetPnt().IsTruncatedStop(ext);
3409 return GetPacked_pnt().IsTruncatedStop(ext);
3412 return GetMix().IsTruncatedStop(ext);
3424 if (
val == IsTruncatedStart(ext)) {
3430 SetInt().SetTruncatedStart(
val, ext);
3434 SetPacked_int().SetTruncatedStart(
val, ext);
3438 SetPnt().SetTruncatedStart(
val, ext);
3442 SetPacked_pnt().SetTruncatedStart(
val, ext);
3446 SetMix().SetTruncatedStart(
val, ext);
3457 if (
val == IsTruncatedStop(ext)) {
3463 SetInt().SetTruncatedStop(
val, ext);
3467 SetPacked_int().SetTruncatedStop(
val, ext);
3471 SetPnt().SetTruncatedStop(
val, ext);
3475 SetPacked_pnt().SetTruncatedStop(
val, ext);
3479 SetMix().SetTruncatedStop(
val, ext);
3520 SetPacked_pnt().SetId(
id);
3544 if (GetBond().IsSetA()) {
3545 SetBond().SetA().SetId(
id);
3547 if (GetBond().IsSetB()) {
3548 SetBond().SetB().SetId(
id);
3554 <<
"unhandled loc type in CSeq_loc::SetId(): e_Feat");
3567 switch ( Which() ) {
3576 return x_UpdateId(
id, &GetEmpty(), may_throw);
3580 return x_UpdateId(
id, &GetWhole(), may_throw);
3585 return x_UpdateId(
id, &loc.
GetId(), may_throw);
3590 return x_UpdateId(
id, &pnt.
GetId(), may_throw);
3598 if ( !x_UpdateId(
id, &loc.
GetId(), may_throw) ) {
3607 return x_UpdateId(
id, &pnts.
GetId(), may_throw);
3615 if ( !(*li)->CheckId(
id, may_throw) ) {
3625 if ( !x_UpdateId(
id, &bond.
GetA().
GetId(), may_throw) ) {
3630 return x_UpdateId(
id, &bond.
GetB().
GetId(), may_throw);
3638 if ( !(*li)->CheckId(
id, may_throw) ) {
3648 "CSeq_loc::CheckId(): "
3649 "unsupported location type: "<<
3650 SelectionName(Which()));
3659 switch ( Which() ) {
3679 mix.
Set().push_back(ival);
3696 switch ( Which() ) {
3710 SetPacked_int().AddInterval(*
self);
3718 new_int->
SetFrom(GetPnt().GetPoint());
3719 new_int->
SetTo(GetPnt().GetPoint());
3720 if (GetPnt().IsSetStrand()) {
3723 if (GetPnt().IsSetFuzz()) {
3724 const CInt_fuzz& fuzz = GetPnt().GetFuzz();
3732 SetPacked_int().AddInterval(*new_int);
3740 vector<CRef<CSeq_loc> > sub_locs;
3741 sub_locs.reserve(GetMix().
Get().
size());
3744 new_sub_loc->
Assign(**orig_sub_loc);
3746 sub_locs.push_back(new_sub_loc);
3750 copy((*sub_loc)->GetPacked_int().Get().begin(),
3751 (*sub_loc)->GetPacked_int().Get().end(),
3752 back_inserter(SetPacked_int().Set()));
3758 "CSeq_loc::ChangeToPackedInt(): "
3759 "Can not convert location to packed-int: "<<
3760 SelectionName(Which()));
3768 SetMix().AddSeqLoc(other);
3776 ChangeToPackedInt();
3777 SetPacked_int().AddInterval(other);
3784 _ASSERT(other.IsInt() || other.IsPacked_int());
3786 ChangeToPackedInt();
3788 if ( other.IsInt() ) {
3789 SetPacked_int().AddInterval(other.GetInt());
3791 SetPacked_int().AddIntervals(other.GetPacked_int());
3799 _ASSERT(other.IsPnt() || other.IsPacked_pnt());
3814 if ( other.IsPnt() ) {
3815 ppnt.
AddPoint(other.GetPnt().GetPoint());
3817 ppnt.
AddPoints(other.GetPacked_pnt().GetPoints());
3822 template<
typename T1,
typename T2>
3836 const CSeq_id* id1 = obj1.CanGetId() ? &obj1.GetId() : 0;
3837 const CSeq_id* id2 = obj2.CanGetId() ? &obj2.GetId() : 0;
3839 if (id1 == 0 && id2 == 0)
return true;
3841 if (id1 == 0 || id2 == 0 || !id1->
Match(*id2) ) {
3848 const CInt_fuzz* f1 = obj1.CanGetFuzz() ? &obj1.GetFuzz() : 0;
3849 const CInt_fuzz* f2 = obj2.CanGetFuzz() ? &obj2.GetFuzz() : 0;
3851 if (f1 == 0 && f2 == 0)
return true;
3853 if (f1 == 0 || f2 == 0 || !f1->
Equals(*f2)) {
3862 bool s_CanAdd(
const CSeq_loc& loc1,
const CSeq_loc& loc2)
3864 switch ( loc1.Which() ) {
3867 switch ( loc2.Which() ) {
3869 return s_CanAdd(loc1.GetPnt(), loc2.GetPnt());
3871 return s_CanAdd(loc1.GetPnt(), loc2.GetPacked_pnt());
3879 switch ( loc2.Which() ) {
3881 return s_CanAdd(loc1.GetPacked_pnt(), loc2.GetPnt());
3883 return s_CanAdd(loc1.GetPacked_pnt(), loc2.GetPacked_pnt());
3902 switch ( Which() ) {
3911 x_ChangeToMix(other);
3917 x_ChangeToMix(other);
3923 x_ChangeToMix(other);
3928 if ( other.IsInt() || other.IsPacked_int() ) {
3929 x_ChangeToPackedInt(other);
3931 x_ChangeToMix(other);
3938 x_ChangeToPackedPnt(other);
3940 x_ChangeToMix(other);
3946 if ( other.IsInt() ) {
3947 SetPacked_int().AddInterval(other.GetInt());
3948 }
else if ( other.IsPacked_int() ) {
3949 SetPacked_int().AddIntervals(other.GetPacked_int());
3951 x_ChangeToMix(other);
3958 if ( other.IsPnt() ) {
3959 SetPacked_pnt().AddPoint(other.GetPnt().GetPoint());
3960 }
else if ( other.IsPacked_pnt() ) {
3961 SetPacked_pnt().AddPoints(other.GetPacked_pnt().GetPoints());
3964 x_ChangeToMix(other);
3970 SetMix().AddSeqLoc(other);
3975 SetEquiv().Add(other);
3980 x_ChangeToMix(other);
3987 "cannot add sub-location to location of type: "<<
3988 SelectionName(Which()));
3995 switch ( Which() ) {
3997 SetInt().FlipStrand();
4000 SetPnt().FlipStrand();
4003 SetPacked_int().FlipStrand();
4006 SetPacked_pnt().FlipStrand();
4009 SetMix().FlipStrand();
4087 else if (old_from == rg.
GetFrom()) {
4091 if (old_to !=
GetTo()) {
4094 else if (old_to == rg.
GetTo()) {
4109 if (old_to !=
GetTo()) {
4119 TFuzz copy_from_cref;
4120 if (copy_from == fuzz) copy_from_cref.
Reset(copy_from);
4126 new_fuzz->
Assign(*copy_from);
4128 fuzz.
Reset(new_fuzz);
4157 switch ( fz.
Which() ) {
4163 bool other_rev =
IsReverse(other_strand);
4182 if ((!this_rev && other_lt) ||
4183 (this_rev && other_gt)) {
4188 if ((!this_rev && other_gt) ||
4189 (this_rev && other_lt)) {
4194 if (other_lim == this_lim) {
4208 new_fuzz->
SetAlt().insert(
4209 new_fuzz->
SetAlt().end(),
4221 if (min1 > min2 || max1 < max2) {
4269 if (
id.IsLocal() &&
id.GetLocal().IsStr()) {
4317 if ( rg1.
Empty() ) {
4335 if ( rg1.
Empty() ) {
4423 if ( !dst.IsMix() ) {
4442 whole->SetWhole(*
id);
4443 dst.SetMix().Set().push_back(
whole);
4449 else if ( rg.
Empty() ) {
4452 empty->SetEmpty(*
id);
4453 dst.SetMix().Set().push_back(
empty);
4479 dst.SetMix().Set().push_back(pnt_loc);
4491 ival.
SetId().Assign(*
id);
4501 dst.SetMix().Set().push_back(int_loc);
4514 dst.SetInt(*interval);
4522 const CSeq_loc& src,
4537 if (next_id && first_id != next_id) {
4539 "Can not merge multi-id seq-loc");
4544 first_strand = it.GetStrand();
4561 dst.SetInt(*interval);
4578 if ( !id_it->first ) {
4587 id->Assign(*id_it->first.GetSeqId());
4588 TRanges& ranges = id_it->second;
4599 bool have_range =
false;
4602 *rg, default_strand,
4609 x_PushRange(dst, id_it->first, last_rg, default_strand);
4615 x_PushRange(dst, id_it->first, last_rg, default_strand);
4623 const CSeq_loc& src,
4631 bool have_range =
false;
4636 if ( have_range && last_id == idh ) {
4652 last_strand = it.GetStrand();
4666 const CSeq_loc& src,
4672 unique_ptr<TIdToRangeMap> pid_map_minus(use_strand ?
4676 *pid_map_minus.get() : id_map_plus;
4690 default_minus = strand;
4692 else if (default_minus != strand) {
4701 default_plus = strand;
4703 else if (default_plus != strand) {
4724 const CSeq_loc& minuend,
4745 if (next_id && first_id != next_id) {
4747 "Can not merge multi-id seq-loc");
4752 first_strand = it.GetStrand();
4767 rg_coll_minus : rg_coll_plus;
4769 if (id_it != rg_coll.
end()) {
4770 it_rg_coll -= id_it->second;
4781 const TFuzzMap& fm_from =
IsReverse(it.GetStrand()) ? fuzz_from_minus : fuzz_from_plus;
4783 if (subtr_fuzz != fm_from.
end()) {
4784 curr_rg.
AddFuzzTo(*subtr_fuzz->second, it.GetStrand());
4786 const TFuzzMap& fm_to =
IsReverse(it.GetStrand()) ? fuzz_to_minus : fuzz_to_plus;
4788 if (subtr_fuzz != fm_to.
end()) {
4789 curr_rg.
AddFuzzFrom(*subtr_fuzz->second, it.GetStrand());
4792 total_rg += curr_rg;
4812 dst.SetInt(*interval);
4823 const CSeq_loc& minuend,
4838 bool have_range =
false;
4848 rg_coll_minus : rg_coll_plus;
4850 list<TRangeWithFuzz> result_ranges;
4851 bool modified =
false;
4852 if (id_it != rg_coll.
end()) {
4856 it_rg_coll -= id_it->second;
4860 result_ranges.push_front(*result_it);
4863 result_ranges.push_back(*result_it);
4871 ITERATE(list<TRangeWithFuzz>, rg_it, result_ranges) {
4881 const TFuzzMap& fm_from =
IsReverse(it.GetStrand()) ? fuzz_from_minus : fuzz_from_plus;
4883 if (subtr_fuzz != fm_from.
end()) {
4884 curr_rg.
AddFuzzTo(*subtr_fuzz->second, it.GetStrand());
4886 const TFuzzMap& fm_to =
IsReverse(it.GetStrand()) ? fuzz_to_minus : fuzz_to_plus;
4888 if (subtr_fuzz != fm_to.
end()) {
4889 curr_rg.
AddFuzzFrom(*subtr_fuzz->second, it.GetStrand());
4892 if ( have_range && last_id == idh ) {
4908 last_strand = it.GetStrand();
4914 bool merged =
false;
4915 if (last_id == idh) {
4928 last_strand = it.GetStrand();
4943 const CSeq_loc& minuend,
4957 unique_ptr<TIdToRangeMap> p_id_map_minus(use_strand ?
4961 *p_id_map_minus.get() : id_map_plus;
4979 id_map_minus[idh] : id_map_plus[idh];
4981 rg_coll_minus : rg_coll_plus;
4983 bool modified =
false;
4984 if (id_it != rg_coll.
end()) {
4988 it_rg_coll -= id_it->second;
5006 const TFuzzMap& fm_from =
IsReverse(it.GetStrand()) ? fuzz_from_minus : fuzz_from_plus;
5008 if (subtr_fuzz != fm_from.
end()) {
5009 curr_rg.
AddFuzzTo(*subtr_fuzz->second, it.GetStrand());
5011 const TFuzzMap& fm_to =
IsReverse(it.GetStrand()) ? fuzz_to_minus : fuzz_to_plus;
5013 if (subtr_fuzz != fm_to.
end()) {
5014 curr_rg.
AddFuzzFrom(*subtr_fuzz->second, it.GetStrand());
5017 rg_map.push_back(curr_rg);
5021 rg_map.push_back(it_range);
5064 unique_ptr<CDummySynonymMapper> p_mapper;
5065 if ( !syn_mapper ) {
5067 syn_mapper = p_mapper.get();
5088 unique_ptr<CDummySynonymMapper> p_mapper;
5089 if ( !syn_mapper ) {
5091 syn_mapper = p_mapper.get();
5096 tmp.SetMix().AddSeqLoc(
const_cast<CSeq_loc&
>(*
this));
5097 tmp.SetMix().AddSeqLoc(
const_cast<CSeq_loc&
>(other));
5116 unique_ptr<CDummySynonymMapper> p_mapper;
5117 if ( !syn_mapper ) {
5119 syn_mapper = p_mapper.get();
5121 unique_ptr<CDummyLengthGetter> p_getter;
5122 if ( !len_getter ) {
5124 len_getter = p_getter.get();
5132 unique_ptr<TIdToRangeColl> p_rg_coll_minus(use_strand ?
5136 *p_rg_coll_minus.get() : rg_coll_plus;
5141 TFuzzMap fuzz_from_plus, fuzz_from_minus, fuzz_to_plus, fuzz_to_minus;
5144 for (CSeq_loc_CI it(other); it; ++it) {
5145 if ( it.IsEmpty() ) {
5150 rg_coll_minus[idh] : rg_coll_plus[idh];
5153 const CInt_fuzz* fuzz = it.GetFuzzFrom();
5155 if (it.IsSetStrand() &&
IsReverse(it.GetStrand())) {
5156 fuzz_from_minus[it.GetRange().GetFrom()].Reset(fuzz);
5159 fuzz_from_plus[it.GetRange().GetFrom()].Reset(fuzz);
5162 fuzz = it.GetFuzzTo();
5164 if (it.IsSetStrand() &&
IsReverse(it.GetStrand())) {
5165 fuzz_to_minus[it.GetRange().GetToOpen()].Reset(fuzz);
5168 fuzz_to_plus[it.GetRange().GetToOpen()].Reset(fuzz);
5176 fuzz_from_plus, fuzz_from_minus, fuzz_to_plus, fuzz_to_minus,
5185 fuzz_from_plus, fuzz_from_minus, fuzz_to_plus, fuzz_to_minus,
5195 fuzz_from_plus, fuzz_from_minus, fuzz_to_plus, fuzz_to_minus,
5214 flags & ~fMerge_SingleRange,
5215 syn_mapper, len_getter.get());
5216 return Subtract(*
tmp,
flags, syn_mapper, len_getter.get());
5222 switch ( Which() ) {
5224 SetInt().SetStrand(strand);
5227 SetPnt().SetStrand(strand);
5230 SetPacked_int().SetStrand(strand);
5233 SetPacked_pnt().SetStrand(strand);
5236 SetMix().SetStrand(strand);
5247 switch ( Which() ) {
5249 SetInt().ResetStrand();
5252 SetPnt().ResetStrand();
5255 SetPacked_int().ResetStrand();
5258 SetPacked_pnt().ResetStrand();
5261 SetMix().ResetStrand();
5273 #undef NCBI_USE_ERRCODE_X
User-defined methods of the data storage class.
bool IsReverse(ENa_strand s)
ESeqLocExtremes
Used to determine the meaning of a location's Start/Stop positions.
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
EIsSetStrand
Flag used by IsSetStrand() to switch between any/all modes.
User-defined methods of the data storage class.
void x_Assign(CInt_fuzz &dst, const CInt_fuzz &src)
int s_CompareIntervals(const Container1 &container1, const Container2 &container2, bool minus_strand, const CSeq_loc::ISubLocFilter *filter)
static void x_RangesToSeq_loc(CSeq_loc &dst, TIdToRangeMap &id_map, ENa_strand default_strand, CSeq_loc::TOpFlags flags)
static bool x_MatchStrand(ENa_strand str1, ENa_strand str2, CSeq_loc::TOpFlags flags)
static void s_GetLabel(const CSeq_id &id, string *label)
map< CSeq_id_Handle_Wrapper, TRanges > TIdToRangeMap
static void x_SubAndSort(CSeq_loc &dst, const CSeq_loc &minuend, const TFuzzMap &fuzz_from_plus, const TFuzzMap &fuzz_from_minus, const TFuzzMap &fuzz_to_plus, const TFuzzMap &fuzz_to_minus, TIdToRangeColl &rg_coll_plus, TIdToRangeColl &rg_coll_minus, ISynonymMapper &syn_mapper, ILengthGetter &len_getter, CSeq_loc::TOpFlags flags)
vector< TRangeWithFuzz > TRanges
static bool s_InsertExpands(size_t idx, size_t start, size_t end)
map< TSeqPos, CConstRef< CInt_fuzz > > TFuzzMap
static void x_MergeNoSort(CSeq_loc &dst, const CSeq_loc &src, CSeq_loc::TOpFlags flags, ISynonymMapper &syn_mapper)
CRangeWithFuzz TRangeWithFuzz
static int s_CompareRanges(const COpenRange< TSeqPos > &x_rng, const COpenRange< TSeqPos > &y_rng, bool minus_strand)
static void x_SubNoSort(CSeq_loc &dst, const CSeq_loc &minuend, const TFuzzMap &fuzz_from_plus, const TFuzzMap &fuzz_from_minus, const TFuzzMap &fuzz_to_plus, const TFuzzMap &fuzz_to_minus, TIdToRangeColl &rg_coll_plus, TIdToRangeColl &rg_coll_minus, ISynonymMapper &syn_mapper, ILengthGetter &len_getter, CSeq_loc::TOpFlags flags)
static CRef< CSeq_id > MakeId(const SSeq_loc_CI_RangeInfo &info)
static void s_ReserveMore(Container &cont, size_t add_size)
static void x_MergeAndSort(CSeq_loc &dst, const CSeq_loc &src, CSeq_loc::TOpFlags flags, ISynonymMapper &syn_mapper)
static bool s_CheckIfMatchesBioseq(const CSeq_loc &loc, const CSeq_loc::ISubLocFilter *filter)
static void AddLoc(CRef< CSeq_loc > &loc, CRef< CSeq_loc > loc2)
map< CSeq_id_Handle_Wrapper, TRangeColl > TIdToRangeColl
CRangeCollection< TSeqPos > TRangeColl
bool s_CanAdd(const T1 &obj1, const T2 &obj2)
static bool x_MergeRanges(TRangeWithFuzz &rg1, ENa_strand str1, const TRangeWithFuzz &rg2, ENa_strand str2, CSeq_loc::TOpFlags flags)
static CRange< TSeqPos > s_LocToRange(const CSeq_loc &loc)
static void x_SingleRange(CSeq_loc &dst, const CSeq_loc &src, ISynonymMapper &syn_mapper)
static void x_PushRange(CSeq_loc &dst, const CSeq_id_Handle_Wrapper &idh, const TRangeWithFuzz &rg, ENa_strand strand)
CLocalRange< TOffset > TRange
define for the fundamental building block of sequence ranges
virtual ~CDummyLengthGetter(void)
virtual TSeqPos GetLength(const CSeq_id &)
virtual CSeq_id_Handle GetBestSynonym(const CSeq_id &id)
CDummySynonymMapper(void)
virtual ~CDummySynonymMapper(void)
void GetLabel(string *label, TSeqPos pos, bool right=true) const
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
void AddPoint(TSeqPos point)
void AddPoints(const TPoints &points)
bool IntersectingWith(const TRange &r) const
void AddFuzzFrom(const CRangeWithFuzz &rg)
void AddFuzzFrom(const CInt_fuzz &fuzz, ENa_strand strand)
CConstRef< CInt_fuzz > TFuzz
bool IsSetFuzzFrom(void) const
CRef< CInt_fuzz > x_SetFuzz(TFuzz &fuzz, const CInt_fuzz *copy_from)
const CInt_fuzz & GetFuzzTo(void) const
void x_AddFuzz(TFuzz &fuzz, const TFuzz &other, ENa_strand other_strand)
const CInt_fuzz & GetFuzzFrom(void) const
bool IsSetFuzzTo(void) const
CRangeWithFuzz(const TParent &rg)
void AddFuzzTo(const CRangeWithFuzz &rg)
void CopyTo(const CRangeWithFuzz &rg)
CRangeWithFuzz(const CSeq_loc_CI &it)
void AddFuzzTo(const CInt_fuzz &fuzz, ENa_strand strand)
void CopyFrom(const CRangeWithFuzz &rg)
bool operator()(const TRangeWithFuzz &rg1, const TRangeWithFuzz &rg2) const
bool operator()(const TRangeWithFuzz &rg1, const TRangeWithFuzz &rg2) const
CSeq_id_Handle_Wrapper(const CSeq_id_Handle &idh, const CSeq_id &id)
const CSeq_id_Handle & GetHandle(void) const
CConstRef< CSeq_id > GetSeqId(void) const
CConstRef< CSeq_id > m_Id
DECLARE_OPERATOR_BOOL(m_Handle)
CSeq_id_Handle_Wrapper(void)
Used as a helper for determining which pieces of a CSeq_loc to compare.
bool IsInBond(size_t idx) const
CRef< CSeq_loc > MakeLocPacked_int(size_t idx_begin, size_t idx_end) const
CSeq_loc_I::EEquivMode m_EquivMode
CRef< CSeq_loc > MakeLoc(CSeq_loc_I::EMakeType make_type) const
void MakeBondB(size_t idx)
pair< size_t, size_t > GetEquivPartRange(size_t idx, size_t level) const
bool IsEnd(size_t idx) const
bool CanBePoint(size_t idx) const
pair< size_t, size_t > GetBondRange(size_t idx) const
void x_AddBondPartB(size_t idx)
void MakeBondAB(size_t idx)
size_t HasEquivBreak(size_t begin, size_t end) const
void RemoveBond(size_t idx)
CRef< CSeq_loc > MakeRangeLoc(const SSeq_loc_CI_RangeInfo &info) const
vector< SSeq_loc_CI_RangeInfo > TRanges
CRef< CSeq_loc > MakeLocOther(const SSeq_loc_CI_RangeInfo &info) const
void x_ProcessLocation(const CSeq_loc &loc)
CConstRef< CSeq_loc > m_Location
CRef< CSeq_loc > MakeLocBond(size_t idx_begin, size_t idx_end) const
vector< SEquivSet > TEquivSets
void x_CreateBond(size_t idx)
bool CanBePoint(const SSeq_loc_CI_RangeInfo &info) const
static void x_SetId(SSeq_loc_CI_RangeInfo &info, const CSeq_id &id)
CRef< CSeq_loc > MakeLocPoint(const SSeq_loc_CI_RangeInfo &info) const
void UpdatePoint(CSeq_point &pnt, const SSeq_loc_CI_RangeInfo &info) const
CSeq_loc_I::EEquivMode GetEquivMode(void) const
bool CanBeBond(size_t idx_begin, size_t idx_end) const
void SetEquivMode(CSeq_loc_I::EEquivMode mode)
bool WasPoint(const SSeq_loc_CI_RangeInfo &info) const
TRanges & GetRanges(void)
void UpdateLoc(SSeq_loc_CI_RangeInfo &info)
const TRanges & GetRanges(void) const
size_t GetBondBegin(size_t idx) const
virtual ~CSeq_loc_CI_Impl(void)
void SetPoint(SSeq_loc_CI_RangeInfo &info)
void x_ProcessInterval(const CSeq_interval &seq_int, const CSeq_loc &loc)
void x_ProcessPoint(const CSeq_point &seq_pnt, const CSeq_loc &loc)
void x_BreakBond(size_t idx)
CSeq_loc_CI_Impl & operator=(const CSeq_loc_CI_Impl &)
set< const SEquivSet * > TUsedEquivs
CRef< CSeq_interval > MakeInterval(const SSeq_loc_CI_RangeInfo &info) const
void DeleteRange(size_t idx)
bool CanBePacked_int(size_t idx_begin, size_t idx_end) const
bool CanBeInterval(const SSeq_loc_CI_RangeInfo &info) const
pair< size_t, size_t > GetEquivSetRange(size_t idx, size_t level) const
bool IsBondPartB(size_t idx) const
bool IsInEquivSet(size_t idx) const
const SEquivSet * FindInnerEquivSet(size_t begin, size_t end, const TUsedEquivs &used_equivs) const
CSeq_loc_CI::EEmptyFlag m_EmptyFlag
CSeq_loc_CI_Impl(const CSeq_loc_CI_Impl &)
void MakeBondA(size_t idx)
bool CanBePacked_pnt(size_t idx_begin, size_t idx_end) const
bool HasEquivSets(void) const
SSeq_loc_CI_RangeInfo::TRange TRange
const SEquivSet & GetEquivSet(size_t idx, size_t level) const
bool ShouldBePoint(const SSeq_loc_CI_RangeInfo &info) const
bool IsBondPartA(size_t idx) const
CRef< CSeq_point > MakePoint(const SSeq_loc_CI_RangeInfo &info) const
bool IsInBond(const SSeq_loc_CI_RangeInfo &info) const
CRef< CInt_fuzz > MakeFuzz(const CInt_fuzz &fuzz) const
CRef< CSeq_loc > MakeLocPacked_pnt(size_t idx_begin, size_t idx_end) const
SSeq_loc_CI_RangeInfo & InsertRange(size_t idx, CSeq_loc::E_Choice type)
size_t GetBondEnd(size_t idx) const
bool CanBeInterval(size_t idx) const
CRef< CSeq_loc > MakeLocInterval(const SSeq_loc_CI_RangeInfo &info) const
size_t GetEquivSetsCount(size_t idx) const
bool HasChanges(void) const
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
void AddSeqLoc(const CSeq_loc &other)
Base class for all serializable objects.
Interface for getting bioseq length.
Interface for mapping IDs to the best synonym.
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
bool operator<(const CEquivRange &A, const CEquivRange &B)
bool operator==(const CEquivRange &A, const CEquivRange &B)
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERASE_ITERATE(Type, Var, Cont)
Non-constant version with ability to erase current element, if container permits.
#define VECTOR_ERASE(Var, Cont)
Use this macro inside body of ERASE_ITERATE cycle to erase from vector-like container.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define INT_ID_TO(T, id)
Convert gi-compatible int to/from other types.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
void Error(CExceptionArgs_Base &args)
TErrCode GetErrCode(void) const
Get error code.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
ESerialRecursionMode
How to assign and compare child sub-objects of serial objects.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
C * SerialClone(const C &src)
Create on heap a clone of the source object.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
@ eShallow
Assign/Compare pointers only.
CConstRef< CSeq_id > GetSeqId(void) const
int CompareOrdered(const CSeq_id &sid2) const
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
void SetRange(const TRange &range)
Set the range.
bool IsBondA(void) const
Return true if current position is A part of a bond.
CRef< CSeq_loc > MakeSeq_loc(EMakeType make_type=eMake_CompactType) const
return constructed CSeq_loc with all changes
void SetTruncatedStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (tl/tr - indicating removed parts of the seq-loc)
void SetPacked_int(TPacked_int &v)
size_t GetEquivSetsCount(void) const
Return number of recursuve equiv parts current position in.
virtual const char * x_GetIteratorType(void) const
void SetFrom(TSeqPos from)
Set the range from position.
void ResetFuzz(void)
Reset fuzz of a point.
bool x_IsValid(void) const
CSeq_loc_CI(void)
constructors
void SetTo(TSeqPos to)
Set the range to position.
CSeq_loc_I InsertPoint(const CSeq_id_Handle &id, TSeqPos pos, ENa_strand strand=eNa_strand_unknown)
Insert new element before the current one (.
void SetPacked_pnt(TPacked_pnt &v)
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
void Delete(void)
Delete current element, and make iterator to point to the next element.
void x_ChangeToPackedPnt(const CSeq_loc &other)
ENa_strand GetStrand(void) const
Get the location's strand.
void x_CheckValidForInsert(const char *where) const
void ChangeToPackedInt(void)
Works only if location is currently an interval, point, packed-int (handled trivially),...
bool x_UpdateId(const CSeq_id *&total_id, const CSeq_id *id, bool may_throw=true) const
CSeq_loc_CI & operator=(const CSeq_loc_CI &iter)
EEmptyFlag
Options for empty locations processing.
void FlipStrand(void)
Flip the strand (e.g. plus to minus)
void MakeBondA(void)
Make bond at current position (only A) The current part must be a point If current posision is alread...
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
bool IsInEquivSet(void) const
Return true if current position is in some equiv part.
CSeq_loc_I(void)
constructors
void ResetStrand(void)
Reset the range strand.
void ResetFuzzTo(void)
Reset fuzz to.
EMakeType
Options for creation modified locations Bond and equiv types are preserved if possible.
void ResetFuzzFrom(void)
Reset fuzz from.
CSeq_loc_CI const_iterator
Make CSeq_loc look like an STL container.
virtual CSeq_id_Handle GetBestSynonym(const CSeq_id &id)=0
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
pair< CSeq_loc_CI, CSeq_loc_CI > GetBondRange(void) const
Return iterators that cover bond of current position result.first is the first segment in the equiv s...
CConstRef< CSeq_loc > GetRangeAsSeq_loc(void) const
Get seq-loc for the current iterator position.
void MakeBondB(void)
Make bond at previous position with the current position (A and B) The current and previous parts mus...
pair< CConstRef< CInt_fuzz >, CConstRef< CInt_fuzz > > m_Fuzz
CRef< CSeq_loc > Merge(TOpFlags flags, ISynonymMapper *syn_mapper) const
All functions create and return a new seq-loc object.
void SetStrand(ENa_strand strand)
Set the range strand.
const CSeq_loc & GetSeq_loc(void) const
void MakeBondAB(void)
Make bond at current position with the next position (A and B) The current and next parts must be poi...
bool HasEquivSets(void) const
Return true if location has equiv parts.
TRange x_CalculateTotalRangeCheckId(const CSeq_id *&id) const
const_iterator end(void) const
const_iterator begin(void) const
void x_ChangeToMix(const CSeq_loc &other)
bool HasChanges(void) const
return true of any part was changed since initialization
int Compare(const CSeq_loc &loc) const
bool IsTruncatedStop(ESeqLocExtremes ext) const
void x_ChangeToPackedInt(const CSeq_interval &other)
int CompareSubLoc(const CSeq_loc &loc, ENa_strand strand, const ISubLocFilter *filter=NULL) const
Compare first-level sub-locations sequentially to order them by biological "complexity".
bool x_IsValidForInsert(void) const
void SetSeq_id_Handle(const CSeq_id_Handle &id)
Set seq_id of the current location.
void SetFuzz(CInt_fuzz &fuzz)
Change fuzz of a point.
void x_SetSeq_id_Handle(SSeq_loc_CI_RangeInfo &info, const CSeq_id_Handle &id)
void SetFuzzTo(CInt_fuzz &fuzz)
Change fuzz to values.
bool IsInBond(void) const
Location of type equiv define set of equivalent locations.
void Add(const CSeq_loc &other)
Simple adding of seq-locs.
void SetPoint(TSeqPos pos)
Set the range from and to positions.
~SSeq_loc_CI_RangeInfo(void)
CRef< CSeq_loc > Subtract(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper, ILengthGetter *len_getter) const
Subtract seq-loc from this, merge/sort resulting ranges depending on flags.
bool operator==(const CSeq_loc_CI &iter) const
bool IsTruncatedStart(ESeqLocExtremes ext) const
check if parts of the seq-loc are missing
bool IsSetStrand(EIsSetStrand flag=eIsSetStrand_Any) const
Check if strand is set for any/all part(s) of the seq-loc depending on the flag.
TSeqPos GetCircularLength(TSeqPos seq_len) const
Special case for circular sequences.
const CSeq_loc & GetEmbeddingSeq_loc(void) const
Get the nearest seq-loc containing the current range.
CSeq_loc_I InsertInterval(const CSeq_id_Handle &id, const TRange &range, ENa_strand strand=eNa_strand_unknown)
Insert new element before the current one (.
pair< CSeq_loc_CI, CSeq_loc_CI > GetEquivSetRange(size_t level=0) const
Return iterators that cover equiv set of current position result.first is the first segment in the eq...
void SetPos(size_t pos)
Set iterator's position.
pair< CSeq_loc_I, CSeq_loc_I > GetEquivPartRange(size_t level=0) const
Return iterators that cover equiv part of current position result.first is the first segment in the e...
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
void PostRead(void) const
Invalidate id/range cache after deserialization.
size_t GetSize(void) const
Get number of ranges.
CSeq_id_Handle m_IdHandle
bool IsBondB(void) const
Return true if current position is B part of a bond.
void ResetStrand(void)
Reset the strand on this location.
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
virtual TSeqPos GetLength(const CSeq_id &id)=0
void x_ThrowNotValid(const char *where) const
virtual const char * x_GetIteratorType(void) const
pair< CSeq_loc_CI, CSeq_loc_CI > GetEquivPartRange(size_t level=0) const
Return iterators that cover equiv part of current position result.first is the first segment in the e...
CSeq_loc_I InsertWhole(const CSeq_id_Handle &id)
Insert new element before the current one (.
const SSeq_loc_CI_RangeInfo & x_GetRangeInfo(void) const
void SetFuzzFrom(CInt_fuzz &fuzz)
Change fuzz from.
void RemoveBond(void)
Remove bond at current position - it may be either A or B part.
CRef< CSeq_loc > Intersect(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper) const
Find the intersection with the seq-loc, merge/sort resulting ranges depending on flags.
bool operator!=(const CSeq_loc_CI &iter) const
EEquivMode
This enum defines a way equiv sets are expanded or created when one of Insert*() methods is called.
CSeq_loc_I InsertEmpty(const CSeq_id_Handle &id)
Insert new element before the current one (.
pair< CSeq_loc_I, CSeq_loc_I > GetEquivSetRange(size_t level=0) const
Return iterators that cover equiv set of current position result.first is the first segment in the eq...
TRange x_UpdateTotalRange(void) const
SSeq_loc_CI_RangeInfo(void)
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
void SetStrand(ENa_strand strand)
Set the strand for all of the location's ranges.
void SetEquivMode(EEquivMode mode)
Change equiv modification mode.
void SetPartialStop(bool val, ESeqLocExtremes ext)
CSeq_loc(void)
constructors
int x_CompareSingleId(const CSeq_loc &loc, const CSeq_id *id1, const CSeq_id *id2, TCompareFlags flags) const
Compare single-id locations, or throw an exception if any location is multi-id.
SSeq_loc_CI_RangeInfo & x_GetRangeInfo(void)
virtual ~CSeq_loc_I(void)
destructor
EEquivMode GetEquivMode(void) const
Get equiv modification mode.
void SetNull(void)
Override all setters to incorporate cache invalidation.
bool IsPartialStop(ESeqLocExtremes ext) const
void SetTruncatedStop(bool val, ESeqLocExtremes ext)
virtual ~CSeq_loc_CI(void)
destructor
CSeq_loc_I InsertNull(void)
Set of Insert*() methods.
CConstRef< CSeq_loc > m_Loc
bool x_CheckId(const CSeq_id *&id, bool may_throw=true) const
TSeqPos GetStop(ESeqLocExtremes ext) const
virtual const char * GetErrCodeString(void) const override
Get error code interpreted as text.
@ eEmpty_Allow
ignore empty locations
@ eMake_PreserveType
use most compact Seq-loc type (default)
@ eEquiv_prepend
If the insertion point is just before any equiv part, including the first one in an equiv,...
@ eEquiv_new_part
New equiv part will be started with the inserted element.
@ eEquiv_new_equiv
A new equiv set will be created, even if the insertion point is already inside of an existing equiv,...
@ eEquiv_append
If the insertion point is just after any equiv part, including the last one in an equiv,...
@ eMultipleId
Seq-loc on multiple ids when one id is required.
@ eNotSet
Seq-loc is not set.
@ eIncomatible
Seq-loc type is incompatible with operation.
@ eBadLocation
Seq-loc is incorrectly formed.
@ eOutOfRange
parameter is out of valid range
@ eBadIterator
Seq-loc iterator is in bad state.
@ eUnsupported
Seq-loc has data that is not supported yet.
TSeqPos GetStop(const CSeq_loc &loc, CScope *scope, ESeqLocExtremes ext=eExtreme_Positional)
If only one CBioseq is represented by CSeq_loc, returns the position at the stop of the location.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
TSeqPos GetStart(const CSeq_loc &loc, CScope *scope, ESeqLocExtremes ext=eExtreme_Positional)
If only one CBioseq is represented by CSeq_loc, returns the position at the start of the location.
sequence::ECompare Compare(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)
Returns the sequence::ECompare containment relationship between CSeq_locs.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
TObjectType * GetPointerOrNull(void) const noexcept
Get pointer value.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void) noexcept
Reset reference object.
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
position_type GetLength(void) const
position_type GetTo(void) const
bool IntersectingWith(const TThisType &r) const
position_type GetToOpen(void) const
position_type GetFrom(void) const
static TThisType GetEmpty(void)
TThisType & operator+=(const TThisType &r)
TThisType & Set(position_type from, position_type to)
TThisType & SetOpen(position_type from, position_type toOpen)
static position_type GetWholeToOpen(void)
static TThisType GetWhole(void)
TParent::position_type position_type
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool operator!=(const CNCBI_IPAddr &lhs, unsigned int rhs)
Compare an address with an IPv4 address in network byte order.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
void SetMin(TMin value)
Assign a value to Min data member.
bool IsLim(void) const
Check if variant Lim is selected.
TRange & SetRange(void)
Select the variant.
TAlt & SetAlt(void)
Select the variant.
TPct GetPct(void) const
Get the variant data.
virtual void Reset(void)
Reset the whole object.
TLim GetLim(void) const
Get the variant data.
TP_m & SetP_m(void)
Select the variant.
TMin GetMin(void) const
Get the Min member data.
void SetMax(TMax value)
Assign a value to Max data member.
E_Choice Which(void) const
Which variant is currently selected.
TLim & SetLim(void)
Select the variant.
const TAlt & GetAlt(void) const
Get the variant data.
TPct & SetPct(void)
Select the variant.
TMax GetMax(void) const
Get the Max member data.
TP_m GetP_m(void) const
Get the variant data.
const TRange & GetRange(void) const
Get the variant data.
@ eLim_tl
space to left of position
@ eLim_tr
space to right of position
@ e_not_set
No variant selected.
@ e_Pct
% plus or minus (x10) 0-1000
@ e_Alt
set of alternatives for the integer
@ e_P_m
plus or minus fixed amount
void SetTo(TTo value)
Assign a value to To data member.
const TFuzz_from & GetFuzz_from(void) const
Get the Fuzz_from member data.
void SetPoint(TPoint value)
Assign a value to Point data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetA(TA &value)
Assign a value to A data member.
bool IsSetId(void) const
WARNING: this used to be optional Check if a value has been assigned to Id data member.
void ResetFuzz_to(void)
Reset Fuzz_to data member.
bool IsMix(void) const
Check if variant Mix is selected.
const TB & GetB(void) const
Get the B member data.
list< CRef< CSeq_interval > > Tdata
ENa_strand
strand of nucleic acid
const Tdata & Get(void) const
Get the member data.
TStrand GetStrand(void) const
Get the Strand member data.
const TId & GetId(void) const
Get the Id member data.
void ResetStrand(void)
Reset Strand data member.
bool IsPacked_pnt(void) const
Check if variant Packed_pnt is selected.
Tdata & Set(void)
Assign a value to data member.
TPoint GetPoint(void) const
Get the Point member data.
const TFuzz_to & GetFuzz_to(void) const
Get the Fuzz_to member data.
void SetId(TId &value)
Assign a value to Id data member.
void SetStrand(TStrand value)
Assign a value to Strand data member.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
TFrom GetFrom(void) const
Get the From member data.
void SetFuzz(TFuzz &value)
Assign a value to Fuzz data member.
bool IsSetFuzz(void) const
Check if a value has been assigned to Fuzz data member.
list< CRef< CSeq_loc > > Tdata
const TFuzz & GetFuzz(void) const
Get the Fuzz member data.
void ResetFuzz(void)
Reset Fuzz data member.
bool CanGetA(void) const
Check if it is safe to call GetA method.
E_Choice Which(void) const
Which variant is currently selected.
const TId & GetId(void) const
Get the Id member data.
const TId & GetId(void) const
Get the Id member data.
void SetFrom(TFrom value)
Assign a value to From data member.
TStrand GetStrand(void) const
Get the Strand member data.
void SetStrand(TStrand value)
Assign a value to Strand data member.
bool IsSetFuzz(void) const
Check if a value has been assigned to Fuzz data member.
const Tdata & Get(void) const
Get the member data.
void ResetFuzz(void)
Reset Fuzz data member.
void SetFuzz(TFuzz &value)
Assign a value to Fuzz data member.
void ResetStrand(void)
Reset Strand data member.
void SetId(TId &value)
Assign a value to Id data member.
const Tdata & Get(void) const
Get the member data.
void ResetFuzz_from(void)
Reset Fuzz_from data member.
TPoints & SetPoints(void)
Assign a value to Points data member.
list< CRef< CSeq_loc > > Tdata
vector< TSeqPos > TPoints
void SetFuzz_to(TFuzz_to &value)
Assign a value to Fuzz_to data member.
void SetFuzz_from(TFuzz_from &value)
Assign a value to Fuzz_from data member.
bool IsPacked_int(void) const
Check if variant Packed_int is selected.
const TA & GetA(void) const
Get the A member data.
bool CanGetB(void) const
Check if it is safe to call GetB method.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
Tdata & Set(void)
Assign a value to data member.
bool IsSetFuzz_to(void) const
Check if a value has been assigned to Fuzz_to data member.
Tdata & Set(void)
Assign a value to data member.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
const TPoints & GetPoints(void) const
Get the Points member data.
TStrand GetStrand(void) const
Get the Strand member data.
TTo GetTo(void) const
Get the To member data.
void SetB(TB &value)
Assign a value to B data member.
bool IsSetFuzz_from(void) const
Check if a value has been assigned to Fuzz_from data member.
void SetStrand(TStrand value)
Assign a value to Strand data member.
void ResetStrand(void)
Reset Strand data member.
const TFuzz & GetFuzz(void) const
Get the Fuzz member data.
const TMix & GetMix(void) const
Get the variant data.
void ResetB(void)
Reset B data member.
bool IsSetB(void) const
other end may not be available Check if a value has been assigned to B data member.
@ eNa_strand_both
in forward orientation
@ e_not_set
No variant selected.
@ e_not_set
No variant selected.
@ e_Equiv
equivalent sets of locations
@ e_Empty
to NULL one Seq-id in a collection
@ e_Feat
indirect, through a Seq-feat
Definition of all error codes used in objects libraries.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is whole
CNcbiMatrix< T > & operator+=(CNcbiMatrix< T > &, const CNcbiMatrix< U > &)
global addition: matrix += matrix
const TYPE & Get(const CNamedParameterList *param)
constexpr auto sort(_Init &&init)
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
ncbi::objects::ENa_strand TStrand
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
bool operator()(const SEquivSet *e1, const SEquivSet *e2) const
size_t GetPartStartIndex(TPart_CI part) const
size_t GetPartEndOffset(TPart_CI part) const
size_t GetStartIndex(void) const
size_t GetElementsCount(void) const
size_t GetPartsCount(void) const
TPart_CI FindPartByElementIndex(size_t idx) const
size_t GetPartStartOffset(TPart_CI part) const
bool Contains(size_t idx) const
size_t GetPartEndIndex(TPart_CI part) const
size_t GetEndIndex(void) const
TPart_I FindPartByElementIndex(size_t idx)
TParts::const_iterator TPart_CI