123 string label =
"No data";
124 if (item.IsSetItem()) {
131 item.SetLabel(
label);
146 _ASSERT(type_info != CSeq_id::GetTypeInfo());
147 _ASSERT(type_info != CSeq_loc::GetTypeInfo());
148 _ASSERT(type_info != CSeq_entry::GetTypeInfo());
149 _ASSERT(type_info != CBioseq::GetTypeInfo());
150 _ASSERT(type_info != CBioseq_set::GetTypeInfo());
169 iter->second->GetLabel(obj,
label,
type, scope);
177 iter->second->GetLabel(obj,
label,
type, scope);
188 unsigned length_limit,
189 unsigned length_tolerance)
192 if (
label->empty())
return;
194 if (
len <= length_limit)
return;
197 bool point_found =
false;
198 size_t i = length_limit;
199 size_t max_len =
min(
len,
size_t(length_limit + length_tolerance));
200 for (;
i < max_len; ++
i) {
201 char c = (*label)[
i];
202 if (c ==
';' || c ==
'.') {
208 if ( !point_found ) {
210 for (;
i < max_len; ++
i) {
211 char c = (*label)[
i];
212 if (c ==
' ' || c ==
',') {
219 if ( !point_found ) {
224 label->append(
"...");
258 const string& user_subtype,
259 const string& icon_alias)
261 string key = user_type +
"&" + user_subtype;
270 string key = user_type +
"&" + user_subtype;
277 }
else if( ! user_subtype.empty()) {
292 string key = user_type +
"&";
301 objects::CScope* scope)
304 string type, subtype;
360 for (; iter != caches.
end(); ++iter) {
393 if(
id.IsLocal() )
return gi;
398 if( (gi ==
ZERO_GI) && scope ){
405 }
catch( std::exception& ){
440 if( !
label->empty() ){
449 if(
label->empty() ){
467 fastaLabel =
id.AsFastaString();
472 if( !
label.empty() ){
477 }
NCBI_CATCH(
"Failed to load Seq-id: " + fastaLabel +
".");
498 if( scope && id_ptr->
IsGi() ){
576 if ( !last_id || !interval.
GetId().
Match(*last_id)) {
577 if ( !
label->empty() ) {
657 size_t intervals = 0;
658 switch (loc.
Which()) {
681 if (intervals != 0) {
682 if ( !extra_info.empty() )
685 extra_info +=
" interval";
686 if (intervals != 1) {
690 if ( !extra_info.empty() ) {
692 *
label += extra_info;
705 const CSeq_id&
id = it.GetSeq_id();
712 for (
i = 0;
i < locs.size(); ++
i) {
717 if (
i == locs.size()) {
721 locs[
i]->Add(*it.GetRangeAsSeq_loc());
740 switch (loc.
Which()) {
745 *
label +=
".packed-int";
791 switch (loc.
Which()) {
810 if ( !
str.empty() ) {
814 id.Reset(&ival.
GetId());
817 return id.GetPointer();
829 if ( !
label->empty() ) {
834 }
else if ( !
label->empty() ) {
849 if ( !
str.empty() ) {
856 if ( !
label->empty() ) {
861 }
else if ( !
label->empty() ) {
880 if ( !
str.empty() ) {
893 vector<CRef<CSeq_loc> > locs;
896 for (
unsigned int i = 0;
i < locs.size(); ++
i) {
974 }
else if(bioseq->
IsAa()) {
1025 static const TPair sc_Types[] = {
1050 TBioseq_setTypes::const_iterator
i = sc_Bioseq_setTypes.find(bst.
GetClass());
1051 *
label += (
i != sc_Bioseq_setTypes.end()) ?
1052 sc_Bioseq_setTypes.find(bst.
GetClass())->second :
1067 if ((*it)->IsSeq()) {
1068 bsp = &(*it)->GetSeq();
1069 }
else if ((*it)->IsSet()) {
1099 sort(ids.begin(), ids.end());
1100 vector<string>::iterator new_end = unique(ids.begin(), ids.end());
1101 if (new_end != ids.end()) {
1106 *
label += ids.front();
1107 if (ids.size() > 1) {
1109 *
label += ids.back();
1111 }
else if (lcl !=
NULL) {
1198 if (align_it.
GetSize() != 0) {
1215 if( !
label )
return;
1309 *
label +=
id.GetStr();
1319 *
label +=
id.GetStr();
1334 if (
id.IsStr() &&
id.GetStr() ==
"clone placement") {
1336 *
label +=
id.GetStr();
1345 if ( !
label->empty() ) {
1354 if ( !
label->empty() ) {
1361 field = obj.
GetFieldRef(
"clone placement.concordant");
1363 if ( !
label->empty() ) {
1366 *
label +=
"/concordant=";
1369 }
else if (
id.IsStr() &&
1386 string num_str = feat.GetNamedQual(
"Child Count");
1387 if ( !num_str.empty() ) {
1402 if ((*iter)->IsLoss_of_heterozygosity()) {
1464 *
label +=
"[intron]";
1477 *
label +=
"[intron]";
1503 if (product_str != type_str) {
1534 bool got_label =
false;
1539 *
label = (*it)->GetVal();
1578 *
label +=
"[intron]";
1620 bool got_label =
false;
1625 *
label += (*it)->GetVal();
1674 string validation =
"Not Tested";
1679 validation =
"Fail";
1685 validation =
"Fail";
1690 string phenotype =
"";
1691 string clinical_sig =
"";
1694 if (clinical_sig.empty() && (*pnt_iter)->CanGetClinical_significance()) {
1698 if (phenotype.empty() && (*pnt_iter)->CanGetTerm()) {
1699 phenotype = (*pnt_iter)->GetTerm();
1704 string sample_sex =
"";
1707 if ((*so_iter)->CanGetSource() &&
1709 sample_sex = (*so_iter)->GetSource().GetName();
1719 string variant_type;
1721 variant_type =
"LOH";
1723 variant_type =
"Complex";
1725 variant_type =
"UPD";
1727 variant_type =
"Insertion";
1728 }
else if (var.
IsGain()) {
1730 variant_type =
"Copy number gain";
1732 variant_type =
"Duplication";
1734 }
else if (var.
IsLoss()) {
1736 variant_type =
"Copy number loss";
1738 variant_type =
"Deletion";
1742 variant_type =
"Copy number loss";
1744 variant_type =
"Deletion";
1747 variant_type =
"Inversion";
1749 variant_type =
"Tandem duplication";
1751 variant_type =
"Translocation";
1753 variant_type =
"Indel";
1755 variant_type =
"Unknown";
1756 }
else if (var.
IsCNV()) {
1757 variant_type =
"Copy number variation";
1759 variant_type =
"Other";
1764 if (child_num == 0) {
1768 if (child_num > 0) {
1769 *
label +=
"Number of Supporting Variant Calls: ";
1773 *
label +=
"Variant Region Type: ";
1774 *
label += variant_type;
1775 if ( !phenotype.empty() ) {
1776 *
label +=
"\nPhenotype: " + phenotype;
1778 if ( !clinical_sig.empty() ) {
1779 *
label +=
"\nClinical Interpretation: ";
1780 *
label += clinical_sig;
1782 if ( !sample_sex.empty() ) {
1783 *
label +=
"\nGender: ";
1784 *
label += sample_sex;
1786 *
label +=
"\nValidation Status: " + validation;
1787 *
label +=
"\nTotal Length: ";
1796 *
label +=
"Parent Variant Region: ";
1806 *
label +=
"Variant Call Type: ";
1807 *
label += variant_type;
1809 if ( !phenotype.empty() ) {
1810 *
label +=
"\nPhenotype: " + phenotype;
1812 if ( !clinical_sig.empty() ) {
1813 *
label +=
"\nClinical Interpretation: ";
1814 *
label += clinical_sig;
1816 if ( !sample_sex.empty() ) {
1817 *
label +=
"\nGender: ";
1818 *
label += sample_sex;
1835 inh +=
"inherited ";
1847 inh +=
"biparental ";
1850 inh +=
"uniparental ";
1853 inh +=
"not-tested ";
1856 inh +=
"tested-inconclusive ";
1866 *
label +=
"\nInheritance: " + inh;
1870 *
label +=
"\nValidation Status: " + validation;
1877 int allele_len = -1;
1881 if ((*iter)->IsSetSeq() && (*iter)->GetSeq().IsLiteral()) {
1882 allele_len = (*iter)->GetSeq().GetLiteral().GetLength();
1887 if (allele_len > -1) {
1897 *
label +=
"Length: ";
1900 *
label +=
"\nStart: ";
1903 *
label +=
", Stop: ";
1908 CClone_ref::GetTypeInfo_enum_EPlacement_method();
1911 if ( !method.empty() ) {
1912 *
label +=
"\nPlacement method: " + method;
1917 *
label +=
"\nClone placement: ";
1921 *
label +=
"\nClone placement: ";
1948 id->GetLabel(&id_str);
1960 *
label +=
"\nSupporting (" +
1967 *
label +=
"\nNon-supporting (" +
1974 *
label +=
"\nSupports other (" +
2008 *
label +=
"\n" + (*it)->GetQual() +
": " + (*it)->GetVal();
2016 *
label +=
"Refers to: ";
2024 *
label +=
"\n" + (*it)->GetQual() +
": " + (*it)->GetVal();
2033 *
label +=
"[Site] ";
2066 if (product_str != type_str) {
2103 *
label +=
"\n" + (*it)->GetQual() +
": " + (*it)->GetVal();
2111 *
label +=
"[Site] ";
2122 if (bf_interp.
isGood()) {
2139 if(!Alleles.empty()) {
2140 if ( !
label->empty() ) {
2143 *
label +=
"Alleles: ";
2149 *
label +=
"; deletion length=";
2172 if ( !qual.
GetVal().empty() ) {
2244 size_t pos = second_part.find(
';');
2245 if (pos != string::npos)
2246 second_part = second_part.substr(0, pos);
2248 if (!second_part.empty()) {
2251 label += second_part;
2259 static vector<string> quals{
"regulatory_class",
"recombination_class",
"feat_class",
"bound_moiety",
"mobile_element_type",
"mobile_element",
"rpt_type",
2260 "satellite",
"rpt_family",
"mod_base",
"operon",
"standard_name",
"allele" };
2262 for (
const auto &qual_name : quals) {
2274 static vector<string> class_quals{
"feat_class",
"regulatory_class",
"recombination_class",
"mobile_element_type",
"mobile_element",
"rpt_type",
"satellite",
"rpt_family" };
2275 for (
const auto &qual_name : class_quals) {
2276 const string &
value = feat.GetNamedQual(qual_name);
2296 if (entry->
IsSet()) {
2311 *
label +=
"[Unknown]";
2314 *
label +=
"[Dense-seg]";
2317 *
label +=
"[Dense-diag]";
2320 *
label +=
"[Standard-seg]";
2323 *
label +=
"[Packed-seg]";
2326 *
label +=
"[Discontinuous]";
2337 switch (asegs_type) {
2340 *
label +=
"unknown contents";
2368 if ( !handle_set.
insert(sih).second ) {
2372 if ( !
str.empty() ) {
2378 if( handle_set.
size() == 1 ){
2390 *
label +=
"[Dense-diag]";
2393 *
label +=
"[Standard-seg]";
2396 *
label +=
"[Packed-seg]";
2399 *
label +=
"[Sparse-seg]";
2406 for ( ; id_iter; ++id_iter) {
2408 if ( !handle_set.
insert(sih).second ) {
2412 if ( !
str.empty() ) {
2419 if (handle_set.
size() == 1) {
2452 vector<bool> strands;
2457 for(;
i < num_rows; ++
i ){
2466 if ( !ids.empty() ) {
2490 if (
i > num_rows_limit)
2497 *
label +=
" x ... [ total ";
2505 if (num_rows == 2 && strands.size() == 2) {
2506 *
label +=
"\nStrand: ";
2507 *
label += strands[0] == strands[1] ?
"forward" :
"reverse";
2516 *
label +=
"\nAligned bases: ";
2520 *
label +=
"\nAligned segments: ";
2524 double coverage = 0.0;
2525 *
label +=
"\nCoverage: ";
2529 if (coverage < 100.0 && coverage > 99.9) {
2532 sprintf(
buf,
"%2.1f", coverage);
2537 if (align_length < 1000000) {
2551 double identity = 0.0;
2552 *
label +=
"\nIdentity: ";
2554 identity = identities * 100.0 / align_length;
2556 if (identity < 100.0 && identity > 99.9) {
2559 sprintf(
buf,
"%2.1f", identity);
2565 *
label +=
"\nMismatches: ";
2569 *
label +=
"\nGaps: ";
2618 const CSeq_id* id_trace = &id1;
2627 str +=
"\nMate: ti|";
2634 str +=
"\nError: Mate has wrong orientation";
2637 str +=
"\nError: Trace has non-unique placement";
2640 str +=
"\nError: Mate lies outside expected distance from trace";
2643 str +=
"\nError Code: ";
2651 if ( !
str.empty() ) {
2669 const CScore& score = **iter;
2685 score_str =
" (no scores)";
2707 if( !align )
return;
2763 *
label +=
"Seq-align-set";
2769 *
label +=
"Seq-align-set";
2773 *
label +=
"Seq-align-set";
2777 *
label +=
"Seq-align-set";
2790 switch (annot_data.
Which()) {
2792 *
label +=
"Feature Table";
2796 *
label +=
"Alignment";
2807 *
label +=
"Locations";
2811 *
label =
"Annotation";
2825 const string* title =
NULL;
2826 const string* name =
NULL;
2828 switch ((*iter)->Which()) {
2830 title = &(*iter)->GetTitle();
2834 name = &(*iter)->GetName();
2858 switch (annot_data.
Which()) {
2860 str =
"Feature Table, ";
2863 const CSeq_id* sid = annot_data.
GetFtable().front()->GetLocation().GetId();
2897 }
else if (
str != s) {
2903 str =
"Mixed sequence alignments";
2907 str =
"Alignment, ";
2911 items = annot_data.
GetAlign().size();
2916 items = annot_data.
GetGraph().size();
2921 items = annot_data.
GetIds().size();
2924 str =
"Locations, ";
2925 items = annot_data.
GetLocs().size();
2929 *
label =
"Annotation";
2940 if( !extra.empty() ){
2941 str +=
" (" + extra +
")";
3064 *
label +=
"Validation results for " + acc
3069 *
label +=
" errors";
3128 *
label +=
"Set of Tax IDs";
3157 char_count += idstr.length();
3187 objects::CScope* scope)
const
3201 *
str +=
"Project (ver.2)";
3211 if ( !title.empty() ) {
3217 for ( ; iter; ++iter) {
3238 if ( !type_str.empty() && !content_str.empty() ) {
3241 if ( !content_str.empty() ) {
3242 *
str += content_str;
3265 objects::CScope* scope)
const
3285 *
str =
"Project Item";
3328 *
label +=
tree->CanGetTreetype() ?
tree->GetTreetype() :
"Bio Tree";
3335 *
label +=
"Biological Tree";
3342 if (
tree->IsSetLabel()) {
3354 if (
tree->IsSetTreetype()) {
3391 *
label +=
"Assembly";
3441 *
label +=
"Distance Matrix";
3470 *
label +=
"Entrez Gene Record";
3519 *
label +=
"Entrez Gene Set";
3529 (*iter)->GetGene().GetLabel(&s);
3531 (*iter)->GetSource().GetOrg().GetLabel(&s);
3569 *
label +=
"Variation";
3580 if(iOtherIds != OtherIds.begin())
3582 (*iOtherIds)->GetLabel(
label);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
size_t GetSize(void) const
******************************************************************* Moved from plugins/algo/init ****...
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, objects::CScope *scope) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
const CBioseq & GetNucFromNucProtSet(void) const
const CBioseq & GetMasterFromSegSet(void) const
const CBioseq & GetGenomicFromGenProdSet(void) const
void GetLabel(string *label, ELabelType type) const
void GetLabel(string *label, ELabelType type, bool worst=false) const
void GetLabel(string *label) const
CRange< TSeqPos > GetSeqRange(TDim row) const
CDistanceMatrix label handler.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType, objects::CScope *) const
CEntrezgene label handler.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, objects::CScope *scope) const
CEntrezgene_Set label handler.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, objects::CScope *scope) const
void GetLabel(const CObject &obj, string *str, CLabel::ELabelType type, objects::CScope *scope) const
bool IsSetDescr() const
retrieve the descriptor set for this project
const CProjectDescr & GetDescr() const
const CProjectFolder & GetData() const
retrieve our project's data, in the form of a project folder this may be a contrived entity,...
CGCAsssemblyHandler label handler.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, objects::CScope *scope) const
string GetName() const
Retrieve the name of this assembly.
const CGC_AssemblyDesc & GetDesc() const
Retrieve the full set of assembly descriptors.
@Gb_qual.hpp User-defined methods of the data storage class.
void GetLabel(string *label) const
void GetLabel(TGi gi, string *label) const
void AddCaches(const map< TGi, string > &caches)
map< TIntId, string > TGi2DescriptionMap
string GetLabel(TGi gi) const
bool HasLabel(TGi gi) const
CLabelDescriptionCacheImpl()
TGi2DescriptionMap m_DescrCache
void SetLabel(TGi gi, const string &label)
void GetLabel(string *label) const
void GetLabel(const CObject &obj, string *str, CLabel::ELabelType type, objects::CScope *scope) const
TSeqPos GetAlignLength(const CSeq_align &align, bool ungapped=false)
Compute the length of the alignment (= length of all segments, gaps + aligned)
int GetGapCount(const CSeq_align &align)
Compute the number of gaps in the alignment.
double GetPercentCoverage(CScope &scope, const CSeq_align &align, unsigned query=0)
Compute percent coverage of the query (sequence 0) (range 0-100)
int GetMismatchCount(CScope &scope, const CSeq_align &align)
Compute the number of mismatches in the alignment.
ESubtype GetSubtype(void) const
@ eSubtype_misc_structure
@ eSubtype_mobile_element
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *) const
CRange< TSeqPos > GetSeqRange(TDim row) const
GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin par...
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
bool GetNamedScore(const string &id, int &score) const
Get score.
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
CUserFeatHandler m_UserHandler
bool x_UseCustomLabel(const objects::CSeq_feat &feat) const
void x_LabelFromQualifiers(const objects::CSeq_feat &feat, string &label) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
void x_GetCustomLabel(const objects::CSeq_feat &feat, string &label) const
bool x_IncludeFeatureTypeInLabel(const objects::CSeq_feat &feat) const
namespace ncbi::objects::
const string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
TSeqPos GetLength(void) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
Base class for all serializable objects.
CSnpBitfield is a facade for representing any version of the SNP bitfield.
bool IsTrue(EProperty prop) const
const char * GetVariationClassString() const
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *) const
Class designed to hold a set of tax-ids represented as (on) bits in a bit vector.
const TBitVec & GetSelectedTaxIds() const
Template class for iteration on objects of class C (non-medifiable version)
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
handler specific for User-object features
void GetLabel(const CObject &obj_in, string *label, CLabel::ELabelType type, CScope *scope) const
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *) const
SIZE_TYPE ErrorSize() const
SIZE_TYPE InfoSize() const
SIZE_TYPE CriticalSize() const
SIZE_TYPE WarningSize() const
SIZE_TYPE TotalSize() const
SIZE_TYPE FatalSize() const
CVariation label handler.
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, objects::CScope *scope) const
TValidated GetValidated(void) const
bool IsSetAllele_origin(void) const
TAllele_origin GetAllele_origin(void) const
bool IsUniparentalDisomy() const
bool IsDeletionInsertion() const
bool IsSetValidated(void) const
bool IsTranslocation() const
void GetLabel(const CObject &obj, string *label, CLabel::ELabelType type, CScope *scope) const
static TRsid GetRsid(const CMappedFeat &mapped_feat)
Return rsid of SNP.
static int GetLength(const CMappedFeat &)
Return distance of neighbors in flanking sequence.
vector< string > TAlleles
list of alleles belonging to particular SNP a deletion is represented by a "-"
static void GetAlleles(const CMappedFeat &mapped_feat, TAlleles &Alleles)
Return list of alleles encoded in qual.
static string ClinSigAsString(const CVariation_ref &var, ELetterCase LetterCase=eLetterCase_Mixed)
get a human-readable text for various clinical significance types
Constant iterator designed to enumerate "ON" bits.
enumerator first() const
Returns enumerator pointing on the first non-zero bit.
enumerator end() const
Returns enumerator pointing on the next bit after the last.
size_type count() const noexcept
population count (count of ON bits)
container_type::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
void(*)(CSeq_entry_Handle seh, IWorkbench *wb, const CSerialObject &obj) handler
API (CDeflineGenerator) for computing sequences' titles ("definitions").
SStaticPair< const char *, const char * > TPair
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
#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 Error(CExceptionArgs_Base &args)
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
const string & GetMsg(void) const
Get message string.
const string & FindName(TEnumValueType value, bool allowBadValue) const
Find name of the enum by its numeric value.
static string GetTypeIconAlias(const string &user_type, const string &user_subtype)
static void RegisterLabelHandler(const string &type, ILabelHandler &handler)
static const string sm_Tp_Sequence
static const string sm_Tp_ProjectItem
static void StopCache()
Stop cache instance (call once at gBench stop)
static const string sm_Tp_EntrezGeneRecord
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
static string FormatStringsOccurrences(const std::vector< string > &strings, const string &delimiter=", ")
static const string sm_Tp_Alignment
static const string sm_Tp_Annotation
static const string sm_Tp_Sequence_Set
static const string sm_SbTp_PhySet
static const string sm_SbTp_MutSet_Aln
static void AddCaches(const map< TGi, string > &caches)
static void GetIconAlias(const CObject &obj, string *alias, objects::CScope *scope=NULL)
static const string sm_SbTp_PhySet_Aln
static const string sm_SbTp_Undefined
static const string sm_SbTp_DNA
static const string sm_SbTp_EcoSet
static const string sm_Tp_TaxId_Set
static const string sm_SbTp_Graphs
static bool HasHandler(const CTypeInfo &type)
static const string sm_SbTp_NucProt
static void CacheSeqId(const objects::CSeq_id &id, objects::CScope *scope)
Generate and cache description label for the specified gi.
static string ConcatenateStrings(const std::vector< string > &strings, const string &delimiter=", ")
static void SetLabelByData(objects::CProjectItem &item, objects::CScope *scope=NULL)
static const string sm_Tp_Feature
static const string sm_SbTp_PopSet_Aln
static const string sm_SbTp_EcoSet_Aln
static const string sm_SbTp_GenProdSet
static const string sm_Tp_Alignment_Set
static const string sm_SbTp_Features
static const string sm_SbTp_Sequence_IDs
static void TruncateLabel(string *label, unsigned length_limit, unsigned length_tolerance)
truncate the label to some specific length with a desired leven of precision algorithm tries to analy...
static void InitCache()
Initialize cache instance (call once at gBench start)
static const string sm_SbTp_Table
static const string sm_Tp_ValidationResult
static const string sm_SbTp_Protein
static const string sm_SbTp_MutSet
static const string sm_SbTp_ProjectVer2
static const string sm_SbTp_SegSeq
static void RegisterTypeIcon(const string &user_type, const string &user_subtype, const string &icon_alias)
static const string sm_SbTp_Locations
static const string sm_SbTp_PopSet
static TLabelMap sm_LabelMap
static string GetTypeName()
static const string sm_Tp_Variation
void GetLabel(string &label, CLabel::ELabelType type) const
static const string sm_SbTp_Alignments
static TAliasMap sm_AliasMap
static const string sm_Tp_Sequence_ID
static const string sm_Tp_Location
static const string sm_Tp_Project
#define ENUM_METHOD_NAME(EnumName)
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
#define MSerial_AsnText
I/O stream manipulators –.
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
EAccessionInfo
For IdentifyAccession (below)
CConstRef< CSeq_id > GetSeqIdOrNull(void) const
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
string GetLabel(const CSeq_id &id)
@ fLabel_Default
default options - always show the version
@ eContent
Untagged human-readable accession or the like.
@ eBoth
Type and content, delimited by a vertical bar.
TRange GetTotalRange(void) const
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
TSeqPos GetStop(ESeqLocExtremes ext) const
@ eEmpty_Allow
ignore empty locations
ELabelType
For compatibility with legacy code.
@ fFGL_NoComments
Leave out comments, even as fallbacks.
@ fFGL_NoQualifiers
Leave out qualifiers.
@ fFGL_Content
Include its content if there is any.
@ fFGL_Type
Always include the feature's type.
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...
bool IsOneBioseq(const CSeq_loc &loc, CScope *scope)
Returns true if all embedded CSeq_ids represent the same CBioseq, else false.
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
@ eGetId_ForceGi
return only a gi-based seq-id
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, EMissing action=eMissing_Default)
@ eGetBioseq_All
Search bioseq, load if not loaded yet.
CSeq_entry_Handle GetTopLevelEntry(void) const
Return a handle for the top-level seq-entry.
SAnnotSelector & SetMaxSize(TMaxSize max_size)
Set maximum number of annotations to find.
SAnnotSelector & SetLimitTSE(const CTSE_Handle &limit)
Limit annotations to those from the TSE only.
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt 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.
@ fWithCommas
Use commas as thousands separator.
const string & GetName(void) const
Get name of this type.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
static const char label[]
const TOrg & GetOrg(void) const
Get the Org member data.
list< CRef< CEntrezgene > > Tdata
const TSource & GetSource(void) const
Get the Source member data.
const Tdata & Get(void) const
Get the member data.
const TGene & GetGene(void) const
Get the Gene member data.
bool IsSetLabel(void) const
user-defined label Check if a value has been assigned to Label data member.
const TTitle & GetTitle(void) const
Get the Title member data.
bool IsSetTitle(void) const
user-defined title for the workspace Check if a value has been assigned to Title data member.
const TLabel & GetLabel(void) const
Get the Label member data.
bool IsSetData(void) const
a set of extra analyses perfromed by the user each of these may have descriptors Check if a value has...
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetDesc(void) const
descriptive name Check if a value has been assigned to Desc data member.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str 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.
const TDb & GetDb(void) const
Get the Db member data.
TBool GetBool(void) const
Get the variant data.
bool IsSetClass(void) const
endeavor which designed this object Check if a value has been assigned to Class data member.
const TClass & GetClass(void) const
Get the Class member data.
const TStr & GetStr(void) const
Get the variant data.
const TType & GetType(void) const
Get the Type member data.
TId GetId(void) const
Get the variant data.
const TName & GetName(void) const
Get the Name member data.
const TLong_name & GetLong_name(void) const
Get the Long_name member data.
bool IsSetLong_name(void) const
Check if a value has been assigned to Long_name data member.
bool IsSetName(void) const
Names of the assembly Check if a value has been assigned to Name data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
const TDenseg & GetDenseg(void) const
Get the variant data.
const TGenomic_id & GetGenomic_id(void) const
Get the Genomic_id member data.
bool IsReal(void) const
Check if variant Real is selected.
E_Choice Which(void) const
Which variant is currently selected.
bool CanGetGenomic_id(void) const
Check if it is safe to call GetGenomic_id method.
vector< CRef< CScore > > TScore
const TProduct_id & GetProduct_id(void) const
Get the Product_id member data.
vector< CRef< CSeq_id > > TIds
const TSpliced & GetSpliced(void) const
Get the variant data.
TInt GetInt(void) const
Get the variant data.
const TExons & GetExons(void) const
Get the Exons member data.
const TValue & GetValue(void) const
Get the Value member data.
bool CanGetProduct_id(void) const
Check if it is safe to call GetProduct_id method.
const TIds & GetIds(void) const
Get the Ids member data.
bool IsSetScore(void) const
for whole alignment Check if a value has been assigned to Score data member.
list< CRef< CSeq_align > > Tdata
const TScore & GetScore(void) const
Get the Score member data.
TReal GetReal(void) const
Get the variant data.
const TDisc & GetDisc(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
const Tdata & Get(void) const
Get the member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
@ e_not_set
No variant selected.
const TVal & GetVal(void) const
Get the Val member data.
TConcordant GetConcordant(void) const
Get the Concordant member data.
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
const TClone & GetClone(void) const
Get the variant data.
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
bool IsUser(void) const
Check if variant User is selected.
bool IsSetUnique(void) const
OPTIONAL? Check if a value has been assigned to Unique data member.
const TRegion & GetRegion(void) const
Get the variant data.
const TTitle & GetTitle(void) const
Get the Title member data.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSetDescr(void) const
text description Check if a value has been assigned to Descr data member.
const TQual & GetQual(void) const
Get the Qual member data.
bool IsSetConcordant(void) const
OPTIONAL? Check if a value has been assigned to Concordant data member.
const TLocation & GetLocation(void) const
Get the Location member data.
bool CanGetSeq(void) const
Check if it is safe to call GetSeq method.
const TData & GetData(void) const
Get the Data member data.
list< CRef< CClone_seq > > Tdata
const TUser & GetUser(void) const
Get the variant data.
const TName & GetName(void) const
Get the Name member data.
TSupport GetSupport(void) const
Get the Support member data.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
const TDescr & GetDescr(void) const
Get the Descr member data.
const TProduct & GetProduct(void) const
Get the Product member data.
bool IsSetPlacement_method(void) const
Check if a value has been assigned to Placement_method data member.
const TComment & GetComment(void) const
Get the Comment member data.
bool IsSetName(void) const
Official clone symbol Check if a value has been assigned to Name data member.
TUnique GetUnique(void) const
Get the Unique member data.
TSite GetSite(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TClone_seq & GetClone_seq(void) const
Get the Clone_seq member data.
TPlacement_method GetPlacement_method(void) const
Get the Placement_method member data.
const TSeq & GetSeq(void) const
Get the Seq member data.
vector< CRef< CGb_qual > > TQual
const TQual & GetQual(void) const
Get the Qual member data.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
const TVariation & GetVariation(void) const
Get the variant data.
bool IsRna(void) const
Check if variant Rna is selected.
bool CanGetSupport(void) const
Check if it is safe to call GetSupport method.
bool IsRegion(void) const
Check if variant Region is selected.
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
const TImp & GetImp(void) const
Get the variant data.
bool IsSetClone_seq(void) const
Check if a value has been assigned to Clone_seq data member.
bool CanGetComment(void) const
Check if it is safe to call GetComment method.
@ eSupport_supporting
sequence supports placement
@ eSupport_supports_other
supports a different placement
@ eSupport_prototype
sequence used to place clone
@ eSupport_non_supporting
does not support any placement
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
list< CRef< CSeq_interval > > Tdata
ENa_strand
strand of nucleic acid
const Tdata & Get(void) const
Get the member data.
const TId & GetId(void) const
Get the Id member data.
const TPnt & GetPnt(void) const
Get the variant data.
TPoint GetPoint(void) const
Get the Point member data.
const TWhole & GetWhole(void) const
Get the variant data.
TFrom GetFrom(void) const
Get the From member data.
bool IsGeneral(void) const
Check if variant General is selected.
list< CRef< CSeq_loc > > Tdata
E_Choice Which(void) const
Which variant is currently selected.
const TId & GetId(void) const
Get the Id member data.
const Tdata & Get(void) const
Get the member data.
const TPacked_pnt & GetPacked_pnt(void) const
Get the variant data.
vector< TSeqPos > TPoints
const TLocal & GetLocal(void) const
Get the variant data.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
bool IsLocal(void) const
Check if variant Local is selected.
const TPoints & GetPoints(void) const
Get the Points member data.
TStrand GetStrand(void) const
Get the Strand member data.
const TGeneral & GetGeneral(void) const
Get the variant data.
bool IsGi(void) const
Check if variant Gi is selected.
TTo GetTo(void) const
Get the To member data.
const TInt & GetInt(void) const
Get the variant data.
const TMix & GetMix(void) const
Get the variant data.
const TPacked_int & GetPacked_int(void) const
Get the variant data.
const TAccession & GetAccession(void) const
Get the Accession member data.
@ e_not_set
No variant selected.
const TSeq & GetSeq(void) const
Get the variant data.
TClass GetClass(void) const
Get the Class member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSet(void) const
Check if variant Set is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
list< CRef< CSeq_entry > > TSeq_set
@ eClass_equiv
a set of equivalent maps or seqs
@ eClass_parts
parts for 2 or 3
@ eClass_pop_set
population study
@ eClass_phy_set
phylogenetic study
@ eClass_conset
constructed sequence + parts
@ eClass_wgs_set
whole genome shotgun project
@ eClass_mut_set
set of mutations
@ eClass_pir
converted pir
@ eClass_eco_set
ecological sample study
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_gibb
geninfo backbone
@ eClass_gen_prod_set
genomic products, chrom+mRNA+protein
@ eClass_pdb_entry
a complete PDB entry
@ eClass_genbank
converted genbank
@ eClass_swissprot
converted SWISSPROT
@ eClass_segset
segmented sequence + parts
@ eClass_pub_set
all the seqs from a single publication
const Tdata & Get(void) const
Get the member data.
const TGraph & GetGraph(void) const
Get the variant data.
const TLocs & GetLocs(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_align > > TAlign
const TIds & GetIds(void) const
Get the variant data.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetDesc(void) const
used only for stand alone Seq-annots Check if a value has been assigned to Desc data member.
const TAlign & GetAlign(void) const
Get the variant data.
const TFtable & GetFtable(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
E_Choice Which(void) const
Which variant is currently selected.
list< CRef< CAnnotdesc > > Tdata
@ e_Ids
used for communication between tools
@ e_Locs
used for communication between tools
@ e_Name
a short name for this collection
@ e_Title
a title for this collection
bool CanGetAccession(void) const
Check if it is safe to call GetAccession method.
const TAccession & GetAccession(void) const
Get the Accession member data.
bool CanGetOther_ids(void) const
Check if it is safe to call GetOther_ids method.
bool CanGetId(void) const
Check if it is safe to call GetId method.
const TOther_ids & GetOther_ids(void) const
Get the Other_ids member data.
const TDescription & GetDescription(void) const
Get the Description member data.
bool CanGetDescription(void) const
Check if it is safe to call GetDescription method.
list< CRef< CDbtag > > TOther_ids
const TId & GetId(void) const
Get the Id member data.
const TInstance & GetInstance(void) const
Get the variant data.
const TVariant_prop & GetVariant_prop(void) const
Get the Variant_prop member data.
bool CanGetConsequence(void) const
Check if it is safe to call GetConsequence method.
bool CanGetMethod(void) const
Check if it is safe to call GetMethod method.
bool IsSetDelta(void) const
Sequence that replaces the location, in biological order.
bool IsSetVariant_prop(void) const
variant properties bit fields Check if a value has been assigned to Variant_prop data member.
list< CRef< CPhenotype > > TPhenotype
bool IsSetAllele_origin(void) const
Check if a value has been assigned to Allele_origin data member.
const TId & GetId(void) const
Get the Id member data.
const TDelta & GetDelta(void) const
Get the Delta member data.
list< CRef< C_E_Somatic_origin > > TSomatic_origin
const TData & GetData(void) const
Get the Data member data.
const TPhenotype & GetPhenotype(void) const
Get the Phenotype member data.
bool CanGetSomatic_origin(void) const
Check if it is safe to call GetSomatic_origin method.
bool IsInstance(void) const
Check if variant Instance is selected.
TOther_validation GetOther_validation(void) const
Get the Other_validation member data.
list< CRef< C_E_Consequence > > TConsequence
const TSomatic_origin & GetSomatic_origin(void) const
Get the Somatic_origin member data.
const TConsequence & GetConsequence(void) const
Get the Consequence member data.
const TParent_id & GetParent_id(void) const
Get the Parent_id member data.
list< CRef< CDelta_item > > TDelta
bool IsSetOther_validation(void) const
has this variant been validated? While a boolean flag offers no subtle distinctions of validation met...
bool CanGetParent_id(void) const
Check if it is safe to call GetParent_id method.
bool IsSetId(void) const
ids (i.e., SNP rsid / ssid, dbVar nsv/nssv) expected values include 'dbSNP|rs12334',...
bool CanGetPhenotype(void) const
Check if it is safe to call GetPhenotype method.
bool CanGetId(void) const
Check if it is safe to call GetId method.
const TMethod & GetMethod(void) const
Get the Method member data.
TAllele_origin GetAllele_origin(void) const
Get the Allele_origin member data.
@ eMethod_E_optical_mapping
@ eAllele_origin_not_tested
@ eAllele_origin_paternal
@ eAllele_origin_tested_inconclusive
@ eAllele_origin_biparental
@ eAllele_origin_uniparental
@ eAllele_origin_maternal
@ eAllele_origin_inherited
@ eAllele_origin_other
stopper - 2^31
static void s_GetBioseq_setType(const CBioseq_set &bst, string *label)
static void s_GetAlignmentTooltip(const CSeq_align &align, string *label, CScope *scope)
static void s_BreakSeq_loc(const CSeq_loc &loc, vector< CRef< CSeq_loc > > &locs, CScope *scope)
static void s_GetDefline(const CSeq_id &id, CScope *scope, string *label)
static void s_GetCachedDescription(const CSeq_id &id, CScope *scope, string *label)
static CFastMutex s_DFLock
static void s_GetAnnotContent(const CSeq_annot &annot, string *label, CScope *scope)
DEFINE_STATIC_MUTEX(sm_Mutex)
static void s_GetSeq_TotalRangeLabel(const CSeq_loc &loc, string *label, CScope *scope, CLabel::ELabelType type)
static sequence::CDeflineGenerator s_DefGen
This class seems to be non-thread safe even as a stack var.
static bool s_IsCopyNumberMethod(const CVariation_ref::TMethod &method)
static const CSeq_id * s_GetLabel(const CSeq_loc &loc, string *label, CScope *scope, CLabel::ELabelType type, const CSeq_id *last_id=NULL)
static void s_GetBioseq_setContent(const CBioseq_set &bst, string *label, CScope *scope)
static void s_GetSeq_intervalLabel(const CSeq_interval &interval, string *label, CScope *scope, CLabel::ELabelType type, const CSeq_id *last_id=NULL)
static void s_GetGenProdContent(const CBioseq_set &bst, string *label, CScope *scope)
static void s_GetAlignmentContent(const CSeq_align &align, string *label, CScope *scope)
static void s_GetNucProtContent(const CBioseq_set &bst, string *label, CScope *scope)
static void s_GetIdLabel(const CBioseq_set &bst, string *label, CScope *scope)
static int s_GetChildNum(const objects::CSeq_feat &feat)
static void s_GetSeqLabel(const CSeq_id &id, string *label, CScope *scope, CLabel::ELabelType type)
static bool s_HasAlignment(const CBioseq_set &bst, CScope *scope)
static bool s_IsLOH(const CVariation_ref &var)
static SForceRegister sm_ForceRegistration
static std::unique_ptr< CLabelDescriptionCacheImpl > s_DescrCachePtr
static size_t s_CountSegments(const CSeq_align &align)
static void s_GetAlignmentType(const CSeq_align &align, string *label)
static void s_GetAnnotType(const CSeq_annot &annot, string *label)
static TGi s_GetGi(const CSeq_id &id, CScope *scope)
static void s_GetSegsetContent(const CBioseq_set &bst, string *label, CScope *scope)
Def