73 string zoomAnnotName = sAnnotName;
82 if (!name.IsNamed()) {
88 base_name != sAnnotName) {
91 if (zoom_level <= max_zoom_level) {
92 if (zoom_level > best_zoom_level || best_zoom_level > max_zoom_level) {
93 best_zoom_level = zoom_level;
97 if (zoom_level < best_zoom_level) {
98 best_zoom_level = zoom_level;
141 size_t features_estimate(0);
146 for ( ; graph_iter; ++graph_iter) {
161 features_estimate += (*iter_gr *
a +
b);
170 features_estimate += (*iter_gr *
a +
b);
180 static TSeqPos s_SamplingRange(100 * 1000);
186 features_estimate = (double(start_count + one_third_count + two_third_count + end_count) / double(s_SamplingRange * 4)) *
range.GetLength();
189 return features_estimate;
195 const string NSnpGui::geneRevURL =
"/sites/entrez?Db=books&DbFrom=gene&Cmd=Link&LinkName=gene_books&LinkReadableName=Books&IdsFromResult=";
199 const string NSnpGui::PHAURL =
"/projects/SNP/GaPBrowser_prod/callGaPBrowser2.cgi?aid=";
200 const string NSnpGui::GenomeURL =
"https://www.genome.gov/gwastudies/index.cfm?snp=rs";
217 return "ProbablePathogenic";
252 return it == sm_ClinSigMap.
end() ?
262 color.Set(0.007f, 0.588f, 0.145f);
265 color.Set(0.011f, 0.784f, 0.192f);
268 color.Set(0.866f, 0.372f, 0.788f);
271 color.Set(0.796f, 0.043f, 0.674f);
274 color.Set(0.282f, 0.309f, 0.796f);
277 color.Set(0.349f, 0.349f, 0.349f);
284 string sig_term = clinsig;
294 vector<string> tokens;
296 for (
auto& it : tokens) {
302 size_t max_index = 0;
304 for (
size_t index = 0; index < tokens.size(); ++index) {
306 auto sev_it = sm_Pathogenicity.
find(severity);
307 if (sev_it != sm_Pathogenicity.
end()) {
308 auto max_it = sm_Pathogenicity.
find(max_significance);
309 if (max_it == sm_Pathogenicity.
end()) {
310 max_significance = severity;
313 else if (sev_it->second > max_it->second) {
314 max_significance = severity;
319 return tokens[max_index];
325 const string sBaseURL(
"/projects/sviewer/images/");
329 return sBaseURL +
"snp-patho-prob-patho_" + colorTheme +
".png";
331 return sBaseURL +
"snp-patho-patho_" + colorTheme +
".png";
333 return sBaseURL +
"snp-patho-def_" + colorTheme +
".png";
339 static string ColorKeys[] = {
349 int v = (
int)floor(pvalue);
354 return ColorKeys[v-1];
376 const string &colorTheme)
378 vector<string> tokens;
389 pFormatter->AddDividerRow();
392 pFormatter->StartRow();
394 pFormatter->AddTagCol(
"Variation ID:",
ClinSigAsImgURL(entry->ClinSigID, colorTheme));
397 pFormatter->AddTagCol(
"Variation ID:");
401 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid) +
402 (sClinSig.empty() ?
string() :
", with " + sClinSig +
" allele"));
403 pFormatter->FinishRow();
404 pFormatter->StartRow();
405 pFormatter->AddTagCol(
"Location:");
407 pFormatter->FinishRow();
410 string sPackagedOMIM, sGene;
411 vector<string> tokens;
413 if(tokens.size() > 0) {
414 sPackagedOMIM = tokens[0];
416 if(tokens.size() > 1) {
458 bool isGoToPresent(
false);
461 pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
true);
471 pFormatter->AddDividerRow();
473 pFormatter->StartRow();
474 pFormatter->AddTagCol(
"Variation ID:");
475 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid));
476 pFormatter->FinishRow();
477 pFormatter->StartRow();
478 pFormatter->AddTagCol(
"Location:");
480 pFormatter->FinishRow();
482 bool isGoToPresent(
false);
483 pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
false);
492 pFormatter->AddDividerRow();
494 if(entry->snpid > 0) {
496 pFormatter->StartRow();
497 pFormatter->AddTagCol(
"Variation ID:");
498 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid));
499 pFormatter->FinishRow();
502 if(entry->geneId > 0) {
505 geneId = entry->geneStringId;
507 if(!geneId.empty()) {
508 pFormatter->StartRow();
509 pFormatter->AddTagCol(
"Gene ID:");
510 if(!entry->geneName.empty()) {
511 geneId +=
" (" + entry->geneName +
")";
513 pFormatter->AddValueCol(geneId);
514 pFormatter->FinishRow();
516 pFormatter->StartRow();
517 pFormatter->AddTagCol(
"Location:");
520 pFormatter->FinishRow();
521 pFormatter->StartRow();
522 pFormatter->AddTagCol(
"Phenotype:");
523 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(entry->trait,
phenotypeURL + entry->trait +
"[mesh]"));
524 pFormatter->FinishRow();
525 pFormatter->StartRow();
526 pFormatter->AddTagCol(
"Data source:");
528 pFormatter->FinishRow();
529 if(entry->pvalue > 0) {
530 pFormatter->StartRow();
531 pFormatter->AddTagCol(
"P-Value:");
533 pFormatter->FinishRow();
535 if(!entry->context.empty()) {
536 pFormatter->StartRow();
537 pFormatter->AddTagCol(
"Context:");
538 pFormatter->AddValueCol(entry->context);
539 pFormatter->FinishRow();
542 if(!entry->population.empty()) {
543 pFormatter->StartRow();
544 pFormatter->AddTagCol(
"Population:");
545 pFormatter->AddValueCol(entry->population);
546 pFormatter->FinishRow();
548 bool isGoToPresent(
false);
549 pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
false);
569 if(!iGeneMap->first.empty()) {
577 "&filters=source:dbsnp"));
590 bool isFirstRow(
true);
592 pFormatter->StartRow();
593 pFormatter->AddTagCol(isFirstRow ?
"Variation Viewer:" :
"");
594 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(iLinkList->first, iLinkList->second));
595 pFormatter->FinishRow();
613 bool isFirstRow(
true);
615 pFormatter->StartRow();
616 pFormatter->AddTagCol(isFirstRow ?
"ClinVar:" :
"");
617 pFormatter->AddValueCol(pFormatter->CreateNcbiLink(iLinkList->first, iLinkList->second));
618 pFormatter->FinishRow();
627 if(entry->dbgaptext.empty())
632 TNameValueMap aNameValueMap;
640 TNameValueMap::const_iterator iNameValue;
642 if((iNameValue = aNameValueMap.find(
"data_src")) != aNameValueMap.end() &&
643 !iNameValue->second.empty()) {
650 if((iNameValue = aNameValueMap.find(
"phs")) != aNameValueMap.end() && !iNameValue->second.empty() && iNameValue->second !=
"0") {
652 string phs(
"phs" +
string(6 - iNameValue->second.length(),
'0') + iNameValue->second);
654 iNameValue = aNameValueMap.find(
"phs_desc");
657 pFormatter->
AddTagCol(
string((iNameValue != aNameValueMap.end() && !iNameValue->second.empty()) ? iNameValue->second :
"PHS") +
":");
662 if((iNameValue = aNameValueMap.find(
"pha")) != aNameValueMap.end() && !iNameValue->second.empty() && iNameValue->second !=
"0") {
663 string pha(iNameValue->second);
664 string pha_padded(
"pha" +
string(6 - iNameValue->second.length(),
'0') + iNameValue->second);
666 iNameValue = aNameValueMap.find(
"pha_desc");
669 pFormatter->
AddTagCol(
string((iNameValue != aNameValueMap.end() && !iNameValue->second.empty()) ? iNameValue->second :
"PHA") +
":");
728 auto uo = ref.
FindExt(
"VcfAttributes");
734 auto info = uf->GetString();
736 if (start_pos ==
NPOS)
738 start_pos += attr_name.size() + 1;
740 attr_value =
info.substr (start_pos, end_pos ==
NPOS ?
NPOS : end_pos - start_pos);
746 return !attr_value.empty();
758 vector<string> alt_alleles;
761 for (
auto iVariation: var_list) {
762 if (iVariation->IsSetData() && iVariation->GetData().IsInstance()) {
767 bool isReference(
false);
773 if ((*iDelta)->CanGetSeq()) {
775 switch (DeltaSeq.
Which()) {
788 ref_allele = sAllele;
790 alt_alleles.push_back(sAllele);
798 alt_alleles.push_back(
"");
816 bool maybeAllSnv = (ref_allele.size() == 1);
818 for (
size_t u=0; u < alt_alleles.size(); ++u) {
819 if (alt_alleles[u].
size() != 1) {
830 bool maybeAllMnv =
true;
831 size_t refSize = ref_allele.size();
832 for (
size_t u=0; u < alt_alleles.size(); ++u) {
833 if (alt_alleles[u].
size() != refSize) {
842 bool maybeAllIns =
true;
843 for (
size_t u=0; u < alt_alleles.size(); ++u) {
844 if (alt_alleles[u].
size() <= ref_allele.size()) {
852 if (alt_alleles.size() == 1 && alt_alleles[0].empty()) {
874 "https://www.ncbi.nlm.nih.gov/projects/variation/search-by-rsid/?format=asn1&rsid="
876 "https:///projects/SNP/beVarSearch.cgi?format=xml&report=varloc&id=");
891 TRsIdVariationMap RsIdVariationMap;
893 for(
auto Term: Terms) {
897 if(!sAssemblyAccession.empty()) {
898 sSNPSearchURL +=
"&assm=" + sAssemblyAccession;
900 string sSearchResult;
906 sSearchResult >> SearchByRsIdReply;
911 string rsid(iPlacements->GetRsid());
917 pVariation->SetData().SetNote(
"SNP search result");
918 pVariation->SetDescription(
"SNP search result");
919 pVariation->SetId().SetDb(
"dbSNP");
920 pVariation->SetId().SetTag().SetStr(rsid);
921 auto pId(
Ref(
new CSeq_id(iPlacements->GetAcc_ver())));
924 iPlacements->GetFrom(),
925 iPlacements->GetFrom() + iPlacements->GetLength() - 1)));
928 pPlacement->SetLoc(*pLocation);
931 if(iPlacements->CanGetAssembly_acc()) {
932 pPlacement->SetAssembly().SetDb(
"");
933 pPlacement->SetAssembly().SetTag().SetStr(iPlacements->GetAssembly_acc());
935 pVariation->SetPlacements().push_back(pPlacement);
938 auto iRsIdVariationMap(RsIdVariationMap.find(rsid));
939 if(iRsIdVariationMap == RsIdVariationMap.end()) {
941 iRsIdVariationMap = InsertResult.first;
943 iRsIdVariationMap->second.push_back(pVariation);
948 for(
auto iRsIdVariationMap: RsIdVariationMap) {
961 ITERATE(list<string>, iTerms, Terms) {
964 if(!sAssemblyAccession.empty()) {
965 sSNPSearchURL +=
"&assm=" + sAssemblyAccession;
967 string sSearchResult;
972 xml::node& ResultRoot(ResultXml.get_root_node());
975 const xml::node_set ParamIdSet(ResultRoot.run_xpath_query(ParamIdExpr));
978 NCBI_ASSERT(ParamIdSet.size() == 1,
"Unexpected number of <param_id> in SNP search result!");
980 const xml::attributes& ParamIdAttrs(ParamIdSet.begin()->get_attributes());
981 string sClin, sComment, sResultID, sQueryId;
983 string sAttrName(iParamIdAttrs->get_name());
984 if(sAttrName ==
"isClin")
985 sClin = iParamIdAttrs->get_value();
986 if(sAttrName ==
"comment")
987 sComment = iParamIdAttrs->get_value();
988 if(sAttrName ==
"query_id")
989 sQueryId = iParamIdAttrs->get_value();
990 if(sAttrName ==
"result_id")
991 sResultID = iParamIdAttrs->get_value();
994 if(!sResultID.empty()) {
995 SNPSearchResult.first = sResultID;
999 const xml::node_set PlacementSet(ResultRoot.run_xpath_query(PlacementExpr));
1002 const xml::attributes& PlacementAttrs(iPlacementSet->get_attributes());
1003 string sAccession, sFrom, sTo, sAssemblyName, sGeneSymbol, sTopLevel;
1006 string sAttrName(iPlacementAttrs->get_name());
1007 if(sAttrName ==
"to")
1008 sTo = iPlacementAttrs->get_value();
1009 if(sAttrName ==
"from")
1010 sFrom = iPlacementAttrs->get_value();
1011 if(sAttrName ==
"assembly_name")
1012 sAssemblyName = iPlacementAttrs->get_value();
1013 if(sAttrName ==
"accession")
1014 sAccession = iPlacementAttrs->get_value();
1015 if(sAttrName ==
"gene_symbol")
1016 sGeneSymbol = iPlacementAttrs->get_value();
1017 if(sAttrName ==
"top_level")
1018 sTopLevel = iPlacementAttrs->get_value();
1022 NStr::StringToNumeric<TSeqPos>(sFrom),
1023 NStr::StringToNumeric<TSeqPos>(sTo)));
1026 pPlacement->SetLoc(*pLocation);
1029 pPlacement->SetAssembly().SetDb(
"");
1030 pPlacement->SetAssembly().SetTag().SetStr(sAssemblyName);
1032 pVariation->SetPlacements().push_back(pPlacement);
1033 pVariation->SetData().SetNote(
"SNP search result");
1034 pVariation->SetDescription(
"SNP search result");
1035 pVariation->SetId().SetDb(
"dbSNP");
1036 pVariation->SetId().SetTag().SetStr(sResultID);
1039 if(!sComment.empty())
1040 pVariation->SetDescription(sComment);
1044 if(!sGeneSymbol.empty() || !sTopLevel.empty() || !sComment.empty() || !sQueryId.empty()) {
1046 if(!sGeneSymbol.empty()) {
1049 if(!sQueryId.empty()) {
1052 if(!sComment.empty()) {
1055 if(sTopLevel ==
"yes") {
1060 pVariation->SetExt().push_back(pExt);
1062 SNPSearchResult.second.push_back(pVariation);
1064 ResultList.push_back(SNPSearchResult);
1073 Search(sTerms,
"", CompoundResultList);
1075 ResultList.insert(ResultList.end(), iCompoundResultList->second.begin(), iCompoundResultList->second.end());
1080 static const char*
sSearchByVarIdHost =
"https://www.ncbi.nlm.nih.gov/projects/variation/viewer/search_by_varid/?format=json&varid=";
1089 TRsIdVariationMap RsIdVariationMap;
1091 for(
auto Term: Terms) {
1093 sSNPSearchURL += Term;
1095 if(!sAssemblyAccession.empty()) {
1096 sSNPSearchURL +=
"&assm=" + sAssemblyAccession;
1099 string sSearchResult;
1101 if (sSearchResult.empty())
1122 pVariation->SetData().SetNote(
"SNP search result");
1123 pVariation->SetDescription(
"SNP search result");
1124 pVariation->SetId().SetDb(
"dbSNP");
1125 pVariation->SetId().SetTag().SetStr(varid);
1128 auto pLocation(
Ref(
new CSeq_loc(*pId, from, from + length - 1)));
1131 pPlacement->SetLoc(*pLocation);
1134 pPlacement->SetAssembly().SetDb(
"");
1135 pPlacement->SetAssembly().SetTag().SetStr(assembly_acc);
1137 pVariation->SetPlacements().push_back(pPlacement);
1140 auto iRsIdVariationMap(RsIdVariationMap.find(varid));
1141 if(iRsIdVariationMap == RsIdVariationMap.end()) {
1143 iRsIdVariationMap = InsertResult.first;
1145 iRsIdVariationMap->second.push_back(pVariation);
1149 for(
auto iRsIdVariationMap: RsIdVariationMap) {
1156 const string& sVariantID,
1158 const string& ref_allele,
1159 const string& alt_alleles) :
1163 m_sRefAllele_orig(ref_allele)
1169 m_sRefAllele_display = m_sRefAllele_orig.empty() ?
string(
"-") : m_sRefAllele_orig;
1170 for(
auto alt_allele_orig: m_AltAlleles_orig) {
1171 m_AltAlleles_display.push_back(alt_allele_orig.empty() ?
string(
"-") : alt_allele_orig);
1174 m_AltAlleles_display.push_back(
"-");
1177 m_Len = m_sRefAllele_orig.length() - 1;
1180 m_Len = m_sRefAllele_orig.length() - 1;
1184 our_id->Assign(seq_id);
1189 const string& sVariantID,
1191 const string& ref_allele,
1192 const string& alt_alleles) :
1210 int allele_len = -1;
1211 all_alt_alleles_same_len =
true;
1214 if ((alt_allele_display.length() == 5) && (alt_allele_display[0] ==
'<') && (alt_allele_display[4] ==
'>'))
1216 int new_allele_len(
max(allele_len, (
int)alt_allele_display.length()));
1217 if(allele_len != -1 && new_allele_len != allele_len) {
1218 all_alt_alleles_same_len =
false;
1220 allele_len = new_allele_len;
1232 label = sBriefLine +
" \n" +
1234 bool all_alt_alleles_same_len(
true);
1236 if (allele_len > 0) {
1245 label =
"VCF-model-variant";
1248 label =
"VCF variant";
1257 label =
"CVcfVariant";
1297 if (it_info != end_pos) {
1308 auto svtype = svtype_map.find(svtype_value);
1309 if (svtype != svtype_map.end()) {
1313 if (svtype_value ==
"DUP")
1315 else if (svtype_value ==
"CNV")
1329 if (it_info != end_pos) {
1330 string end_str = it_info->second;
1331 if (!end_str.empty()) {
1333 if (end >
m_Pos + 1) {
1342 if (it_info != end_pos) {
1358 auto it = sm_CLNVCSO2Type.
find(it_info->second);
1359 if (it != sm_CLNVCSO2Type.
end()) {
1387 string sInfoColumns;
1389 if(!sInfoColumns.empty()) {
1390 sInfoColumns +=
";";
1392 sInfoColumns += column_value.first +
"=" + column_value.second;
1394 return sInfoColumns;
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.
const TAnnotNames & GetAnnotNames(void) const
size_t GetSize(void) const
Random-access iterator to access const JSON array element.
bool IsObject(void) const
CJson_ConstObject GetObject(void) const
Get JSON object contents of the node.
CJson_ConstArray GetArray(void) const
Get JSON array contents of the node.
CJson_ConstValue GetValue(void) const
Get JSON value contents of the node.
Uint8 GetUint8(void) const
TStringType GetString(void) const
bool ParseString(const TStringType &v)
Read JSON data from a UTF8 string.
bool ReadSucceeded(void) const
Test if the most recent read was successful.
static CNcbiApplication * Instance(void)
Singleton method.
class CRgbaColor provides a simple abstraction for managing colors.
namespace ncbi::objects::
CConstRef< CUser_object > FindExt(const string &ext_type) const
Find extension by type in exts container.
URL-decoder for string pairs parser.
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
storage for gene maps as seen in strings in SBinEntry::genes_reported and SBinEntry::genes_mapped
@ eIND
individual tracks (Venter, Watson, etc), data same as in eCLIN
@ eCITED
Cited Variations.
@ eCLIN
Clinical Variations.
@ eGAP
dbGaP analysis files
@ eGCAT
NHGRI GWAS Catalog Track (AKA Association Results)
static string SourceAsString(TSource Source)
get human-readable text for various source types
list< CRef< SBinEntry > > TBinEntryList
@ eLetterCase_ForceLower
always use lower case only
static string ClinSigAsString(const CVariation_ref &var, ELetterCase LetterCase=eLetterCase_Mixed)
get a human-readable text for various clinical significance types
const_iterator end() const
const_iterator find(const key_type &key) const
The xml::attributes class is used to access all the attributes of one xml::node.
The xml::document class is used to hold the XML tree and various bits of information about it.
The xml::node_set class is used to store xpath query result set.
The xml::node class is used to hold information about one XML node.
The xml::xpath_expression class is used to store xpath query string and optional XML namespaces.
static vector< string > arr
This file contains the definition of the xml::event_parser class.
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define NCBI_ASSERT(expr, mess)
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
static TAnnotNameType NameTypeStrToValue(const string &type)
static bool IsExtendedNAA(const string &annot, bool isStrict=false)
check if a given annotation is an extended NAA (named accession[.version][number],...
static void SetResolveDepth(objects::SAnnotSelector &sel, bool adaptive, int depth=-1)
help function for setting selector resolve depth.
@ eAnnot_Unnamed
unnamed annotation
vector< string > m_AltAlleles_orig
virtual void FinishRow()=0
finish the row (i.e. no other contents will be added to it)
static void GetBinLinks(const NSnpBins::SBin &bin, TLinkList &LinkList)
get a list of links associated with a given SNP bin
static const string pmURL
standard NCBI resourse URLs
string GetRefAllele_display() const
static const string snpURL
list< TSNPSearchCompoundResult > TSNPSearchCompoundResultList
results of a search for one or several ids
static const string c_SNPVarExt_TopLevel
list< CRef< CVariation > > TSNPSearchResultList
various placements of a variation
static size_t EstimateSNPCount(const TSeqRange &range, const string &sAnnotName, CBioseq_Handle &Handle)
static NSnp::TClinSigID ClinSigFromString(const string &clinsig)
converts string to clinical significance type (CPhenotype::EClinical_significance)
static const int c_BinWidth
standard width and height of a bin
static string SelectClinSigTerm(const string &clinsig)
returns the term with the highest pathogenicity if the CLNSIG string has multiple parts (terms)
static bool m_isSearchByRsid
virtual void AddValueCol(const string &sContents="", unsigned width=200, bool isNoWrap=false)=0
adds a value column to the row
const list< string > & GetAltAlleles_display() const
static string PValueAsColorKey(double pvalue)
preferred colorings for a given pvalue
string GetInfoColumnsAsString() const
static void Fetch(const string &url, string &result, const STimeout *timeout=kDefaultTimeout, bool is_cache=false)
Fetch a URL from the net using http GET.
static const string c_SNPVarExt_SearchClass
objects::CVariation_inst::EType m_VariationType
static void x_MakeClinVarLink(CConstRef< NSnpBins::SBinEntry > BinEntry, CIRef< ITooltipFormatter > pFormatter, bool &isGoToPresent)
makes a ClinVar link suitable for putting into a tooltip
virtual void AddTagCol(const string &sContents="", const string &sBulletSrc="")=0
adds a tag column to the row
static const string c_SNPVarExt_GeneSymbol
static void x_MakeVarVuLink(CConstRef< NSnpBins::SBinEntry > BinEntry, CIRef< ITooltipFormatter > pFormatter, bool &isGoToPresent, TGi gi)
makes a varVu link suitable for putting into a tooltip
static bool GetClinSigValue(const CSeq_feat &ref, string &attr_value)
returns CLNSIG attribute value from VcfAttribute user object returns false if not found
static void x_ProcessDbgaptext(CConstRef< NSnpBins::SBinEntry > BinEntry, ITooltipFormatter *pFormatter)
processes dbgaptext field and puts its contents into a tooltip
static const string geneRevURL
static void SearchByVarId(const std::string &sTerms, const string &sAssemblyAccession, TSNPSearchCompoundResultList &ResultList)
static bool isFromVcf(const CSeq_feat &variation_ref)
CConstRef< objects::CSeq_loc > m_SeqLoc
static const string VarVuURL
static string ClinSigAsColorKey(NSnp::TClinSigID ClinSigID)
preferred colorings for SNP clinical significances
static const string phenotypeURL
static string ClinSigAsImgURL(NSnp::TClinSigID ClinSigID, const string &colorTheme)
gets a URL to an image representing the given clinical significance
static const string PHAURL
pair< string, TSNPSearchResultList > TSNPSearchCompoundResult
results of a search for a given id (string) TSNPSearchResultList may be empty if the id has been foun...
static const string geneSymURL
static const string GAPStudyURL
static CVariation_inst::EType GetVcfType(const CSeq_feat &variation_ref)
static const string GenomeURL
static CGraph_CI GetGraph_CI(const TSeqRange &range, const string &sAnnotName, CBioseq_Handle &Handle)
static const string ClinVarIdURL
standard NCBI resourse URLs
list< string > m_AltAlleles_display
unique_ptr< objects::CInt_fuzz::ELim > m_LimitValue
static const string omimURL
static const string c_SNPVarExt_QueryId
static string PValueToString(double pvalue)
static const string c_SNPVarExt_Comment
list< TLink > TLinkList
list of URL links
static const string ClinVarURL
static void GetBinTooltip(const NSnpBins::SBin &bin, CIRef< ITooltipFormatter > pFormatter, TGi gi, const std::string &colorTheme)
generate a tooltip for a given bin object and put it into the formatter
int GetLongestAlleleLen(bool &all_alt_alleles_same_len) const
static string m_sSearchHost
void GetLabel(string &label, CLabel::ELabelType type) const
virtual void StartRow()=0
start a new table row
CVcfVariant(const objects::CSeq_id &seq_id, const string &sVariantID, size_t pos, const string &ref_allele, const string &alt_alleles)
alternative alleles separated by /
static CFeat_CI GetFeat_CI(const TSeqRange &range, const string &sAnnotName, CBioseq_Handle &Handle)
string GetAltAlleles_orig() const
static void ClinSigAsColor(NSnp::TClinSigID ClinSigID, CRgbaColor &color)
returns color for clinsig values (SV-4908) returns #767677 for undefined values
virtual string CreateNcbiLink(const string &sText, const string &sUrl) const =0
construct the HTML code for a link from the displayed text label and supplied NCBI URL path
static const int c_BinHeight
static void Search(const std::string &sTerms, const std::string &sAssemblyAccession, TSNPSearchCompoundResultList &ResultList)
search for given SNP ID(s) and get a list of results
static void x_GetSearchHost()
string GetAllAlleles_display() const
string GetVariationTypeAsString() const
unique_ptr< objects::CDelta_item::EAction > m_DeltaItemAction
const TPrim & Get(void) const
TRange GetTotalRange(void) const
TSeqPos GetComp(void) const
SAnnotSelector & ResetAnnotsNames(void)
Select annotations from all Seq-annots.
string CombineWithZoomLevel(const string &acc, int zoom_level)
Combine accession string and zoom level into a string with separator.
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
SAnnotSelector & SetExcludeExternal(bool exclude=true)
External annotations for the Object Manger are annotations located in top level Seq-entry different f...
SAnnotSelector & SetCollectNames(bool value=true)
Collect available annot names rather than annots.
SAnnotSelector & AddNamedAnnots(const CAnnotName &name)
Add named annot to set of annots names to look for.
bool ExtractZoomLevel(const string &full_name, string *acc_ptr, int *zoom_level_ptr)
Extract optional zoom level suffix from named annotation string.
const CSeq_loc & GetLoc(void) const
SAnnotSelector & AddUnnamedAnnots(void)
Add unnamed annots to set of annots names to look for.
const CSeq_graph::C_Graph & GetGraph(void) const
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
position_type GetLength(void) const
bool IntersectingWith(const TThisType &r) const
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
virtual bool GetBool(const string §ion, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void Parse(const CTempString str, NStr::EMergeDelims merge_argsep=NStr::eMergeDelims)
Parse the 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 list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
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 size_t StringToSizet(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to size_t.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the 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 StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static void TrimPrefixInPlace(string &str, const CTempString prefix, ECase use_case=eCase)
Trim prefix from a string (in-place)
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 & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string & ToUpper(string &str)
Convert string to upper case – string& version.
static string & ToLower(string &str)
Convert string to lower case – string& version.
@ fConvErr_NoThrow
Do not throw an exception on error.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ fWithCommas
Use commas as thousands separator.
@ eNocase
Case insensitive compare.
static const char label[]
TFrom GetFrom(void) const
Get the From member data.
const TData & GetData(void) const
Get the Data member data.
bool IsVariation(void) const
Check if variant Variation is selected.
const TVariation & GetVariation(void) const
Get the variant data.
const TInt & GetInt(void) const
Get the variant data.
const TValues & GetValues(void) const
Get the Values member data.
const TByte & GetByte(void) const
Get the variant data.
const TValues & GetValues(void) const
Get the Values member data.
bool IsByte(void) const
Check if variant Byte is selected.
const TIupacaa & GetIupacaa(void) const
Get the variant data.
bool IsIupacaa(void) const
Check if variant Iupacaa is selected.
const TIupacna & GetIupacna(void) const
Get the variant data.
bool CanGetSeq_data(void) const
Check if it is safe to call GetSeq_data method.
bool IsIupacna(void) const
Check if variant Iupacna is selected.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
@ eMol_genomic
"g." coordinates in HGVS
TType GetType(void) const
Get the Type member data.
E_Choice Which(void) const
Which variant is currently selected.
TObservation GetObservation(void) const
Get the Observation member data.
const TSet & GetSet(void) const
Get the variant data.
const TDelta & GetDelta(void) const
Get the Delta member data.
const TData & GetData(void) const
Get the Data member data.
bool CanGetDelta(void) const
Check if it is safe to call GetDelta method.
const TLiteral & GetLiteral(void) const
Get the variant data.
bool CanGetObservation(void) const
Check if it is safe to call GetObservation method.
bool IsSet(void) const
Check if variant Set is selected.
list< CRef< CDelta_item > > TDelta
bool IsSetVariations(void) const
Check if a value has been assigned to Variations data member.
EClinical_significance
does this variant have known clinical significance?
const TVariations & GetVariations(void) const
Get the Variations member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
@ eType_snv
delta=[morph of length 1] NOTE: this is snV not snP; the latter requires frequency-based validation t...
@ eType_inv
delta=[del, ins.seq= RevComp(variation-location)]
@ eType_mnp
delta=[morph of length >1]
@ eType_microsatellite
delta=[del, ins.seq= repeat-unit with fuzzy multiplier] variation-location is the microsat expansion ...
@ eType_delins
delta=[del, ins]
@ eType_cnv
delta=[del, ins= 'this' with fuzzy multiplier]
@ eType_translocation
delta=like delins
@ eResource_link_clinical
Clinical if LSDB, OMIM, TPA, Diagnostic (0x10)
@ eAction_del_at
excise sequence at location if multiplier is specified, delete len(location)*multiplier positions dow...
@ e_This
same location as variation-ref itself
@ eObservation_reference
inst represents the reference base at the position
@ eClinical_significance_drug_response
@ eClinical_significance_probable_pathogenic
@ eClinical_significance_unknown
@ eClinical_significance_untested
@ eClinical_significance_pathogenic
@ eClinical_significance_probable_non_pathogenic
@ eClinical_significance_other
@ eClinical_significance_histocompatibility
@ eClinical_significance_non_pathogenic
bool IsPlacements(void) const
Check if variant Placements is selected.
const TPlacements & GetPlacements(void) const
Get the variant data.
unsigned int
A callback function used to compare two keys in a database.
range(_Ty, _Ty) -> range< _Ty >
constexpr bool empty(list< Ts... >) noexcept
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Process information in the NCBI Registry, including working with configuration files.
const int kMaxDoublePrecision
static const char * sSearchByVarIdHost
static void s_GetVcfAttribute(const CSeq_feat &ref, const string &attr_name, string &attr_value)
const int kMaxDoubleStringSize
TBinEntryList m_EntryList