55 template<
typename TFeatList>
62 cds_list.reserve(feat_list.size() / 2);
63 mrna_list.reserve(feat_list.size() / 2);
66 for (
auto& feat_it : feat_list) {
67 const CSeq_feat& feature = feat_it.GetOriginalFeature();
84 if (cds_list.empty() || mrna_list.empty())
87 auto mrna_begin = mrna_list.begin();
89 size_t compare_attempts = 0;
90 for (
auto& cds_it : cds_list)
103 while (mrna_begin != mrna_list.end() &&
104 (**mrna_begin).maxpos() < cds_match.
minpos())
107 for (
auto mrna_it = mrna_begin;
108 mrna_it != mrna_list.end() &&
109 (**mrna_it).minpos() <= cds_match.
maxpos() &&
110 cds_match.
minpos() <= (**mrna_it).maxpos();
120 mrna_match.
AddCDS(cds_match);
163 vector < CRef<CMatchCDS> >::iterator cds_it =
166 if (!(*cds_it)->HasmRNA()) {
203 vector < CRef<CMatchCDS> >::iterator cds_it =
206 if (!(*cds_it)->HasmRNA()) {
240 vector < CRef<CMatchCDS> >::const_iterator cds_it =
m_UnderlyingCDSs.begin();
269 vector < CRef<CMatchmRNA> >::iterator mrna_it =
272 if (!(*mrna_it)->IsAccountedFor()) {
274 match.Reset(*mrna_it);
300 vector < CRef<CMatchmRNA> >::iterator mrna_it =
302 vector < string > product_list;
304 if (!(*mrna_it)->IsAccountedFor()) {
306 if ((*mrna_it)->GetFeat().IsSetProduct()) {
308 (*mrna_it)->GetFeat().GetProduct().GetLabel(&
label);
309 product_list.push_back(
label);
315 if (product_list.size() > 1) {
316 stable_sort(product_list.begin(), product_list.end());
317 vector < string >::iterator s1 = product_list.begin();
318 vector < string >::iterator s2 = s1;
320 while (s2 != product_list.end()) {
360 vector < CRef<CMatchmRNA> >::iterator mrna_it =
m_mRNAList.begin();
361 for (; mrna_it !=
m_mRNAList.end(); ++mrna_it) {
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
vector< CRef< CMatchmRNA > > m_OverlappingmRNAs
void AddmRNA(CMatchmRNA &mrna)
CRef< CMatchmRNA > m_AssignedMrna
void SetXrefMatch(CMatchmRNA &mrna)
int GetNummRNA(bool &loc_unique)
const CSeq_feat & GetFeat() const
CMatchFeat(const CMappedFeat &feat)
CConstRef< CSeq_feat > m_feat
vector< CRef< CMatchCDS > > m_UnderlyingCDSs
bool MatchesUnderlyingCDS(unsigned int partial_type) const
void SetAccountedFor(bool val)
void SetCDS(const CSeq_feat &cds)
bool IsAccountedFor() const
CConstRef< CSeq_feat > m_Cds
bool MatchAnyUnderlyingCDS(unsigned int partial_type) const
void AddCDS(CMatchCDS &cds)
ESubtype GetSubtype(void) const
namespace ncbi::objects::
int Compare(const CSeq_feat &f2) const
Compare relative order of this feature and feature f2, ordering first by features' coordinates,...
vector< CRef< CMatchCDS > > m_CdsList
CRef< CMatchmRNA > FindMatchmRNA(const CMappedFeat &mrna)
bool MatchmRNAToCDSEnd(const CMappedFeat &mrna, unsigned int partial_type)
void SetBioseq(const std::vector< CMappedFeat > *feat_list, CScope *scope)
vector< CRef< CMatchmRNA > > m_mRNAList
Include a standard set of the NCBI C++ Toolkit most basic headers.
void s_SetUpXrefPairs(vector< CRef< CMatchCDS > > &cds_list, vector< CRef< CMatchmRNA > > &mrna_list, const TFeatList &feat_list, CScope *scope, ENoteCDS eNoteCDS)
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
TSeqPos GetStop(ESeqLocExtremes ext) const
Int8 TestForOverlapEx(const CSeq_loc &loc1, const CSeq_loc &loc2, EOverlapType type, CScope *scope=0, TOverlapFlags flags=fOverlap_Default)
Updated version of TestForOverlap64().
@ eOverlap_SubsetRev
1st is a subset of 2nd ranges
@ eOverlap_CheckIntRev
1st is a subset of 2nd with matching boundaries
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static const char label[]
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
const TExcept_text & GetExcept_text(void) const
Get the Except_text member data.
bool IsSetExcept_text(void) const
explain if except=TRUE Check if a value has been assigned to Except_text data member.
bool IsRna(void) const
Check if variant Rna is selected.
constexpr auto sort(_Init &&init)
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.
bool operator()(const CRef< _T > &l, const CRef< _T > &r) const