fCmp_Unknown = 1 << 0,
60fCmp_Incomplete = 1 << 1,
61fCmp_NoOverlap = 1 << 2,
62fCmp_RegionOverlap = 1 << 3,
63fCmp_Overlap = 1 << 4,
65fCmp_Superset = 1 << 6,
66fCmp_intsMissing_internal = 1 << 7,
67fCmp_intsExtra_internal = 1 << 8,
68fCmp_intsMissing_3p = 1 << 9,
69fCmp_intsExtra_3p = 1 << 10,
70fCmp_intsMissing_5p = 1 << 11,
71fCmp_intsExtra_5p = 1 << 12,
72fCmp_3pExtension = 1 << 13,
73fCmp_3pTruncation = 1 << 14,
74fCmp_5pExtension = 1 << 15,
75fCmp_5pTruncation = 1 << 16,
76fCmp_StrandDifferent = 1 << 17,
77fCmp_FuzzDifferent = 1 << 18,
90fCmp_IgnoreStrand = 1 << 0,
99: m_exon_ordinal1(pos1), m_exon_ordinal2(pos2), m_result(
result), m_position_comparison(pos_comparison) {}
118m_loc1->Assign(loc1);
120m_loc2->Assign(loc2);
121 if( m_flags & fCmp_IgnoreStrand ) {
122m_loc1->ResetStrand();
123m_loc2->ResetStrand();
131this->m_cachedOverlapValues =
false;
139 returnGetOverlap(eOverlap_vs_Union);
145 returnGetOverlap(eOverlap_vs_Shorter);
151 if(!m_cachedOverlapValues) {
152x_ComputeOverlapValues();
158 caseeOverlap_vs_Union:
159denom = m_len_seqloc1 + m_len_seqloc2 - m_len_seqloc_overlap;
161 caseeOverlap_vs_Shorter:
162denom =
static_cast<TSeqPos>(
std::min(m_len_seqloc1, m_len_seqloc2));
164 caseeOverlap_vs_First:
165denom = m_len_seqloc1;
167 caseeOverlap_vs_Second:
168denom = m_len_seqloc2;
172 return(denom == 0) ? 0.0 : (
static_cast<double>(m_len_seqloc_overlap) / denom);
177 if(!m_cachedOverlapValues) {
178x_ComputeOverlapValues();
181score = m_shared_sites_score;
182 if(loc1_intervals) {
183*loc1_intervals = m_loc1_interval_count;
185 if(loc2_intervals) {
186*loc2_intervals = m_loc2_interval_count;
192TCompareLocsFlags GetResult(
string* str_out =
NULL)
const;
217 stringGetEvidenceString()
const;
222 returnm_IntComparisons;
234: m_first(0, 0, fCmp_Unknown, 0)
235, m_last(0, 0, fCmp_Unknown, 0)
236, m_isReverse(isReverse)
242 return!(m_first.m_exon_ordinal1 == 0 && m_first.m_exon_ordinal2 == 0 && m_last.m_exon_ordinal1 == 0 && m_last.m_exon_ordinal2 == 0);
255 if(
r.m_position_comparison == m_last.m_position_comparison
256&&
r.m_result == m_last.m_result
257&& ((!m_isReverse &&
r.m_exon_ordinal1 == m_last.m_exon_ordinal1 + 1)
258|| (m_isReverse &&
r.m_exon_ordinal1 == m_last.m_exon_ordinal1 - 1)
259|| (
r.m_exon_ordinal1 == 0 && m_last.m_exon_ordinal1 == 0))
260&& ((!m_isReverse &&
r.m_exon_ordinal2 == m_last.m_exon_ordinal2 + 1)
261|| (m_isReverse &&
r.m_exon_ordinal2 == m_last.m_exon_ordinal2 - 1)
262|| (
r.m_exon_ordinal2 == 0 && m_last.m_exon_ordinal2 == 0)))
286partially_matched(0),
296 inline unsigned extra_internal()
const{
returnextra - (extra_3p + extra_5p); }
315 voidx_ComputeOverlapValues()
const;
354,
doublemapped_identity
361, m_feat1_mapped_loc(&feat1_mapped_loc)
362, m_feat1_self_loc(&feat1_self_loc)
365, m_feat2_self_loc(&feat2_self_loc)
367, m_compare(new
CCompareSeq_locs(feat1_mapped_loc, feat2_self_loc, scope2))
369, m_mapped_identity(mapped_identity)
376,
doublemapped_identity
380, m_feat1_mapped_loc(&feat1_mapped_loc)
381, m_feat1_self_loc(&feat1_self_loc)
384, m_mapped_identity(mapped_identity)
390, m_feat2_self_loc(&feat2_self_loc)
393, m_mapped_identity(mapped_identity)
404 returnm_mapped_identity;
411&& m_feat1->CanGetData()
412&& m_feat2->CanGetData()
413&& (m_feat1->GetData().GetSubtype() == m_feat2->GetData().GetSubtype());
419&& m_feat1->CanGetData()
420&& m_feat2->CanGetData()
421&& (m_feat1->GetData().Which() == m_feat2->GetData().Which());
447 stringgene_label =
"";
460 bool IsMatch()
const{
return!m_feat1.IsNull() && !m_feat2.IsNull();}
491eScore_SymmetricPctOverlap
492, eScore_Feat1PctOverlap
493, eScore_Feat2PctOverlap
497fSelectBest = (1<<0),
498fMergeExons = (1<<1),
499fDifferentGenesOnly = (1<<2),
500fCreateSentinelGenes = (1<<3),
501fSameTypeOnly = (1<<4)
515,
EScoreMethodscore_method = eScore_SymmetricPctOverlap)
516: m_loc_q(&query_loc)
520, m_selector_q(q_sel)
521, m_selector_t(t_sel)
522, m_target_id(&target_id)
523, m_comp_options(options)
524, m_score_method(score_method)
525, m_loc_q_ci(*m_scope_q, *m_loc_q, q_sel)
526, m_already_processed_unmatched_targets(
false)
534t_id->
Assign(target_id);
535t_whole_loc->
SetInt().SetId(*t_id);
536t_whole_loc->
SetInt().SetFrom(0);
543q_whole_loc->
SetInt().SetId(*q_id);
544q_whole_loc->
SetInt().SetFrom(0);
548m_self_mapper_q.Reset(
new CSeq_loc_Mapper(*q_whole_loc, *q_whole_loc, m_scope_q));
549m_self_mapper_t.Reset(
new CSeq_loc_Mapper(*t_whole_loc, *t_whole_loc, m_scope_t));
551m_seen_targets.clear();
557m_seen_targets.clear();
567 static ints_GetGeneId(
const CSeq_feat& feat);
573 boolmerge_single_range);
CCompareFeats represens a result of comparison of two features.
CConstRef< CSeq_loc > m_feat1_self_loc
CConstRef< CSeq_feat > GetFeatQ() const
CCompareFeats(const CSeq_feat &feat1, const CSeq_loc &feat1_mapped_loc, double mapped_identity, const CSeq_loc &feat1_self_loc, CScope *scope1)
No matching feat2.
CConstRef< CSeq_loc > GetSelfLocT() const
bool IsSameSubtype() const
CCompareFeats(const CSeq_feat &feat1, const CSeq_loc &feat1_mapped_loc, double mapped_identity, const CSeq_loc &feat1_self_loc, CScope *scope1, const CSeq_feat &feat2, const CSeq_loc &feat2_self_loc, CScope *scope2)
CConstRef< CSeq_feat > m_feat1
CConstRef< CSeq_loc > GetMappedLocQ() const
void SetIrrelevance(int val)
CConstRef< CSeq_loc > m_feat1_mapped_loc
CConstRef< CCompareSeq_locs > GetComparison() const
static string s_GetLocLabel(const CSeq_loc &loc, bool merged=false)
CRef< CCompareSeq_locs > m_compare
CConstRef< CSeq_loc > GetSelfLocQ() const
CConstRef< CSeq_loc > m_feat2_self_loc
CConstRef< CSeq_feat > GetFeatT() const
static string s_GetFeatLabel(const CSeq_feat &gene_feat, feature::TFeatLabelFlags type=feature::fFGL_Both)
CConstRef< CSeq_feat > m_feat2
CCompareFeats(const CSeq_feat &feat2, const CSeq_loc &feat2_self_loc, double mapped_identity, CScope *scope2)
No matching feat1.
int GetIrrelevance() const
double GetMappedIdentity() const
Compare multiple feature annotations on the specified seq_locs.
CCompareSeqRegions(const CSeq_loc &query_loc, CScope *q_scope, CScope *t_scope, ILocMapper &mapper, const SAnnotSelector &q_sel, const SAnnotSelector &t_sel, const CSeq_id &target_id, TComparisonOptions options=fSelectBest|fMergeExons, EScoreMethod score_method=eScore_SymmetricPctOverlap)
const CSeq_loc & GetQueryLoc() const
CRef< CSeq_loc_Mapper > m_self_mapper_q
const SAnnotSelector & m_selector_q
bool m_already_processed_unmatched_targets
EScoreMethod m_score_method
CConstRef< CSeq_id > m_target_id
TComparisonOptions & SetOptions()
TComparisonOptions m_comp_options
CRef< CSeq_loc_Mapper > m_self_mapper_t
TComparisonOptions GetOptions() const
std::set< std::string > m_seen_targets
const SAnnotSelector & m_selector_t
CRef< ILocMapper > m_mapper
CConstRef< CSeq_loc > m_loc_q
CCompareSeq_locs is used for comparing locations of two features on the same coordinate system It is ...
double GetRelativeOverlap() const
Relative overlap is defined as ratio of the length of the overlap to the length of the shorter featur...
@ eOverlap_vs_Shorter
overlap versus the shorter of the two features
@ eOverlap_vs_Union
overlap versus the union of the two features
@ eOverlap_vs_First
overlap versus the first of the two features
vector< SIntervalComparisonResult > m_IntComparisons
TSeqPos m_len_seqloc_overlap
void GetSplicingSimilarity(float &score, int *loc1_intervals=NULL, int *loc2_intervals=NULL) const
int m_loc1_interval_count
float m_shared_sites_score
CCompareSeq_locs(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope2, TCompareFlags flags=fCmp_Defaults)
const vector< SIntervalComparisonResult > & GetIndividualComparisons() const
Return the vector of individual exon comparisons.
int m_loc2_interval_count
bool m_cachedOverlapValues
double GetSymmetricalOverlap() const
Symmetrical overlap is defined as length(intersection(loc1, loc2) / (length(loc1) + length(loc2)) int...
@ fCmp_Match
all junctions match (fuzz-agnostic)
void Reset()
Reset cached comparison results.
double GetOverlap(EOverlapMethod method) const
Calculate overlap according to the specified method.
namespace ncbi::objects::
CNcbiOstream & operator<<(CNcbiOstream &out, const CEquivRange &range)
std::ofstream out("events_result.xml")
main entry point for tests
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
string GetLabel(const CSeq_id &id)
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
int TFeatLabelFlags
binary OR of FFeatLabelFlags
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,...
CRef< CSeq_loc > Seq_loc_Merge(const CSeq_loc &loc, CSeq_loc::TOpFlags flags, CScope *scope)
Merge ranges in the seq-loc.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_XALGOSEQ_EXPORT
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
unsigned missing_internal() const
unsigned extra_internal() const
unsigned partially_matched
This helper struct is used to accumulate the neighboring comparisons of the same class,...
bool Add(const SIntervalComparisonResult &r)
if the comparison is neighboring and of the same class, set the terminal compariosn to it and return ...
void Reset(const SIntervalComparisonResult &r)
SIntervalComparisonResult m_last
SIntervalComparisonResultGroup(bool isReverse)
SIntervalComparisonResult m_first
SIntervalComparisonResult()
bool missing_second() const
int m_position_comparison
SIntervalComparisonResult(unsigned pos1, unsigned pos2, FCompareLocs result, int pos_comparison=0)
bool missing_first() const
string ToString(const wxRect &rc)
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