, m_HasRangeSelection(
false)
67, m_HasObjectSelection(
false)
75 stringfeat_key =
typeid(
CSeq_feat).name();
76 stringalign_key =
typeid(
CSeq_align).name();
77 stringloc_key =
typeid(
CSeq_loc).name();
78 stringid_key =
typeid(
CSeq_id).name();
79 stringvcf_variant_key =
typeid(
CVcfVariant).name();
152sel_id->
Assign(*it->first.GetSeqId());
159 if(it_r->first.NotEmpty()) {
160ranges.push_back(it_r->first);
163 if(! ranges.empty()) {
179 consttype_info&
info=
typeid(obj);
209 consttype_info&
info=
typeid(obj);
244 copy(it->second.begin(), it->second.end(), back_inserter(objs));
319objs.push_back(TR(&**it_feat));
322objs.push_back(TR(&**it_align));
325objs.push_back(TR(&**it_loc));
328objs.push_back(TR(&**it_id));
331objs.push_back(TR(&**it_loc));
334objs.push_back(TR(&**it_vcf_variant));
349 if(&obj1 == &obj2) {
359 consttype_info& info2 =
typeid(obj2);
360 stringname2 = info2.name();
371 case eSeq_id: id2 =
dynamic_cast<const CSeq_id*
>(&obj2);
break;
375 consttype_info& info1 =
typeid(obj1);
376 stringname1 = info1.name();
385feat1 =
dynamic_cast<const CSeq_feat*
>(&obj1);
394align1 =
dynamic_cast<const CSeq_align*
>(&obj1);
401loc1 =
dynamic_cast<const CSeq_loc*
>(&obj1);
410id1 =
dynamic_cast<const CSeq_id*
>(&obj1);
419vcf_variant1 =
dynamic_cast<const CVcfVariant*
>(&obj1);
421 returnvcf_variant1->
WeakMatch(*vcf_variant2);
435 return&feat1 == &feat2 || feat1.
Equals(feat2);
475 return&align1 == &align2 || align1.
Equals(align2);
483 return&loc1 == &loc2 || loc1.
Equals(loc2);
493 for( ; id_it; ++id_it) {
501 if(id_set.
find(id2h) != id_set.
end()) {
508 if(
MatchIdWithId(*iter->GetSeqId(), scope1, id2, scope2)) {
533vector<CSeq_id_Handle> ids1 = scope1.
GetIds(sel_id);
534vector<CSeq_id_Handle> ids2 = scope2.
GetIds(
id);
535 if(ids1.size() == ids2.size()) {
536 sort(ids1.begin(), ids1.end());
537 sort(ids2.begin(), ids2.end());
538 for(
size_t i= 0;
i< ids1.size();
i++ ) {
543}
else return false;
546vector<CSeq_id_Handle> ids1 = scope1.
GetIds(sel_id);
547vector<CSeq_id_Handle> ids2 = scope2.
GetIds(
id);
548 for(
size_t i= 0;
i< ids1.size();
i++ ) {
549 for(
size_tj = 0; j < ids2.size(); j++) {
563 constobjects::CSeq_id_Handle& h_id)
568 returnh_sel_id.MatchesTo(h_id) || h_id.MatchesTo(h_sel_id);
570 returnh_sel_id == h_id;
static CRef< CScope > m_Scope
CConstRef< objects::CSeq_id > m_Id
CRange< TSeqPos > m_Range
vector< CConstRef< objects::CSeq_id > > TIds
static bool MatchIdWithId(const objects::CSeq_id &id1, objects::CScope &scope1, const objects::CSeq_id &id2, objects::CScope &scope2)
static bool sm_MatchByProduct
bool HasRangeSelection() const
Range Selection - represents a collection of selected segments.
static bool MatchAlignWithAlign(const objects::CSeq_align &align1, objects::CScope &scope1, const objects::CSeq_align &align2, objects::CScope &scope2)
static EObjMatchPolicy sm_ObjMatchPolicy
static bool sm_TreeBroadcastOneToOne
Node properties used to compare trees when broadcasting.
bool m_HasObjectSelection
static bool MatchFeatWithId(const objects::CSeq_feat &feat1, objects::CScope &scope1, const objects::CSeq_id &id2, objects::CScope &scope2)
void AddTaxIDSelection(TTaxId tid)
vector< CConstRef< objects::CSeq_loc > > TSeqLocs
static bool sm_InterDocBroadcast
objects::CHandleRangeMap m_RangeMap
vector< CConstRef< objects::CSeq_feat > > TFeats
static bool sm_MatchAlnLocs
void GetAllObjects(TConstObjects &objs) const
void GetOther(TConstObjects &objs) const
static bool sm_AutoBroadcast
void AddRangeSelection(const objects::CSeq_id &id, const TRangeColl &segs)
void GetIndexed(const string &area_name, TConstObjects &objs) const
Get Objects from the private broadcasting area (caller has to make sure output objs is empty)
static bool Match(const CObject &obj1, objects::CScope &scope1, const CObject &obj2, objects::CScope &scope2)
CRef< objects::CScope > m_Scope
static bool MatchFeatWithFeat(const objects::CSeq_feat &feat1, objects::CScope &scope1, const objects::CSeq_feat &feat2, objects::CScope &scope2)
TVcfVariants m_VcfVariants
vector< CConstRef< objects::CSeq_align > > TAligns
static bool MatchLocWithId(const objects::CSeq_loc &loc1, objects::CScope &scope1, const objects::CSeq_id &id2, objects::CScope &scope2)
void GetRangeSelectionAsLocs(TConstObjects &objs) const
static vector< string > sm_TreeBroadcastProperties
broadcast sel. between documents
static EIdMatchPolicy sm_IdMatchPolicy
vector< CConstRef< CIdLoc > > TIdLocs
void AddIndexed(const string &area_name, const CObject &obj)
Add private selection broadcasting info.
static bool MatchFeatWithLoc(const objects::CSeq_feat &feat1, objects::CScope &scope1, const objects::CSeq_loc &loc2, objects::CScope &scope2)
static bool x_SimpleMatch(const objects::CSeq_id_Handle &h_sel_id, const objects::CSeq_id_Handle &h_id)
Matches two ids using current policy; does not consider synonyms.
vector< CConstRef< objects::CVcfVariant > > TVcfVariants
const objects::CHandleRangeMap & GetRangeSelection() const
bool HasObjectSelection()
Object Selection - represents select Objects (such as features, alignments, etc)
static TRawNameToType sm_RawNameToType
bool AddObjectSelection(const CObject &obj)
CSelectionEvent(objects::CScope &scope)
static bool MatchLocWithLoc(const objects::CSeq_loc &loc1, objects::CScope &scope1, const objects::CSeq_loc &loc2, objects::CScope &scope2)
vector< CConstRef< CObject > > TOther
namespace ncbi::objects::
void SelectTaxId(TTaxId tid)
Template class for iteration on objects of class C (non-medifiable version)
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
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Info(CExceptionArgs_Base &args)
static bool GetRangeCollection(const objects::CSeq_id &id, const objects::CHandleRangeMap &map, CRangeCollection< TSeqPos > &ranges)
bool WeakMatch(const CVcfVariant &right) const
vector< CConstRef< CObject > > TConstObjects
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
CPacked_seqint::TRanges TRanges
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
TIds GetIds(const CSeq_id &id, TGetFlags flags=0)
Get "native" bioseq ids without filtering and matching.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
const TLocation & GetLocation(void) const
Get the Location member data.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
const TProduct & GetProduct(void) const
Get the Product member data.
bool CanGetProduct(void) const
Check if it is safe to call GetProduct method.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
@ eNa_strand_both
in forward orientation
constexpr auto sort(_Init &&init)
Defines: CTimeFormat - storage class for time format.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4