CSeq_loc Class Reference
[Seq-loc Management]

Represents ASN.1 type Seq-loc defined in file seqloc.asn

Search Toolkit Book for CSeq_loc

#include <Seq_loc.hpp>

Inheritance diagram for CSeq_loc:

Inheritance graph
[legend]
Collaboration diagram for CSeq_loc:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 71 of file Seq_loc.hpp.

Public Types

typedef CSeq_loc_Base Tparent
typedef CPacked_seqpnt_Base::TPoints TPoints
typedef CPacked_seqint_Base::Tdata TIntervals
typedef CSeq_loc_mix_Base::Tdata TLocations
typedef CSeq_id TId
typedef ENa_strand TStrand
typedef TSeqPos TPoint
typedef CPacked_seqint::TRanges TRanges
typedef CRange< TSeqPosTRange
 See related functions in util/sequence.hpp:.
typedef int TOpFlags
enum  EOpFlags {
  fStrand_Ignore = 1<<0, fMerge_Contained = 1<<1, fMerge_AbuttingOnly = 1<<2, fMerge_Abutting = fMerge_AbuttingOnly | fMerge_Contained,
  fMerge_OverlappingOnly = 1<<3, fMerge_Overlapping = fMerge_OverlappingOnly | fMerge_Contained, fMerge_All = fMerge_Abutting | fMerge_Overlapping, fMerge_SingleRange = 1<<4,
  fSort = 1<<5, fSortAndMerge_All = fSort | fMerge_All
}
 CSeq_loc operations. More...

Public Member Functions

 CSeq_loc (void)
 constructors
 CSeq_loc (E_Choice index)
 CSeq_loc (TId &id, TPoint point, TStrand strand=eNa_strand_unknown)
 CSeq_loc (TId &id, const TPoints &points, TStrand strand=eNa_strand_unknown)
 CSeq_loc (TId &id, TPoint from, TPoint to, TStrand strand=eNa_strand_unknown)
 CSeq_loc (TId &id, TRanges ivals, TStrand strand=eNa_strand_unknown)
virtual ~CSeq_loc (void)
TRange GetTotalRange (void) const
void InvalidateTotalRangeCache (void)
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.
ENa_strand GetStrand (void) const
 Get the location's strand.
bool IsReverseStrand (void) const
 Return true if all ranges have reverse strand.
void FlipStrand (void)
 Flip the strand (e.g. plus to minus).
void SetStrand (ENa_strand strand)
 Set the strand for all of the location's ranges.
void ResetStrand (void)
 Reset the strand on this location.
TSeqPos GetStart (ESeqLocExtremes ext) const
 Return start and stop positions of the seq-loc.
TSeqPos GetStop (ESeqLocExtremes ext) const
TSeqPos GetCircularLength (TSeqPos seq_len) const
 Special case for circular sequences.
void GetLabel (string *label) const
 Appends a label suitable for display (e.g., error messages) label must point to an existing string object Method just returns if label is null.
bool IsPartialStart (ESeqLocExtremes ext) const
 check start or stop of location for e_Lim fuzz
bool IsPartialStop (ESeqLocExtremes ext) const
void SetPartialStart (bool val, ESeqLocExtremes ext)
 set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
void SetPartialStop (bool val, ESeqLocExtremes ext)
bool IsTruncatedStart (ESeqLocExtremes ext) const
 check if parts of the seq-loc are missing
bool IsTruncatedStop (ESeqLocExtremes ext) const
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 SetTruncatedStop (bool val, ESeqLocExtremes ext)
const CSeq_idGetId (void) const
 Get the id of the location return NULL if has multiple ids or no id at all.
void CheckId (const CSeq_id *&id) const
 check that the 'id' field in all parts of the location is the same as the specifies id.
void InvalidateIdCache (void)
void SetId (CSeq_id &id)
 set the 'id' field in all parts of this location
void SetId (const CSeq_id &id)
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one.
int Compare (const CSeq_loc &loc) const
 Compare locations if they are defined on the same single sequence or throw exception.
void Add (const CSeq_loc &other)
 Simple adding of seq-locs.
void ChangeToMix (void)
void ChangeToPackedInt (void)
 Works only if location is currently an interval, point, packed-int (handled trivially), or a mix built recursively from these.
CRef< CSeq_locMerge (TOpFlags flags, ISynonymMapper *syn_mapper) const
 Merge ranges depending on flags, return a new seq-loc object.
CRef< CSeq_locAdd (const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper) const
 Add seq-loc, merge/sort resulting ranges depending on flags.
CRef< CSeq_locSubtract (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.
CRef< CSeq_locIntersect (const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper) const
 Find the intersection with the seq-loc, merge/sort resulting ranges depending on flags.

Private Types

enum  { kDirtyCache = -2, kSeveralIds = -3 }

Private Member Functions

 CSeq_loc (const CSeq_loc &)
CSeq_locoperator= (const CSeq_loc &)
TRange x_UpdateTotalRange (void) const
TRange x_CalculateTotalRangeCheckId (const CSeq_id *&id) const
void x_CheckId (const CSeq_id *&id) const
void x_UpdateId (const CSeq_id *&total_id, const CSeq_id *id) const
void x_ChangeToMix (const CSeq_loc &other)
void x_ChangeToPackedInt (const CSeq_interval &other)
void x_ChangeToPackedInt (const CSeq_loc &other)
void x_ChangeToPackedPnt (const CSeq_loc &other)
void x_InvalidateCache (void)

Private Attributes

TRange m_TotalRangeCache
const CSeq_idm_IdCache


Member Typedef Documentation

typedef CSeq_id CSeq_loc::TId
 

Definition at line 78 of file Seq_loc.hpp.

typedef CPacked_seqint_Base::Tdata CSeq_loc::TIntervals
 

Definition at line 76 of file Seq_loc.hpp.

typedef CSeq_loc_mix_Base::Tdata CSeq_loc::TLocations
 

Definition at line 77 of file Seq_loc.hpp.

typedef int CSeq_loc::TOpFlags
 

Definition at line 244 of file Seq_loc.hpp.

typedef CSeq_loc_Base CSeq_loc::Tparent
 

Reimplemented from CSeq_loc_Base.

Reimplemented in CRef_ext, and CRef_ext_Base.

Definition at line 74 of file Seq_loc.hpp.

typedef TSeqPos CSeq_loc::TPoint
 

Definition at line 80 of file Seq_loc.hpp.

typedef CPacked_seqpnt_Base::TPoints CSeq_loc::TPoints
 

Definition at line 75 of file Seq_loc.hpp.

typedef CRange<TSeqPos> CSeq_loc::TRange
 

See related functions in util/sequence.hpp:.

TSeqPos GetLength(const CSeq_loc&, CScope*) bool IsOneBioseq(const CSeq_loc&, CScope*) const CSeq_id& GetId(const CSeq_loc&, CScope*) TSeqPos GetStart(const CSeq_loc&, CScope*) sequence::ECompare Compare(const CSeq_loc&, CSeq_loc&, CScope*) sequence::SeqLocMerge(...)

Definition at line 104 of file Seq_loc.hpp.

typedef CPacked_seqint::TRanges CSeq_loc::TRanges
 

Definition at line 81 of file Seq_loc.hpp.

typedef ENa_strand CSeq_loc::TStrand
 

Definition at line 79 of file Seq_loc.hpp.


Member Enumeration Documentation

anonymous enum [private]
 

Enumerator:
kDirtyCache 
kSeveralIds 

Definition at line 288 of file Seq_loc.hpp.

enum CSeq_loc::EOpFlags
 

CSeq_loc operations.

Flags for operations: fStrand_Ignore - if set, strands will be ignored and any ranges may be merged/sorted. If not set, ranges on plus and minus strands are treated as different sub-sets. In some operations strand may still be checked (see fMerge_Abutting and order of ranges).

NOTE: merge flags do not sort ranges, so only overlaps bewtween neighbor ranges can be detected. To merge all overlappig ranges add fSort flag. The only exception is fSortAndMerge_All which already includes fSort;

fMerge_Contained - merges (removes) any range which is completely contained in another range. fMerge_Abutting - merge abutting ranges. Also forces merging of contained ranges. Even if fStrand_Ignore is set, only the ranges with the correct order are merged (e.g. loc2.to == loc1.from must be true if loc1.strand is minus). fMerge_Overlapping - merge overlapping ranges. Also forces merging of contained ranges. fMerge_All - merge any ranges if possible (contained, overlapping, abutting). The flag does not force sorting, so only neighbor ranges can be merged. To sort ranges before merging add fSort flag or use fSortAndMerge_All. fSortAndMerge_All - combination of fSort and fMerge_All. fMerge_SingleRange - creates a single range, covering all original ranges. Strand is set to the first strand in the original seq-loc, regardless of the strand flag.

fSort - forces sorting of the resulting ranges. All ranges on the same ID are grouped together, but the order of IDs is undefined. Strand is reset to plus and minuns (in strand-preserve mode) or unknown (in strand-ignore mode). NULLs are always merged to a single NULL. The order of locations for each ID is: NULL, whole, empty, plus strand intervals, minus strand intervals.

Enumerator:
fStrand_Ignore 
fMerge_Contained 
fMerge_AbuttingOnly 
fMerge_Abutting 
fMerge_OverlappingOnly 
fMerge_Overlapping 
fMerge_All 
fMerge_SingleRange 
fSort 
fSortAndMerge_All 

Definition at line 232 of file Seq_loc.hpp.


Constructor & Destructor Documentation

CSeq_loc::CSeq_loc E_Choice  index  ) 
 

Definition at line 63 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CSeq_loc_Base::SetBond(), CSeq_loc_Base::SetEmpty(), CSeq_loc_Base::SetEquiv(), CSeq_loc_Base::SetFeat(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetNull(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), CSeq_loc_Base::SetWhole(), and x_InvalidateCache().

CSeq_loc::CSeq_loc TId id,
TPoint  point,
TStrand  strand = eNa_strand_unknown
 

Definition at line 129 of file Seq_loc.cpp.

References CSeq_loc_Base::SetPnt(), and x_InvalidateCache().

CSeq_loc::CSeq_loc TId id,
const TPoints points,
TStrand  strand = eNa_strand_unknown
 

Definition at line 136 of file Seq_loc.cpp.

References CSeq_loc_Base::SetPnt(), and x_InvalidateCache().

CSeq_loc::CSeq_loc TId id,
TPoint  from,
TPoint  to,
TStrand  strand = eNa_strand_unknown
 

Definition at line 147 of file Seq_loc.cpp.

References CSeq_loc_Base::SetInt(), and x_InvalidateCache().

CSeq_loc::CSeq_loc TId id,
TRanges  ivals,
TStrand  strand = eNa_strand_unknown
 

Definition at line 154 of file Seq_loc.cpp.

References CSeq_loc_Base::SetInt(), and x_InvalidateCache().

CSeq_loc::~CSeq_loc void   )  [virtual]
 

Definition at line 167 of file Seq_loc.cpp.

CSeq_loc::CSeq_loc const CSeq_loc  )  [private]
 


Member Function Documentation

CRef< CSeq_loc > CSeq_loc::Add const CSeq_loc other,
TOpFlags  flags,
ISynonymMapper syn_mapper
const
 

Add seq-loc, merge/sort resulting ranges depending on flags.

Return a new seq-loc object.

Definition at line 2561 of file Seq_loc.cpp.

References CSeq_loc(), fMerge_SingleRange, fSort, auto_ptr< X >::get(), auto_ptr< X >::reset(), CSeq_loc_Base::SetMix(), x_MergeAndSort(), x_MergeNoSort(), and x_SingleRange().

void CSeq_loc::Add const CSeq_loc other  ) 
 

Simple adding of seq-locs.

Definition at line 1759 of file Seq_loc.cpp.

References Assign(), CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::IsInt(), CSeq_loc_Base::IsPacked_int(), s_CanAdd(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::Which(), x_ChangeToMix(), x_ChangeToPackedInt(), x_ChangeToPackedPnt(), and x_InvalidateCache().

Referenced by CCompareSeqRegions::NextComparisonGroup(), Seq_loc_Add(), and Seq_locs_Merge().

void CSeq_loc::Assign const CSerialObject source,
ESerialRecursionMode  how = eRecursive
[virtual]
 

Set object to copy of another one.

Reimplemented from CSerialObject.

Definition at line 318 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CSerialObject::GetThisTypeInfo(), CSeq_loc_Base::Reset(), CSeq_loc_Base::SetBond(), CSeq_loc_Base::SetEmpty(), CSeq_loc_Base::SetEquiv(), CSeq_loc_Base::SetFeat(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetNull(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), CSeq_loc_Base::SetWhole(), x_Assign(), and x_InvalidateCache().

Referenced by Add(), CProSplign::CImplementation::FindGlobalAlignment(), and CValidError_imp::PostErr().

void CSeq_loc::ChangeToMix void   ) 
 

Definition at line 1527 of file Seq_loc.cpp.

References CSeq_loc_mix::AddSeqLoc(), CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Packed_int, eShallow, NON_CONST_ITERATE, CSeq_loc_mix_Base::Set(), CSeq_loc_Base::SetMix(), and CSeq_loc_Base::Which().

Referenced by x_ChangeToMix(), and x_PushRange().

void CSeq_loc::ChangeToPackedInt void   ) 
 

Works only if location is currently an interval, point, packed-int (handled trivially), or a mix built recursively from these.

Definition at line 1564 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Pnt, eUnknown, GetId(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPnt(), GetStrand(), IsSetStrand(), ITERATE, NCBI_THROW, CSeq_loc_Base::SetPacked_int(), size, and CSeq_loc_Base::Which().

Referenced by x_ChangeToPackedInt().

void CSeq_loc::FlipStrand void   ) 
 

Flip the strand (e.g. plus to minus).

Definition at line 1854 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

TSeqPos CSeq_loc::GetCircularLength TSeqPos  seq_len  )  const
 

Special case for circular sequences.

No ID is checked for circular locations. If the sequence is not circular (seq_len == kInvalidSeqPos) the function works like GetTotalRange()

Definition at line 668 of file Seq_loc.cpp.

References eExtreme_Biological, COpenRange< Position >::GetLength(), GetStart(), GetStop(), GetTotalRange(), IsReverseStrand(), and kInvalidSeqPos.

void CSeq_loc::GetLabel string *  label  )  const
 

Appends a label suitable for display (e.g., error messages) label must point to an existing string object Method just returns if label is null.

Note this label is NOT GenBank-style.

Definition at line 1367 of file Seq_loc.cpp.

References s_GetLabel().

Referenced by CSeq_locFormatter::Add(), GetIdStartStopStrandStr(), CIdMapper::MapErrorString(), CValidError_imp::PostErr(), s_GetFeatDesc(), CCompareFeats::s_GetLocLabel(), s_SeqLocHasAccession(), CGeneOverlapProcess::SeqLocString(), SeqLocString(), CXcompareAnnotsApplication::x_ProcessComparison(), and CValidError_feat::x_ValidateCdregionCodebreak().

TSeqPos CSeq_loc::GetStart ESeqLocExtremes  ext  )  const
 

Return start and stop positions of the seq-loc.

Stop may be less than Start for circular sequences.

Definition at line 566 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, eExtreme_Biological, eUnknown, CSeq_loc_Base::GetBond(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), COpenRange< Position >::GetWhole(), IsReverseStrand(), kInvalidSeqPos, NCBI_THROW, and CSeq_loc_Base::Which().

Referenced by CValidError_bioseq::CheckForPubOnBioseq(), GetCircularLength(), GetStart(), CAliToSeq_align::NucPosOut(), printed_range(), s_BuildMaskedRanges(), and CCompareSeq_locs::x_CompareInts().

TSeqPos CSeq_loc::GetStop ESeqLocExtremes  ext  )  const
 

Definition at line 617 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, eExtreme_Biological, eUnknown, CSeq_loc_Base::GetBond(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), COpenRange< Position >::GetWhole(), IsReverseStrand(), kInvalidSeqPos, NCBI_THROW, and CSeq_loc_Base::Which().

Referenced by CValidError_bioseq::CheckForPubOnBioseq(), GetCircularLength(), CAliToSeq_align::NucPosOut(), printed_range(), CCompareSeq_locs::x_CompareInts(), and CAutoDef::x_GetFeatureClauses().

ENa_strand CSeq_loc::GetStrand void   )  const
 

Get the location's strand.

If no strand is set, returns eNa_strand_unknown. If different strands are set in different parts, returns eNa_strand_other. Explicitly set unknown strand is ignored when combined whith plus or minus strand. Examples: not-set = unknown not-set + plus = plus unknown + plus = plus unknown + both = other plus + minus = other

Definition at line 533 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, eNa_strand_both, eNa_strand_unknown, eUnknown, CSeq_loc_Base::GetBond(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), NCBI_THROW, CSeq_loc_Base::SelectionName(), and CSeq_loc_Base::Which().

Referenced by CBlastSeqVectorOM::CBlastSeqVectorOM(), ChangeToPackedInt(), CStdSegHit::CStdSegHit(), CStdSegHit::HasAlignment(), IsReverseStrand(), CAliToSeq_align::MakeSeq_align(), CAliToSeq_align::NucPosOut(), s_LocationStrandsIncompatible(), CAutoDefFeatureClause::SameStrand(), CAliToSeq_align::SetExonBioEnd(), CAliToSeq_align::SetExonBioStart(), CFeatGlyph::x_DrawRuler(), and CHitMatrixDataSource::x_GoodSeg().

CRef< CSeq_loc > 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.

Return a new seq-loc object.

Definition at line 2657 of file Seq_loc.cpp.

References fMerge_SingleRange, auto_ptr< X >::get(), and Subtract().

bool CSeq_loc::IsPartialStart ESeqLocExtremes  ext  )  const
 

check start or stop of location for e_Lim fuzz

Definition at line 1122 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), and CSeq_loc_Base::Which().

Referenced by s_PartialsSame(), SetPartialStart(), CSeqTranslator::Translate(), CValidError_feat::ValidateIntron(), CCleanup_imp::x_FrameFromSeqLoc(), and CPromote::x_PromoteCdregion().

bool CSeq_loc::IsPartialStop ESeqLocExtremes  ext  )  const
 

Definition at line 1151 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), and CSeq_loc_Base::Which().

Referenced by s_PartialsSame(), SetPartialStop(), CValidError_feat::ValidateIntron(), and CPromote::x_PromoteCdregion().

bool CSeq_loc::IsSetStrand EIsSetStrand  flag = eIsSetStrand_Any  )  const
 

Check if strand is set for any/all part(s) of the seq-loc depending on the flag.

Definition at line 509 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::GetBond(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), and CSeq_loc_Base::Which().

Referenced by ChangeToPackedInt().

bool CSeq_loc::IsTruncatedStart ESeqLocExtremes  ext  )  const
 

check if parts of the seq-loc are missing

Definition at line 1246 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), and CSeq_loc_Base::Which().

Referenced by SetTruncatedStart().

bool CSeq_loc::IsTruncatedStop ESeqLocExtremes  ext  )  const
 

Definition at line 1272 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), and CSeq_loc_Base::Which().

Referenced by SetTruncatedStop().

CRef< CSeq_loc > CSeq_loc::Merge TOpFlags  flags,
ISynonymMapper syn_mapper
const
 

Merge ranges depending on flags, return a new seq-loc object.

Optional synonym mapper may be provided to detect and convert synonyms of a bioseq. Length getter is used by Subtract() to calculate real sequence length.

Definition at line 2538 of file Seq_loc.cpp.

References CSeq_loc(), fMerge_SingleRange, fSort, auto_ptr< X >::get(), auto_ptr< X >::reset(), x_MergeAndSort(), x_MergeNoSort(), and x_SingleRange().

Referenced by Seq_loc_Merge().

CSeq_loc& CSeq_loc::operator= const CSeq_loc  )  [private]
 

void CSeq_loc::ResetStrand void   ) 
 

Reset the strand on this location.

Definition at line 2695 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

void CSeq_loc::SetId CSeq_id id  ) 
 

set the 'id' field in all parts of this location

Definition at line 1374 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Bond, CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Equiv, CSeq_loc_Base::e_Feat, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CSeq_loc_Base::GetBond(), LOG_POST_X, NON_CONST_ITERATE, CSeq_loc_Base::SetBond(), CSeq_loc_Base::SetEmpty(), CSeq_loc_Base::SetEquiv(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), CSeq_loc_Base::SetWhole(), CSeq_loc_Base::Which(), and x_InvalidateCache().

Referenced by BOOST_AUTO_TEST_CASE(), CSeqTextWidget::GetVisibleRange(), s_CreateKmerCounts(), and SetId().

void CSeq_loc::SetPartialStart bool  val,
ESeqLocExtremes  ext
 

set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)

Definition at line 1180 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, IsPartialStart(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

void CSeq_loc::SetPartialStop bool  val,
ESeqLocExtremes  ext
 

Definition at line 1213 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, IsPartialStop(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

void CSeq_loc::SetStrand ENa_strand  strand  ) 
 

Set the strand for all of the location's ranges.

Definition at line 2670 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

void CSeq_loc::SetTruncatedStart bool  val,
ESeqLocExtremes  ext
 

set / remove e_Lim fuzz on start or stop (tl/tr - indicating removed parts of the seq-loc)

Definition at line 1298 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, IsTruncatedStart(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

void CSeq_loc::SetTruncatedStop bool  val,
ESeqLocExtremes  ext
 

Definition at line 1331 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, IsTruncatedStop(), CSeq_loc_Base::SetInt(), CSeq_loc_Base::SetMix(), CSeq_loc_Base::SetPacked_int(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CSeq_loc_Base::Which().

CRef< CSeq_loc > 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.

Return a new seq-loc object.

Definition at line 2588 of file Seq_loc.cpp.

References CSeq_loc(), fStrand_Ignore, auto_ptr< X >::get(), and auto_ptr< X >::reset().

Referenced by Intersect(), and Seq_loc_Subtract().

CSeq_loc::TRange CSeq_loc::x_CalculateTotalRangeCheckId const CSeq_id *&  id  )  const [private]
 

Definition at line 398 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CPacked_seqint_Base::Get(), CSeq_loc_Base::GetEmpty(), COpenRange< Position >::GetEmpty(), CSeq_interval_Base::GetFrom(), CPacked_seqpnt_Base::GetId(), CSeq_point_Base::GetId(), CSeq_interval_Base::GetId(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), CSeq_point_Base::GetPoint(), CPacked_seqpnt_Base::GetPoints(), CSeq_interval_Base::GetTo(), COpenRange< Position >::GetWhole(), CSeq_loc_Base::GetWhole(), ITERATE, pi, pos, COpenRange< Position >::Set(), CSeq_loc_Base::Which(), and x_UpdateId().

Referenced by x_UpdateTotalRange().

void CSeq_loc::x_ChangeToMix const CSeq_loc other  )  [private]
 

Definition at line 1629 of file Seq_loc.cpp.

References ChangeToMix(), and CSeq_loc_Base::SetMix().

Referenced by Add().

void CSeq_loc::x_ChangeToPackedInt const CSeq_loc other  )  [private]
 

Definition at line 1645 of file Seq_loc.cpp.

References _ASSERT, ChangeToPackedInt(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::IsInt(), CSeq_loc_Base::IsPacked_int(), and CSeq_loc_Base::SetPacked_int().

void CSeq_loc::x_ChangeToPackedInt const CSeq_interval other  )  [private]
 

Definition at line 1636 of file Seq_loc.cpp.

References _ASSERT, ChangeToPackedInt(), CSeq_loc_Base::IsInt(), and CSeq_loc_Base::SetPacked_int().

Referenced by Add().

void CSeq_loc::x_ChangeToPackedPnt const CSeq_loc other  )  [private]
 

Definition at line 1660 of file Seq_loc.cpp.

References _ASSERT, CSeq_loc_Base::IsPacked_pnt(), CSeq_loc_Base::IsPnt(), CSeq_loc_Base::SetPacked_pnt(), CSeq_loc_Base::SetPnt(), and CPacked_seqpnt_Base::SetStrand().

Referenced by Add().

void CSeq_loc::x_CheckId const CSeq_id *&  id  )  const [private]
 

Definition at line 1441 of file Seq_loc.cpp.

References CSeq_loc_Base::e_Empty, CSeq_loc_Base::e_Int, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_not_set, CSeq_loc_Base::e_Null, CSeq_loc_Base::e_Packed_int, CSeq_loc_Base::e_Packed_pnt, CSeq_loc_Base::e_Pnt, CSeq_loc_Base::e_Whole, CSeq_loc_mix_Base::Get(), CPacked_seqint_Base::Get(), CSeq_loc_Base::GetEmpty(), CPacked_seqpnt_Base::GetId(), GetId(), CSeq_point_Base::GetId(), CSeq_interval_Base::GetId(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetMix(), CSeq_loc_Base::GetPacked_int(), CSeq_loc_Base::GetPacked_pnt(), CSeq_loc_Base::GetPnt(), CSeq_loc_Base::GetWhole(), ITERATE, CSeq_loc_Base::Which(), and x_UpdateId().

Referenced by CheckId().

void CSeq_loc::x_UpdateId const CSeq_id *&  total_id,
const CSeq_id id
const [private]
 

Definition at line 380 of file Seq_loc.cpp.

References CSerialObject::Equals(), eUnknown, id, and NCBI_THROW.

Referenced by CheckId(), x_CalculateTotalRangeCheckId(), and x_CheckId().

CSeq_loc::TRange CSeq_loc::x_UpdateTotalRange void   )  const [private]
 

Definition at line 366 of file Seq_loc.cpp.

References COpenRange< Position >::GetFrom(), COpenRange< Position >::GetToOpen(), id, kDirtyCache, m_IdCache, m_TotalRangeCache, COpenRange< Position >::SetFrom(), COpenRange< Position >::SetToOpen(), and x_CalculateTotalRangeCheckId().

Referenced by GetTotalRange().


Member Data Documentation

const CSeq_id* CSeq_loc::m_IdCache [mutable, private]
 

Definition at line 295 of file Seq_loc.hpp.

Referenced by CheckId(), InvalidateIdCache(), SetId(), and x_UpdateTotalRange().

TRange CSeq_loc::m_TotalRangeCache [mutable, private]
 

Definition at line 293 of file Seq_loc.hpp.

Referenced by GetTotalRange(), InvalidateTotalRangeCache(), and x_UpdateTotalRange().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 14:08:41 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:23:58 2009 by modify_doxy.py rev. 173732