NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
Seq_loc.cpp File Reference
#include <ncbi_pch.hpp>
#include <serial/enumvalues.hpp>
#include <objects/general/Int_fuzz.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seqloc/Packed_seqint.hpp>
#include <objects/seqloc/Packed_seqpnt.hpp>
#include <objects/seqloc/Seq_loc_mix.hpp>
#include <objects/seqloc/Seq_loc_equiv.hpp>
#include <objects/seqloc/Seq_bond.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqfeat/Feat_id.hpp>
#include <objects/misc/error_codes.hpp>
#include <util/range_coll.hpp>
#include <objects/seq/seq_id_handle.hpp>
#include <objects/general/Object_id.hpp>
#include <algorithm>
+ Include dependency graph for Seq_loc.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CSeq_loc_CI_Impl
 
struct  CSeq_loc_CI_Impl::SEquivSet
 
struct  CSeq_loc_CI_Impl::PByLevel
 
class  CRangeWithFuzz
 
class  CSeq_id_Handle_Wrapper
 
class  CRange_Less
 
class  CRange_ReverseLess
 
class  CDummySynonymMapper
 
class  CDummyLengthGetter
 

Macros

#define NCBI_USE_ERRCODE_X   Objects_SeqLoc
 

Typedefs

typedef CRangeWithFuzz TRangeWithFuzz
 
typedef vector< TRangeWithFuzzTRanges
 
typedef map< CSeq_id_Handle_Wrapper, TRangesTIdToRangeMap
 
typedef CRangeCollection< TSeqPosTRangeColl
 
typedef map< CSeq_id_Handle_Wrapper, TRangeCollTIdToRangeColl
 
typedef map< TSeqPos, CConstRef< CInt_fuzz > > TFuzzMap
 

Functions

void x_Assign (CInt_fuzz &dst, const CInt_fuzz &src)
 
void x_Assign (CSeq_interval &dst, const CSeq_interval &src)
 
void x_Assign (CSeq_point &dst, const CSeq_point &src)
 
void x_Assign (CPacked_seqint &dst, const CPacked_seqint &src)
 
void x_Assign (CPacked_seqpnt &dst, const CPacked_seqpnt &src)
 
void x_Assign (CSeq_bond &dst, const CSeq_bond &src)
 
void x_Assign (CSeq_loc_mix &dst, const CSeq_loc_mix &src)
 
void x_Assign (CSeq_loc_equiv &dst, const CSeq_loc_equiv &src)
 
static CRange< TSeqPoss_LocToRange (const CSeq_loc &loc)
 
static CRange< TSeqPoss_LocToRange (const CSeq_interval &interval)
 
static bool s_CheckIfMatchesBioseq (const CSeq_loc &loc, const CSeq_loc::ISubLocFilter *filter)
 
static bool s_CheckIfMatchesBioseq (const CSeq_interval &loc, const CSeq_loc::ISubLocFilter *filter)
 
static int s_CompareRanges (const COpenRange< TSeqPos > &x_rng, const COpenRange< TSeqPos > &y_rng, bool minus_strand)
 
template<class Container1 , class Container2 >
int s_CompareIntervals (const Container1 &container1, const Container2 &container2, bool minus_strand, const CSeq_loc::ISubLocFilter *filter)
 
template<class Container >
static void s_ReserveMore (Container &cont, size_t add_size)
 
static bool s_InsertExpands (size_t idx, size_t start, size_t end)
 
static CRef< CSeq_idMakeId (const SSeq_loc_CI_RangeInfo &info)
 
static void AddLoc (CRef< CSeq_loc > &loc, CRef< CSeq_loc > loc2)
 
void s_GetLabel (const CSeq_id &id, string *label)
 
const CSeq_ids_GetLabel (const CSeq_point &pnt, const CSeq_id *last_id, string *label)
 
const CSeq_ids_GetLabel (const CSeq_interval &itval, const CSeq_id *last_id, string *label)
 
const CSeq_ids_GetLabel (const CSeq_loc &loc, const CSeq_id *last_id, string *label, bool first=false)
 
const CSeq_ids_GetLabel (const list< CRef< CSeq_loc > > &loc_list, const CSeq_id *last_id, string *label)
 
template<typename T1 , typename T2 >
bool s_CanAdd (const T1 &obj1, const T2 &obj2)
 
bool s_CanAdd (const CSeq_loc &loc1, const CSeq_loc &loc2)
 
static bool x_MatchStrand (ENa_strand str1, ENa_strand str2, CSeq_loc::TOpFlags flags)
 
static bool x_MergeRanges (TRangeWithFuzz &rg1, ENa_strand str1, const TRangeWithFuzz &rg2, ENa_strand str2, CSeq_loc::TOpFlags flags)
 
static void x_PushRange (CSeq_loc &dst, const CSeq_id_Handle_Wrapper &idh, const TRangeWithFuzz &rg, ENa_strand strand)
 
static void x_SingleRange (CSeq_loc &dst, const CSeq_loc &src, ISynonymMapper &syn_mapper)
 
static void x_RangesToSeq_loc (CSeq_loc &dst, TIdToRangeMap &id_map, ENa_strand default_strand, CSeq_loc::TOpFlags flags)
 
static void x_MergeNoSort (CSeq_loc &dst, const CSeq_loc &src, CSeq_loc::TOpFlags flags, ISynonymMapper &syn_mapper)
 
static void x_MergeAndSort (CSeq_loc &dst, const CSeq_loc &src, CSeq_loc::TOpFlags flags, ISynonymMapper &syn_mapper)
 
static void x_SingleRange (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)
 
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 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)
 

Variables

 BEGIN_LOCAL_NAMESPACE
 
 END_LOCAL_NAMESPACE
 

Macro Definition Documentation

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Objects_SeqLoc

Definition at line 58 of file Seq_loc.cpp.

Typedef Documentation

◆ TFuzzMap

Definition at line 4696 of file Seq_loc.cpp.

◆ TIdToRangeColl

Definition at line 4280 of file Seq_loc.cpp.

◆ TIdToRangeMap

Definition at line 4278 of file Seq_loc.cpp.

◆ TRangeColl

Definition at line 4279 of file Seq_loc.cpp.

◆ TRanges

typedef vector<TRangeWithFuzz> TRanges

Definition at line 4277 of file Seq_loc.cpp.

◆ TRangeWithFuzz

Definition at line 4276 of file Seq_loc.cpp.

Function Documentation

◆ AddLoc()

static void AddLoc ( CRef< CSeq_loc > &  loc,
CRef< CSeq_loc loc2 
)
static

◆ MakeId()

static CRef<CSeq_id> MakeId ( const SSeq_loc_CI_RangeInfo info)
static

◆ s_CanAdd() [1/2]

bool s_CanAdd ( const CSeq_loc loc1,
const CSeq_loc loc2 
)

◆ s_CanAdd() [2/2]

template<typename T1 , typename T2 >
bool s_CanAdd ( const T1 &  obj1,
const T2 &  obj2 
)

Definition at line 3799 of file Seq_loc.cpp.

References eNa_strand_unknown, CSerialObject::Equals(), and CSeq_id::Match().

Referenced by CSeq_loc::Add(), and s_CanAdd().

◆ s_CheckIfMatchesBioseq() [1/2]

static bool s_CheckIfMatchesBioseq ( const CSeq_interval loc,
const CSeq_loc::ISubLocFilter filter 
)
inlinestatic

Definition at line 716 of file Seq_loc.cpp.

References CSeq_interval_Base::GetId().

◆ s_CheckIfMatchesBioseq() [2/2]

static bool s_CheckIfMatchesBioseq ( const CSeq_loc loc,
const CSeq_loc::ISubLocFilter filter 
)
inlinestatic

Definition at line 709 of file Seq_loc.cpp.

References CSeq_loc::GetId().

Referenced by s_CompareIntervals().

◆ s_CompareIntervals()

template<class Container1 , class Container2 >
int s_CompareIntervals ( const Container1 &  container1,
const Container2 &  container2,
bool  minus_strand,
const CSeq_loc::ISubLocFilter filter 
)

Definition at line 757 of file Seq_loc.cpp.

References NULL, s_CheckIfMatchesBioseq(), s_CompareRanges(), and s_LocToRange().

Referenced by CSeq_loc::CompareSubLoc().

◆ s_CompareRanges()

static int s_CompareRanges ( const COpenRange< TSeqPos > &  x_rng,
const COpenRange< TSeqPos > &  y_rng,
bool  minus_strand 
)
inlinestatic

◆ s_GetLabel() [1/5]

void s_GetLabel ( const CSeq_id id,
string label 
)
inline

Definition at line 3006 of file Seq_loc.cpp.

References label.

Referenced by CSeq_loc::GetLabel(), and s_GetLabel().

◆ s_GetLabel() [2/5]

const CSeq_id* s_GetLabel ( const CSeq_interval itval,
const CSeq_id last_id,
string label 
)
inline

◆ s_GetLabel() [3/5]

const CSeq_id * s_GetLabel ( const CSeq_loc loc,
const CSeq_id last_id,
string label,
bool  first = false 
)

◆ s_GetLabel() [4/5]

const CSeq_id* s_GetLabel ( const CSeq_point pnt,
const CSeq_id last_id,
string label 
)
inline

◆ s_GetLabel() [5/5]

const CSeq_id* s_GetLabel ( const list< CRef< CSeq_loc > > &  loc_list,
const CSeq_id last_id,
string label 
)
inline

Definition at line 3106 of file Seq_loc.cpp.

References first(), ITERATE, label, and s_GetLabel().

◆ s_InsertExpands()

static bool s_InsertExpands ( size_t  idx,
size_t  start,
size_t  end 
)
inlinestatic

Definition at line 1687 of file Seq_loc.cpp.

◆ s_LocToRange() [1/2]

static CRange<TSeqPos> s_LocToRange ( const CSeq_interval interval)
inlinestatic

Definition at line 703 of file Seq_loc.cpp.

References CSeq_interval_Base::GetFrom(), and CSeq_interval_Base::GetTo().

◆ s_LocToRange() [2/2]

static CRange<TSeqPos> s_LocToRange ( const CSeq_loc loc)
inlinestatic

Definition at line 688 of file Seq_loc.cpp.

References COpenRange< Position >::GetEmpty(), and CSeq_loc::GetTotalRange().

Referenced by s_CompareIntervals().

◆ s_ReserveMore()

template<class Container >
static void s_ReserveMore ( Container &  cont,
size_t  add_size 
)
static

Definition at line 1431 of file Seq_loc.cpp.

References max().

Referenced by CSeq_loc_CI_Impl::x_ProcessLocation().

◆ x_Assign() [1/8]

void x_Assign ( CInt_fuzz dst,
const CInt_fuzz src 
)
inline

◆ x_Assign() [2/8]

void x_Assign ( CPacked_seqint dst,
const CPacked_seqint src 
)
inline

Definition at line 269 of file Seq_loc.cpp.

References CPacked_seqint_Base::Get(), i, ITERATE, CPacked_seqint_Base::Set(), and x_Assign().

◆ x_Assign() [3/8]

void x_Assign ( CPacked_seqpnt dst,
const CPacked_seqpnt src 
)
inline

◆ x_Assign() [4/8]

void x_Assign ( CSeq_bond dst,
const CSeq_bond src 
)
inline

◆ x_Assign() [5/8]

void x_Assign ( CSeq_interval dst,
const CSeq_interval src 
)
inline

◆ x_Assign() [6/8]

void x_Assign ( CSeq_loc_equiv dst,
const CSeq_loc_equiv src 
)
inline

Definition at line 326 of file Seq_loc.cpp.

References CSeq_loc_equiv_Base::Get(), i, ITERATE, and CSeq_loc_equiv_Base::Set().

◆ x_Assign() [7/8]

void x_Assign ( CSeq_loc_mix dst,
const CSeq_loc_mix src 
)
inline

Definition at line 314 of file Seq_loc.cpp.

References CSeq_loc_mix_Base::Get(), i, ITERATE, and CSeq_loc_mix_Base::Set().

◆ x_Assign() [8/8]

void x_Assign ( CSeq_point dst,
const CSeq_point src 
)
inline

◆ x_MatchStrand()

static bool x_MatchStrand ( ENa_strand  str1,
ENa_strand  str2,
CSeq_loc::TOpFlags  flags 
)
inlinestatic

Definition at line 4326 of file Seq_loc.cpp.

References flags, CSeq_loc::fStrand_Ignore, and IsReverse().

Referenced by x_MergeRanges().

◆ x_MergeAndSort()

static void x_MergeAndSort ( CSeq_loc dst,
const CSeq_loc src,
CSeq_loc::TOpFlags  flags,
ISynonymMapper syn_mapper 
)
static

◆ x_MergeNoSort()

static void x_MergeNoSort ( CSeq_loc dst,
const CSeq_loc src,
CSeq_loc::TOpFlags  flags,
ISynonymMapper syn_mapper 
)
static

◆ x_MergeRanges()

static bool x_MergeRanges ( TRangeWithFuzz rg1,
ENa_strand  str1,
const TRangeWithFuzz rg2,
ENa_strand  str2,
CSeq_loc::TOpFlags  flags 
)
static

◆ x_PushRange()

static void x_PushRange ( CSeq_loc dst,
const CSeq_id_Handle_Wrapper idh,
const TRangeWithFuzz rg,
ENa_strand  strand 
)
static

◆ x_RangesToSeq_loc()

static void x_RangesToSeq_loc ( CSeq_loc dst,
TIdToRangeMap id_map,
ENa_strand  default_strand,
CSeq_loc::TOpFlags  flags 
)
static

◆ x_SingleRange() [1/2]

static void x_SingleRange ( 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 
)
static

◆ x_SingleRange() [2/2]

static void x_SingleRange ( CSeq_loc dst,
const CSeq_loc src,
ISynonymMapper syn_mapper 
)
static

◆ x_SubAndSort()

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 
)
static

◆ x_SubNoSort()

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

Variable Documentation

◆ BEGIN_LOCAL_NAMESPACE

BEGIN_LOCAL_NAMESPACE

Definition at line 682 of file Seq_loc.cpp.

◆ END_LOCAL_NAMESPACE

END_LOCAL_NAMESPACE

Definition at line 802 of file Seq_loc.cpp.

Modified on Thu Feb 29 12:20:44 2024 by modify_doxy.py rev. 669887