148 const char* label_prefix =
NULL);
153 const char* label_prefix =
NULL);
174 int level,
const string& title);
258 const char* label_prefix =
NULL);
309 const CSeq_feat& c_feat = (*iter)->GetFeature();
312 if (
x_IsDbref(
"CCDS", (*c_iter)->GetFeature())) {
333 bool has_rna =
false;
334 bool has_cds =
false;
337 const CSeq_feat& c_feat = (*iter)->GetFeature();
340 if (!(*iter)->GetChildren().empty()) {
351 return has_rna && !has_cds;
358 const CSeq_feat& c_feat = (*iter)->GetFeature();
359 if ( (c_feat.
GetData().
IsRna() && !(*iter)->GetChildren().empty()) ||
438 TJobToken token,
int max_feat,
440 const string& extra_filter)
445 max_feat, LinkedFeat,
449 if (!extra_filter.empty()) {
450 if (!filter.empty()) filter +=
" and ";
451 filter += extra_filter;
453 job->SetFilter(filter);
492 "Feature",
m_Handle, lm_feat_sel, m_feat_sel, lm_token,
493 main_token, landmark_feat,
range, window,
507 "Calculate feature histogram", objs,
508 range, window, token));
547 const CSeq_id&
id =
dynamic_cast<const CSeq_id&
>(
object.object.GetObject());
556 static string sid(
"seqgraphic_feature_ds_type");
563 static string slabel(
"Graphical View Feature Data Source Type");
656 , m_FeatLimit(max_feat)
657 , m_LinkedFeat(LinkedFeatDisplay)
666 if (sortby.empty()) {
671 size_t found = sortby.find_first_of(
'|');
674 if (found != string::npos) {
675 sort_str = sortby.substr(found + 1);
705 if (iter->IsNamed()) {
706 if (iter->GetName().find(
"@@") == string::npos) {
724 if (iter->IsNamed()) {
725 if (iter->GetName().find(
"@@") == string::npos) {
740 for ( ; feature_iter; ++feature_iter) {
784 (*iter)->GetChildren().clear();
800 _ASSERT(feat_groups.size() == 1);
819 _ASSERT(feat_groups.size() == 1);
849 data->GetData(the_map);
852 annots =
m_Sel.GetIncludedAnnotsNames();
853 for(
const auto& annot : annots) {
854 if(annot.IsNamed()) {
855 result->m_Desc = annot.GetName();
876 vector<TSeqRange> ranges;
877 data->GetData(
m_Range, ranges);
882 for (
const auto&
r : ranges) {
887 annots =
m_Sel.GetIncludedAnnotsNames();
888 for(
const auto& annot : annots) {
889 if(annot.IsNamed()) {
890 result->m_Desc = annot.GetName();
914 bool glyph_created =
false;
920 if (!glyph_created) {
971 result->m_ObjectList.swap(objs);
976 if (has_coverage_graph) {
995 result->m_ObjectList.swap(objs);
1003 }
catch (std::exception& ex) {
1017 bool passed =
false;
1018 CLinkedFeature::TLinkedFeats::iterator p_iter =
features.begin();
1024 bool is_leaf = (*p_iter)->GetChildren().empty();
1029 filter.
Pass(&(*p_iter)->GetMappedFeature())) {
1045 feat_groups.clear();
1054 feat_groups.emplace_back(
m_Sorter->GroupIdxToName(grp_iter->first), grp_iter->second);
1063 CLinkedFeature::TLinkedFeats::iterator p_iter = feats.begin();
1064 while (p_iter != feats.end()) {
1069 bool is_leaf = (*p_iter)->GetChildren().empty();
1070 int idx =
m_Sorter->GetGroupIdx((*p_iter)->GetMappedFeature());
1073 if ( !is_leaf &&
m_Sorter->ChildFeatureFirst() ) {
1078 size_t grp_num = child_group_map.
size();
1084 p_feat->GetChildren() = grp_iter->second;
1085 group_map[grp_iter->first].push_back(p_feat);
1088 }
else if (idx > -1 || grp_num == 1) {
1091 idx = child_group_map.
begin()->first;
1097 group_map[idx].push_back(*p_iter);
1101 p_iter = feats.
erase(p_iter);
1114 bool need_group =
features.size() > 1;
1120 if ( !glyph )
continue;
1122 size_t num_children = (*iter)->GetChildren().size();
1130 if (num_children == 0 ) {
1176 for (; feature_iter ; ++feature_iter) {
1182 objs.push_back(glyph);
1192 const char* label_prefix )
1198 }
catch (std::exception&) {
1203 if (loc_obj.
GetId()) {
1204 loc.
Reset(&loc_obj);
1212 auto GetCDSFrame = [&]() {
1256 auto offset = GetCDSFrame();
1257 if (
nullptr != parent_glyph) {
1280 static unsigned id_num{ 0 };
1282 auto offset = GetCDSFrame();
1287 if ( !
info.empty() ) {
1297 <<
"Failed to get seq-loc with unique seq-id!");
1307 const char* label_prefix )
1312 if (object_type ==
"clone placement") {
1322 unique_ptr<CFeatGlyph> feat_glyph;
1331 feat_glyph->SetTopLabelPrefix(label_prefix);
1334 glyph.
Reset(feat_glyph.release());
1350 intervals.push_back((*iter)->GetTotalRange());
1362 const string& title)
1371 the_map.
AddRange(
f->GetMappedFeature().GetLocation().GetTotalRange(), 1,
false);
1391 for (; feat_iter; ++feat_iter) {
1412 const string& title)
1421 result->m_ExtraObj = glyphs.front();
1429 const string& title)
1434 for (; feat_iter ; ++feat_iter) {
1443 if (iter == the_maps.
end()) {
1454 iter->second.AddRange(
1462 if ( !the_maps.
empty() ) {
1480 for ( ; iter; ++iter) {
1482 intervals.push_back(iter.
GetRange());
1491 bool rsiteRangeFromSet =
false;
1492 for ( ; iter; ++iter) {
1499 if (!rsiteRangeFromSet) {
1501 rsiteRangeFromSet =
true;
1505 intervals.push_back(rsiteRange);
1506 rsiteRangeFromSet =
false;
1512 intervals.push_back(iter.
GetRange());
1531 , m_MainFeatSel(m_feat_sel)
1532 , m_MainFeatToken(main_token)
1533 , m_LandmarkFeats(landmark_feat)
1618 for ( ; feature_iter; ++feature_iter) {
1629 bool transcripts_filtered =
false;
1634 if (transcripts_filtered) {
1635 result->m_FilterDescr =
"Some track data has been hidden";
1642 }
catch (std::exception& ex) {
1673 if ((*xit)->IsSetData() && (*xit)->GetData().Which() == choice) {
1683 for (
const auto& it : linked_feat.
GetChildren()) {
1684 if (it->GetFeature().GetData().IsCdregion())
1712 if (!ext_type.
IsStr() || ext_type.
GetStr() !=
"CombinedFeatureUserObjects") {
1722 if (!field_label.
IsStr() || !field_data.
IsObject() || field_label.
GetStr() !=
"ModelEvidence")
1732 const CUser_field & evidence_field = **evidence_iter;
1749 for (
const auto& iter : feat.
GetQual()) {
1750 if (iter->GetQual() ==
"tag" && iter->IsSetVal()) {
1751 const string&
val = iter->GetVal();
1752 if (tags.count(
val) > 0)
1800 SetTaskName(
"Creating feature glyphs and gene models...");
1803 transcripts_filtered =
false;
1846 if ( !glyph )
continue;
1850 if ((*iter)->GetChildren().empty()) {
1854 transcripts_filtered =
true;
1867 objs.push_back(glyph);
1874 transcripts_filtered =
true;
1882 string label_prefix;
1884 size_t num_filtered = 0;
1887 if ( !g_glyph )
continue;
1896 rnacds_group->PushBack(g_glyph);
1907 rnacds_group->PushBack(rna_group);
1916 rnacds_group->PushBack(g_glyph);
1920 rnacds_group->PushBack(r_glyph);
1926 transcripts_filtered =
true;
1930 bool is_filtered = (num_filtered > 0 && num_filtered == (*iter)->GetChildren().size());
1935 objs.emplace_back(group);
1945 if (!rnacds_group->GetChildren().empty()) {
1946 if (rnacds_group->GetChildren().size() == 1 ||
1951 group->
Append(rnacds_group->SetChildren());
1969 if ((*iter)->GetChildren().empty()) {
1971 objs.push_back(glyph);
1984 (*iter)->GetChildren()) {
2008 for (; feature_iter ; ++feature_iter) {
2020 objs.push_back(glyph);
2025 for ( ; feature_iter; ++feature_iter) {
2031 feature::CFeatTree::eFeatId_by_type,
this) ) {
2041 if ( !(*iter)->GetFeature().GetData().IsGene() )
continue;
2075 objs.push_back(glyph);
2099 "http://www.ncbi.nlm.nih.gov/gutils/fgenes_by_loc.fcgi?sort=weight&retmode=asnb";
2119 *obj_stream >> gbl_reply;
2131 LOG_POST(
Error <<
"Failed to retrieve genes by location for gi|"
2132 << gi <<
", error: " << e.
GetMsg());
2148 vector<SLandmarkFeat> landmark_feats;
2159 if (m_StopRequested) {
2168 float score = (float)
range.GetLength();
2171 score /= s.length();
2177 landmark_feats.push_back(
f);
2189 vector<int> gene_uids;
2191 if (m_StopRequested) {
2208 TScoreMap gene_scores;
2211 CEntrezCache& cache = CEntrezCache::GetInstance();
2213 vector<int>::iterator iter = gene_uids.begin();
2215 for ( ; iter != gene_uids.end(); ) {
2218 gene_scores[ds->GetUid()] =
2219 s_GetGeneDocsumWeight(*ds);
2220 iter = gene_uids.erase(iter);
2228 if (gene_uids.size()) {
2231 if (ds && ds->IsSetList()) {
2232 cache.Put(
"gene", *ds);
2234 gene_scores[(*iter)->GetUid()] =
2235 s_GetGeneDocsumWeight(**iter);
2241 if (m_StopRequested) {
2256 TScoreMap::iterator it = gene_scores.find(uid);
2257 if (it != gene_scores.end()) {
2266 landmark_feats.push_back(
f);
2281 if (idh && idh.
GetGi() > 0) {
2285 if (number_genes > 0) {
2306 if (gene_weights.
empty()) {
2325 score = (float)
range.GetLength();
2326 score /= s.length();
2330 if (
tag->GetTag().IsId()) {
2332 if (g_iter != gene_weights.
end()) {
2333 score = (float)g_iter->second;
2342 landmark_feats.push_back(
f);
2350 if (landmark_feats.empty())
return eCompleted;
2356 std::sort(landmark_feats.begin(), landmark_feats.end(),
2362 dynamic_cast<const CFeatGlyph*
>(landmark_feats.front().obj.GetPointer());
2367 ITERATE (vector<SLandmarkFeat>, iter, landmark_feats) {
2380 size_t len = landmark_feats.size() - 1;
2381 vector<SLandmarkFeat>::iterator
prev =
2383 vector<SLandmarkFeat>::iterator s_iter =
prev;
2384 vector<SLandmarkFeat>::iterator end = landmark_feats.end();
2395 landmark_feats.erase(s_iter, end);
2398 if (highlight_num > 40) {
2400 }
else if (highlight_num < 10) {
2406 s_iter = landmark_feats.begin();
2407 while (highlight_num > 0 && s_iter != landmark_feats.end()) {
2408 s_iter->obj->SetHighlighted(
true);
2414 s_iter = landmark_feats.begin();
2415 while (highlight_num > 0 && s_iter != landmark_feats.end()) {
2423 comment_objs.push_back(glyph);
2429 std::sort(landmark_feats.begin(), landmark_feats.end(),
2437 ITERATE (vector<SLandmarkFeat>, l_iter, landmark_feats) {
2438 objs.push_back(l_iter->obj);
2448 const string& filter)
2450 vector<string> filters;
2464 filters.push_back(filter);
2477 filters.push_back(filter);
2490 filters.push_back(filter);
2504 for (; feat_iter; ++feat_iter) {
2510 feature::CFeatTree::eFeatId_by_type,
NULL);
2513 filters.push_back(filter);
2525 for (; feat_iter; ++feat_iter) {
2531 feature::CFeatTree::eFeatId_by_type,
NULL);
2534 filters.push_back(filter);
2562 }
else if ( !filter.empty() ) {
2578 , m_Requests(requests)
2597 result->m_Results.push_back(single_res);
2603 }
catch (std::exception& ex) {
2643 while (align_iter && !mapper) {
2666 bool packed = feat_iter &&
2675 for ( ; feat_iter; ++feat_iter) {
2684 }
else if (
size > 0) {
2685 for ( ; feat_iter; ++feat_iter) {
2702 if (dmap)
result->m_ExtraObj.Reset(dmap);
2734 result->m_ExtraObj.Reset(dmap);
2739 }
catch (std::exception& ex) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Seq-loc and seq-align mapper exceptions.
const TAnnotNames & GetAnnotNames(void) const
size_t GetSize(void) const
CAppJobError Default implementation for IAppJobError - encapsulates a text error message.
CBatchFeatJob: a job class for loading annotated features from a given a set of sequences within the ...
virtual CRef< CSGJobResult > x_LoadFeatProducts(CRef< CFeatGlyph > feat, const SAnnotSelector &sel)
virtual EJobState x_Execute()
method truly doing the job.
TFeatBatchJobRequests m_Requests
CBatchFeatJob(const string &desc, CBioseq_Handle handle, const TSeqRange &range, TModelUnit window, TJobToken token, const TFeatBatchJobRequests &requests)
CBatchFeatJob.
CBatchJobResult – the data structure holding the seqgraphic job results for a batch job processing.
CCloneConcordancySorter is a feature sorter used to sort clone features based on clone concordancy.
static const string & GetID()
CClonePlacementGlyph is similar to CFeatureGlyph, but with different rendering style and settings.
TIntervals & SetIntervals()
CClonePlacementGlyph inline implementations.
This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...
CDbvarClinicalAsstSorter is a feature sorter used to sort variant features based on variant quality.
static const string & GetID()
CDbvarPilotSorter is a feature sorter used to sort variant features based on variant pilot number.
static const string & GetID()
CDbvarQualitySorter is a feature sorter used to sort variant features based on variant quality.
static const string & GetID()
CDbvarSamplesetTypeSorter is a feature sorter used to sort variant features based on variant quality.
static const string & GetID()
CDbvarValidationSorter is a feature sorter used to sort variant features based on variant quality.
static const string & GetID()
CRef< CEntrez2_docsum_list > GetDocsums(const vector< TUid > &uids, const string &db)
Retrieve the docsums for a set of UIDs.
void SetMappingInfo(const TMappingInfo &info)
TIntervals & SetIntervals()
CFeatGlyph inline implementations.
const TMappingInfo & GetMappingInfo() const
virtual const objects::CSeq_loc & GetLocation(void) const
access the position of this object.
void SetTopLabelPrefix(const char *prefix)
Set prefix to prepend to labels on top.
const objects::CMappedFeat & GetMappedFeature(void) const
Access a new, fully remapped feature.
virtual TSeqRange GetRange(void) const
get the total range of this object.
virtual const TIntervals & GetIntervals(void) const
access sub-intervals (if any).
const objects::CSeq_feat & GetFeature(void) const
Access the original feature.
static size_t GetCustomColorIdx(const objects::CSeq_feat &feat)
Get the customized color idx for a given feature.
void GetLabel(string &label, CLabel::ELabelType type) const
retrieve feature label for a given type
static const string & GetID()
bool NeedFiltering() const
bool Pass(const objects::CMappedFeat *feat)
void Init(const string &filter)
CGRCStatusSorter is a feature sorter used to sort GRC issue features based on resolving status stored...
static const string & GetID()
CGeneGroup is a subclass of CLayoutGroup contains gene, RNA, cds, and Exon features.
bool m_CCDSOnly
Show only CCDS variants.
EMergeStyle m_MergeStyle
the way on how to merge CDSs and RNAs.
bool m_SelectOnly
Show only Select/MANE variants.
bool m_HideNonCoding
Hide transcripts without associated CDS.
bool m_ShowHistogram
show gene distribution histogram.
@ eMerge_OneLine
merge into one line
@ eMerge_Pairs
merge each transcript and CDS pair
@ eMerge_No
show all feature individually
bool m_HideModels
Hide Model RefSeqs.
CGeneModelFeatJob: a job class for loading annotated main features, including genes,...
static vector< string > GetFilters(const CBioseq_Handle &handle, const TSeqRange &range, SAnnotSelector &sel, const string &filter)
static bool x_IsncRNA(const CLinkedFeature &linked_feat)
static bool x_IsDbref(const string &db, const CSeq_feat &feat)
virtual CRef< CSeqGlyph > x_CreateFeature2(const CMappedFeat &feat, const CSeq_loc &loc, const char *label_prefix=NULL)
overridable creator.
IAppJob::EJobState x_CreateFeaturesWithFilter(CFeat_CI &feature_iter, CSeqGlyph::TObjects &objs, TFilterType filter)
create features when there is a filter set up.
static bool x_IsnpcGene(const CLinkedFeature &linked_feat)
static TFilterType x_FilterStrToValue(const string &filter)
static bool x_IsCCDS(const CLinkedFeature &linked_feat)
static bool x_IsDbref(const string &db, const CLinkedFeature &linked_feat)
bool x_IsTranscriptAcceptable(const CLinkedFeature &feat)
Check if transcript passes Config filters.
IAppJob::EJobState x_CreateGeneModels(CLinkedFeature::TLinkedFeats &feats, CSeqGlyph::TObjects &objs, bool &transcripts_filtered)
Link features into a hierarchical list.
SAnnotSelector m_MainFeatSel
annotation selector for all main features.
EJobState x_ProcessLandMarkFeatures(CSeqGlyph::TObjects &objs, CRef< CSeqGlyph > &hist_obj, CSeqGlyph::TObjects &comment_objs)
TJobToken m_MainFeatToken
Job token for loading main features.
CGeneModelConfig m_Config
CGeneModelFeatJob(const string &desc, CBioseq_Handle handle, const SAnnotSelector &lm_feat_sel, const SAnnotSelector &m_feat_sel, TJobToken lm_token, TJobToken main_token, bool landmark_feat, const TSeqRange &range, TModelUnit window, const CGeneModelConfig &conf, ICoordMapper *mapper)
CGeneModelFeatJob.
@ eFilter_dbref
one specific dbref
@ eFilter_dbref_all
any dbref
@ eFilter_CCDS
genes with Consensus CDS
bool m_LandmarkFeats
is overview mode?
static bool x_IsPseudoGene(const CSeq_feat &feat)
virtual EJobState x_Execute()
method truly doing the job.
CRef< TData > GetData(const string &data_key)
Retrieves TData from in-memory cache or if not found calls TData::Init to initialize new TData instan...
static CGraphCache & GetInstance()
CRef< TData > GetCachedData(const string &data_key)
Retrieves TData from in-memory cache.
static int GetNearestLevel(const set< int > &levels, double zoom)
CLayoutGroup is a container of CSeqGlyphs (layout objects).
void PushBack(CSeqGlyph *obj)
Append a layout object to the end.
TObjectList & SetChildren()
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
void SetAsMaster(CRef< CSeqGlyph > master)
master glyph has some special meaning (e.g.
void Append(TObjectList &objs)
size_t GetChildrenNum() const
Get total number of children.
ILayoutPolicy::TObjectList TObjectList
CLinkedFeatsGroup is a container class contains related features.
CLayoutGroup & SetGroup()
void PushBack(CSeqGlyph *obj)
CTitleGroup is a layout group with a title.
objects::SAnnotSelector m_Sel
our annotation selector
objects::CScope & GetScope(void) const
CSGAnnotJob inline methods.
int GetGraphLevel() const
TSeqRange m_Range
target range
objects::CBioseq_Handle m_Handle
target sequence
IAppJob::EJobState x_LoadCoverageGraph(CSeqGlyph::TObjects &glyphs, int level, TModelUnit window, const string &title, bool fixed_scale, const TAxisLimits &y_limits)
TSeqRange m_Range
target range
TModelUnit m_Window
current window for smear bars
EJobState x_CalcFeatHistRecursive(CRef< CSeqGlyph > obj, CDensityMap< float > &the_map)
CSGCalcFeatHistJob(const string &desc, const CSeqGlyph::TObjects &objs, const TSeqRange &range, TModelUnit window, TJobToken token)
const CSeqGlyph::TObjects & m_Objects
virtual EJobState x_Execute()
CSGCalcFeatHistJob.
virtual ISGDataSource * CreateDS(SConstScopedObject &object) const
create an instance of the layout track type using default settings.
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual bool IsSharable() const
check if the data source can be shared.
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
CSGFeatureDS(objects::CScope &scope, const objects::CSeq_id &id)
CSGFeatureDS.
void LoadGeneModelFeatures(objects::SAnnotSelector &lm_feat_sel, objects::SAnnotSelector &m_feat_sel, TJobToken lm_token, TJobToken main_token, bool landmark_feat, const TSeqRange &range, TModelUnit window, const CRef< CGeneModelConfig > &conf)
load features for gene model.
void GetAnnotNames(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
void CalcFeatHistogram(const CSeqGlyph::TObjects &objs, const TSeqRange &range, TModelUnit window, TJobToken token=-1)
virtual void LoadFeatures(objects::SAnnotSelector &sel, const TSeqRange &range, TModelUnit window, TJobToken token=-1, int max_feat=-1, ELinkedFeatDisplay LinkedFeatDisplay=ELinkedFeatDisplay::eLFD_Default, const string &extra_filter="")
void GetAnnotNames_var(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
vector< string > GetFilters(const string &annot_name, const TSeqRange &range) const
CSGFeatureJob: a job class for loading annotated features from a given sequence and visible range.
CRef< CSeqGlyph > x_CreateCloneFeature(const CMappedFeat &feat, const CSeq_loc &loc)
bool x_FilterFeature_recursive(CLinkedFeature::TLinkedFeats &features, CFeatureFilter &filter)
void x_GetLinkedFeatures(CFeat_CI &feature_iter, CLinkedFeature::TLinkedFeats &features)
IAppJob::EJobState x_CreateFeatSmear(CFeat_CI &feat_iter, CSGJobResult *result, const string &title)
int m_FeatLimit
the maximum number of features allowed.
void SetVcfCacheKey(const string &cache_key)
void x_SortFeatures(CLinkedFeature::TLinkedFeats &feats, TFeatGroups &feat_groups)
bool x_ProcessCachedVcfTabix()
IAppJob::EJobState x_LinkFeatures(CLinkedFeature::TLinkedFeats &feats, CSeqGlyph::TObjects &objs)
bool x_ProcessCachedBigBed()
void x_CalcIntervals(CFeatGlyph &feat)
CSGFeatureJob(const string &desc, CBioseq_Handle handle, const SAnnotSelector &sel, const TSeqRange &range, TModelUnit window, TJobToken token)
vector< TSortedFeats > TFeatGroups
EJobState x_CreateFeatHist(CLinkedFeature::TLinkedFeats &features, CSGJobResult *result, const string &title)
CRef< CSeqGlyph > x_CreateFeature1(const CMappedFeat &feat, CSeqGlyph *parent_glyph=NULL, const char *label_prefix=NULL)
CIRef< ICoordMapper > m_Mapper
void x_SortFeature_recursive(CLinkedFeature::TLinkedFeats &feats, TFeatGroupMap &group_map)
ELinkedFeatDisplay m_LinkedFeat
controls creation of parent or child features
TModelUnit m_Window
current window for smear bars
static void GetAnnotNames_var(const CBioseq_Handle &handle, const TSeqRange &range, SAnnotSelector &sel, TAnnotNameTitleMap &names)
IAppJob::EJobState x_CreateFeature_Recursive(CLinkedFeature::TLinkedFeats &features, CLayoutGroup *group, int Level)
CIRef< IFeatSorter > m_Sorter
map< int, CLinkedFeature::TLinkedFeats > TFeatGroupMap
void SetBigBedCacheKey(const string &cache_key)
IAppJob::EJobState x_CreateFeatures(CFeat_CI &feature_iter, CSeqGlyph::TObjects &objs)
static void GetAnnotNames(const CBioseq_Handle &handle, const TSeqRange &range, SAnnotSelector &sel, TAnnotNameTitleMap &names)
EJobState x_CreateFeatHistFromGraph(CSGJobResult *result, int level, const string &title)
pair< string, CLinkedFeature::TLinkedFeats > TSortedFeats
void SetSortBy(const string &sortby)
virtual EJobState x_Execute()
method truly doing the job.
virtual CRef< CSeqGlyph > x_CreateFeature2(const CMappedFeat &feat, const CSeq_loc &loc, const char *label_prefix=NULL)
overridable creator.
void SetFilter(const string &filter)
CIRef< ICoordMapper > m_Mapper
coordinate mapper between mapped features coord. and sequence coord.
TJobID x_LaunchJob(IAppJob &job, int report_period=1, const string &pool="ObjManagerEngine")
Launch either a background or foreground job.
bool m_Adaptive
adaptive/exact annot selector
int m_Depth
annotation resolving depth
TGraphLevels m_GraphLevels
Existing coverage graph levels.
objects::CBioseq_Handle m_Handle
CSGJobResult – the data structure holding the seqgraphic job results.
ESubtype GetSubtype(void) const
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
virtual bool LessBySeqPos(const CSeqGlyph &obj) const
compare this object to another based on glyph sequence position.
void SetTearlineText(const string &sTearlineText)
tearline text – if set, is appended to the glyph name (does not naffect processing otherwise)
list< CRef< CSeqGlyph > > TObjects
CSeqGraphicJob – the base class of seqgraphic job for handling the job status such as reporting the p...
virtual void SetTaskTotal(int total)
map< string, string > TAnnotNameTitleMap
List of annotations with the corresponding titles.
virtual void SetTaskName(const string &name)
virtual void SetTaskCompleted(int completed)
set total finished task number.
void SetToken(TJobToken token)
CSeqGraphicJob inline methods.
virtual void AddTaskCompleted(int delta)
set to add newly finished task number.
TJobToken m_Token
Job token recognizable by job listener.
CRef< CAppJobError > m_Error
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
namespace ncbi::objects::
CConstRef< CDbtag > GetNamedDbxref(const CTempString &db) const
Return a specified DB xref.
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
ICoordMapper interface for converting location between two coordinate systems.
vector< TSeqRange > TIntervals
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
static const struct name_t names[]
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static bool s_HasCDS(const CLinkedFeature &linked_feat)
static bool s_HasFeatXref(const CSeq_feat &feat, CSeqFeatData_Base::E_Choice choice)
static const char * kGeneByLocUrl
static bool s_IsGnomonModel(const CSeq_feat &feat)
static const float kMinScaleForMapping
static const char * kUnsortedGroupName
static bool s_HasTag(const CSeq_feat &feat, const set< string > &tags)
static bool s_IsSelect(const CLinkedFeature &feat)
static const size_t kMaxChildNum
static const int kMaxObjNum
static bool s_IsCCDS(const CLinkedFeature &linked_feat)
bool s_GetGeneWeight(TId2Wt &genes, TGi gi, const TSeqRange &r, size_t retmax)
static const float kSeqZoomLevel
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
@ fHTTP_AutoReconnect
See HTTP_CreateConnectorEx()
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static TMappingInfo GetMappingInfoFromLocation(const objects::CSeq_loc &feat_loc, const objects::CSeq_id &product_id, const int feat_offset=0)
static TMappingInfo GetRnaMappingInfo(const objects::CSeq_loc &feat_loc, const objects::CMappedFeat &feat, const objects::CBioseq_Handle &handle)
Helper function to generate mapping info between the specified product sequence and genomic sequence ...
const objects::CSeq_feat & GetFeature() const
static bool LinkFeatures(CLinkedFeature::TLinkedFeats &feats, TFeatLinkingMode mode=1, ISeqTaskProgressCallback *p_cb=NULL)
Link features into a hierarchical list.
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
list< CRef< CLinkedFeature > > TLinkedFeats
static TMappingInfo GetCdsMappingInfoFromRna(const TMappingInfo &rna_mapping_info, const objects::CSeq_feat &rna_feat, const objects::CMappedFeat &mapped_cds_feat, const objects::CSeq_loc &feat_loc, objects::CScope &scope, const int feat_offset=0)
Derive the CDS feature mapping information based on its parent RNA feature mapping info.
static string GetAnnotName(const objects::CSeq_annot_Handle &annot_handle)
static CRef< objects::CSeq_loc > MixLocToLoc(const objects::CSeq_loc &mix_loc, const objects::CBioseq_Handle &handle)
Create a new seq-loc with a unique seq-id from a "mixed" loc.
static const string & GetUnnamedAnnot()
Get the commonly used symbol representing a unnnamed annotation.
static bool IsSameStrands(const objects::CSeq_loc &loc)
static void SetAnnot(objects::SAnnotSelector &sel, const string &annot)
help function for setting up an annotation.
vector< TMappedInt > TMappingInfo
const TLinkedFeats & GetChildren() const
static void SetResolveDepth(objects::SAnnotSelector &sel, bool adaptive, int depth=-1)
help function for setting selector resolve depth.
CGlPoint< TModelUnit > TModelPoint
virtual bool IsCanceled() const override
virtual void AddRange(TSeqRange range, CntType score=1, bool expand=false)
EJobState
Job states (describe FSM)
@ eSerial_AsnBinary
ASN.1 binary.
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
string GetLabel(const CSeq_id &id)
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
TRange GetTotalRange(void) const
CConstRef< CSeq_loc > GetRangeAsSeq_loc(void) const
Get seq-loc for the current iterator position.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
TRange GetRange(void) const
Get the range.
const CSeq_id & GetSeq_id(void) const
Get seq_id of the current location.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
@ fFGL_Content
Include its content if there is any.
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,...
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
@ eGetId_ForceGi
return only a gi-based seq-id
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
const CSeqFeatData & GetData(void) const
bool IsSetProduct(void) const
CSeqFeatData::ESubtype GetFeatSubtype(void) const
SAnnotSelector & SetFeatType(TFeatType type)
Set feature type (also set annotation type to feat)
vector< CAnnotName > TAnnotsNames
Object manager recognizes several fields of Seq-annot as annot name.
const CSeq_loc & GetLocation(void) const
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
SAnnotSelector & SetCollectNames(bool value=true)
Collect available annot names rather than annots.
SAnnotSelector & IncludeFeatType(TFeatType type)
Include feature type in the search.
const CSeq_loc & GetProduct(void) const
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TObjectType & GetObject(void)
Get object.
position_type GetLength(void) const
TThisType & SetToOpen(position_type toOpen)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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 string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string.
unsigned int usec
microseconds (modulo 1,000,000)
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
list< CRef< CEntrez2_docsum > > TList
const TStr & GetStr(void) const
Get the variant data.
bool IsSetData(void) const
the object itself Check if a value has been assigned to Data data member.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
bool IsLim(void) const
Check if variant Lim is selected.
const TTag & GetTag(void) const
Get the Tag member data.
bool IsId(void) const
Check if variant Id is selected.
const TData & GetData(void) const
Get the Data member data.
TLim GetLim(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetLabel(void) const
field label Check if a value has been assigned to Label data member.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TObject & GetObject(void) const
Get the variant data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
bool IsObject(void) const
Check if variant Object is selected.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CRef< CUser_field > > TData
TId GetId(void) const
Get the variant data.
@ eLim_tl
space to left of position
TReturned GetReturned(void) const
Get the Returned member data.
list< CRef< CGBL_Gene > > TGenes
const TData & GetData(void) const
Get the variant data.
bool IsError(void) const
Check if variant Error is selected.
const TError & GetError(void) const
Get the variant data.
bool CanGetGenes(void) const
Check if it is safe to call GetGenes method.
const TGenes & GetGenes(void) const
Get the Genes member data.
vector< CRef< CDbtag > > TDbxref
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetExt(void) const
user defined structure extension Check if a value has been assigned to Ext data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
const TQual & GetQual(void) const
Get the Qual member data.
bool IsGene(void) const
Check if variant Gene is selected.
TFrame GetFrame(void) const
Get the Frame member data.
const TData & GetData(void) const
Get the Data member data.
const TUser & GetUser(void) const
Get the variant data.
const TDbxref & GetDbxref(void) const
Get the Dbxref member data.
const TCdregion & GetCdregion(void) const
Get the variant data.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
bool IsSetPseudo(void) const
annotated on pseudogene? Check if a value has been assigned to Pseudo data member.
const TXref & GetXref(void) const
Get the Xref member data.
vector< CRef< CSeqFeatXref > > TXref
bool IsSetDbxref(void) const
support for xref to other databases Check if a value has been assigned to Dbxref data member.
const TExt & GetExt(void) const
Get the Ext member data.
bool IsRna(void) const
Check if variant Rna is selected.
bool IsSetFrame(void) const
Check if a value has been assigned to Frame data member.
bool IsMix(void) const
Check if variant Mix is selected.
ENa_strand
strand of nucleic acid
const TPnt & GetPnt(void) const
Get the variant data.
TPoint GetPoint(void) const
Get the Point member data.
list< CRef< CSeq_loc > > Tdata
const TFuzz & GetFuzz(void) const
Get the Fuzz member data.
E_Choice Which(void) const
Which variant is currently selected.
const Tdata & Get(void) const
Get the member data.
bool CanGetFuzz(void) const
Check if it is safe to call GetFuzz method.
const TMix & GetMix(void) const
Get the variant data.
bool IsPnt(void) const
Check if variant Pnt is selected.
@ e_Empty
to NULL one Seq-id in a collection
unsigned int
A callback function used to compare two keys in a database.
range(_Ty, _Ty) -> range< _Ty >
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
double f(double x_, const double &y_)
struct named_group named_group
vector< SFeatBatchJobRequest > TFeatBatchJobRequests
CSGFeatureJob implementation.
bool operator()(const CSGFeatureJob::SLandmarkFeat &f1, const CSGFeatureJob::SLandmarkFeat &f2) const
bool operator()(const CSGFeatureJob::SLandmarkFeat &f1, const CSGFeatureJob::SLandmarkFeat &f2) const
static const char *const features[]