zoomAnnotName = sAnnotName;
82 if(!name.IsNamed()) {
88base_name != sAnnotName) {
91 if(zoom_level <= max_zoom_level) {
92 if(zoom_level > best_zoom_level || best_zoom_level > max_zoom_level) {
93best_zoom_level = zoom_level;
97 if(zoom_level < best_zoom_level) {
98best_zoom_level = zoom_level;
141 size_tfeatures_estimate(0);
146 for( ; graph_iter; ++graph_iter) {
161features_estimate += (*iter_gr *
a+
b);
170features_estimate += (*iter_gr *
a+
b);
180 static TSeqPoss_SamplingRange(100 * 1000);
186features_estimate = (double(start_count + one_third_count + two_third_count + end_count) / double(s_SamplingRange * 4)) * range.
GetLength();
189 returnfeatures_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";
219 return "Pathogenic";
252 returnit == 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 stringsig_term = clinsig;
294vector<string> tokens;
296 for(
auto& it : tokens) {
302 size_tmax_index = 0;
304 for(
size_tindex = 0; index < tokens.size(); ++index) {
306 autosev_it = sm_Pathogenicity.
find(severity);
307 if(sev_it != sm_Pathogenicity.
end()) {
308 automax_it = sm_Pathogenicity.
find(max_significance);
309 if(max_it == sm_Pathogenicity.
end()) {
310max_significance = severity;
313 else if(sev_it->second > max_it->second) {
314max_significance = severity;
319 returntokens[max_index];
325 const stringsBaseURL(
"/projects/sviewer/images/");
329 returnsBaseURL +
"snp-patho-prob-patho_"+ colorTheme +
".png";
331 returnsBaseURL +
"snp-patho-patho_"+ colorTheme +
".png";
333 returnsBaseURL +
"snp-patho-def_"+ colorTheme +
".png";
339 static stringColorKeys[] = {
349 intv = (
int)floor(pvalue);
354 returnColorKeys[v-1];
376 const string&colorTheme)
378vector<string> tokens;
389pFormatter->AddDividerRow();
392pFormatter->StartRow();
394pFormatter->AddTagCol(
"Variation ID:",
ClinSigAsImgURL(entry->ClinSigID, colorTheme));
397pFormatter->AddTagCol(
"Variation ID:");
401pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid) +
402(sClinSig.empty() ?
string() :
", with "+ sClinSig +
" allele"));
403pFormatter->FinishRow();
404pFormatter->StartRow();
405pFormatter->AddTagCol(
"Location:");
407pFormatter->FinishRow();
410 stringsPackagedOMIM, sGene;
411vector<string> tokens;
413 if(tokens.size() > 0) {
414sPackagedOMIM = tokens[0];
416 if(tokens.size() > 1) {
458 boolisGoToPresent(
false);
461pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
true);
471pFormatter->AddDividerRow();
473pFormatter->StartRow();
474pFormatter->AddTagCol(
"Variation ID:");
475pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid));
476pFormatter->FinishRow();
477pFormatter->StartRow();
478pFormatter->AddTagCol(
"Location:");
480pFormatter->FinishRow();
482 boolisGoToPresent(
false);
483pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
false);
492pFormatter->AddDividerRow();
494 if(entry->snpid > 0) {
496pFormatter->StartRow();
497pFormatter->AddTagCol(
"Variation ID:");
498pFormatter->AddValueCol(pFormatter->CreateNcbiLink(
"rs"+rsid,
snpURL+rsid));
499pFormatter->FinishRow();
502 if(entry->geneId > 0) {
505geneId = entry->geneStringId;
507 if(!geneId.empty()) {
508pFormatter->StartRow();
509pFormatter->AddTagCol(
"Gene ID:");
510 if(!entry->geneName.empty()) {
511geneId +=
" ("+ entry->geneName +
")";
513pFormatter->AddValueCol(geneId);
514pFormatter->FinishRow();
516pFormatter->StartRow();
517pFormatter->AddTagCol(
"Location:");
520pFormatter->FinishRow();
521pFormatter->StartRow();
522pFormatter->AddTagCol(
"Phenotype:");
523pFormatter->AddValueCol(pFormatter->CreateNcbiLink(entry->trait,
phenotypeURL+ entry->trait +
"[mesh]"));
524pFormatter->FinishRow();
525pFormatter->StartRow();
526pFormatter->AddTagCol(
"Data source:");
528pFormatter->FinishRow();
529 if(entry->pvalue > 0) {
530pFormatter->StartRow();
531pFormatter->AddTagCol(
"P-Value:");
533pFormatter->FinishRow();
535 if(!entry->context.empty()) {
536pFormatter->StartRow();
537pFormatter->AddTagCol(
"Context:");
538pFormatter->AddValueCol(entry->context);
539pFormatter->FinishRow();
542 if(!entry->population.empty()) {
543pFormatter->StartRow();
544pFormatter->AddTagCol(
"Population:");
545pFormatter->AddValueCol(entry->population);
546pFormatter->FinishRow();
548 boolisGoToPresent(
false);
549pFormatter->AddPubmedLinksRow(entry->pmids, isGoToPresent,
false);
569 if(!iGeneMap->first.empty()) {
577 "&filters=source:dbsnp"));
584 bool& isGoToPresent,
590 boolisFirstRow(
true);
592pFormatter->StartRow();
593pFormatter->AddTagCol(isFirstRow ?
"Variation Viewer:":
"");
594pFormatter->AddValueCol(pFormatter->CreateNcbiLink(iLinkList->first, iLinkList->second));
595pFormatter->FinishRow();
609 bool& isGoToPresent)
613 boolisFirstRow(
true);
615pFormatter->StartRow();
616pFormatter->AddTagCol(isFirstRow ?
"ClinVar:":
"");
617pFormatter->AddValueCol(pFormatter->CreateNcbiLink(iLinkList->first, iLinkList->second));
618pFormatter->FinishRow();
627 if(entry->dbgaptext.empty())
632TNameValueMap aNameValueMap;
640TNameValueMap::const_iterator iNameValue;
642 if((iNameValue = aNameValueMap.find(
"data_src")) != aNameValueMap.end() &&
643!iNameValue->second.empty()) {
645pFormatter->
AddTagCol(
"Data source:");
650 if((iNameValue = aNameValueMap.find(
"phs")) != aNameValueMap.end() && !iNameValue->second.empty() && iNameValue->second !=
"0") {
652 stringphs(
"phs"+
string(6 - iNameValue->second.length(),
'0') + iNameValue->second);
654iNameValue = aNameValueMap.find(
"phs_desc");
657pFormatter->
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 stringpha(iNameValue->second);
664 stringpha_padded(
"pha"+
string(6 - iNameValue->second.length(),
'0') + iNameValue->second);
666iNameValue = aNameValueMap.find(
"pha_desc");
669pFormatter->
AddTagCol(
string((iNameValue != aNameValueMap.end() && !iNameValue->second.empty()) ? iNameValue->second :
"PHA") +
":");
682 switch(bin.
type) {
728 autouo = ref.
FindExt(
"VcfAttributes");
734 auto info= uf->GetString();
736 if(start_pos ==
NPOS)
738start_pos += attr_name.size() + 1;
740attr_value =
info.substr (start_pos, end_pos ==
NPOS?
NPOS: end_pos - start_pos);
746 return!attr_value.empty();
758vector<string> alt_alleles;
761 for(
autoiVariation: var_list) {
762 if(iVariation->IsSetData() && iVariation->GetData().IsInstance()) {
767 boolisReference(
false);
773 if((*iDelta)->CanGetSeq()) {
775 switch(DeltaSeq.
Which()) {
788ref_allele = sAllele;
790alt_alleles.push_back(sAllele);
798alt_alleles.push_back(
"");
816 boolmaybeAllSnv = (ref_allele.size() == 1);
818 for(
size_tu=0; u < alt_alleles.size(); ++u) {
819 if(alt_alleles[u].
size() != 1) {
820maybeAllSnv =
false;
830 boolmaybeAllMnv =
true;
831 size_trefSize = ref_allele.size();
832 for(
size_tu=0; u < alt_alleles.size(); ++u) {
833 if(alt_alleles[u].
size() != refSize) {
834maybeAllMnv =
false;
842 boolmaybeAllIns =
true;
843 for(
size_tu=0; u < alt_alleles.size(); ++u) {
844 if(alt_alleles[u].
size() <= ref_allele.size()) {
845maybeAllIns =
false;
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=");
891TRsIdVariationMap RsIdVariationMap;
893 for(
autoTerm: Terms) {
897 if(!sAssemblyAccession.empty()) {
898sSNPSearchURL +=
"&assm="+ sAssemblyAccession;
900 stringsSearchResult;
906sSearchResult >> SearchByRsIdReply;
909 for(
autoiPlacements: SearchByRsIdReply.
GetPlacements()) {
911 stringrsid(iPlacements->GetRsid());
917pVariation->SetData().SetNote(
"SNP search result");
918pVariation->SetDescription(
"SNP search result");
919pVariation->SetId().SetDb(
"dbSNP");
920pVariation->SetId().SetTag().SetStr(rsid);
921 autopId(
Ref(
new CSeq_id(iPlacements->GetAcc_ver())));
924iPlacements->GetFrom(),
925iPlacements->GetFrom() + iPlacements->GetLength() - 1)));
928pPlacement->SetLoc(*pLocation);
931 if(iPlacements->CanGetAssembly_acc()) {
932pPlacement->SetAssembly().SetDb(
"");
933pPlacement->SetAssembly().SetTag().SetStr(iPlacements->GetAssembly_acc());
935pVariation->SetPlacements().push_back(pPlacement);
938 autoiRsIdVariationMap(RsIdVariationMap.find(rsid));
939 if(iRsIdVariationMap == RsIdVariationMap.end()) {
941iRsIdVariationMap = InsertResult.first;
943iRsIdVariationMap->second.push_back(pVariation);
948 for(
autoiRsIdVariationMap: RsIdVariationMap) {
961 ITERATE(list<string>, iTerms, Terms) {
964 if(!sAssemblyAccession.empty()) {
965sSNPSearchURL +=
"&assm="+ sAssemblyAccession;
967 stringsSearchResult;
972 xml::node& ResultRoot(ResultXml.get_root_node());
975 const xml::node_setParamIdSet(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 stringsClin, sComment, sResultID, sQueryId;
983 stringsAttrName(iParamIdAttrs->get_name());
984 if(sAttrName ==
"isClin")
985sClin = iParamIdAttrs->get_value();
986 if(sAttrName ==
"comment")
987sComment = iParamIdAttrs->get_value();
988 if(sAttrName ==
"query_id")
989sQueryId = iParamIdAttrs->get_value();
990 if(sAttrName ==
"result_id")
991sResultID = iParamIdAttrs->get_value();
994 if(!sResultID.empty()) {
995SNPSearchResult.first = sResultID;
999 const xml::node_setPlacementSet(ResultRoot.run_xpath_query(PlacementExpr));
1002 const xml::attributes& PlacementAttrs(iPlacementSet->get_attributes());
1003 stringsAccession, sFrom, sTo, sAssemblyName, sGeneSymbol, sTopLevel;
1006 stringsAttrName(iPlacementAttrs->get_name());
1007 if(sAttrName ==
"to")
1008sTo = iPlacementAttrs->get_value();
1009 if(sAttrName ==
"from")
1010sFrom = iPlacementAttrs->get_value();
1011 if(sAttrName ==
"assembly_name")
1012sAssemblyName = iPlacementAttrs->get_value();
1013 if(sAttrName ==
"accession")
1014sAccession = iPlacementAttrs->get_value();
1015 if(sAttrName ==
"gene_symbol")
1016sGeneSymbol = iPlacementAttrs->get_value();
1017 if(sAttrName ==
"top_level")
1018sTopLevel = iPlacementAttrs->get_value();
1022NStr::StringToNumeric<TSeqPos>(sFrom),
1023NStr::StringToNumeric<TSeqPos>(sTo)));
1026pPlacement->SetLoc(*pLocation);
1029pPlacement->SetAssembly().SetDb(
"");
1030pPlacement->SetAssembly().SetTag().SetStr(sAssemblyName);
1032pVariation->SetPlacements().push_back(pPlacement);
1033pVariation->SetData().SetNote(
"SNP search result");
1034pVariation->SetDescription(
"SNP search result");
1035pVariation->SetId().SetDb(
"dbSNP");
1036pVariation->SetId().SetTag().SetStr(sResultID);
1039 if(!sComment.empty())
1040pVariation->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") {
1060pVariation->SetExt().push_back(pExt);
1062SNPSearchResult.second.push_back(pVariation);
1064ResultList.push_back(SNPSearchResult);
1073 Search(sTerms,
"", CompoundResultList);
1075ResultList.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=";
1089TRsIdVariationMap RsIdVariationMap;
1091 for(
autoTerm: Terms) {
1093sSNPSearchURL += Term;
1095 if(!sAssemblyAccession.empty()) {
1096sSNPSearchURL +=
"&assm="+ sAssemblyAccession;
1099 stringsSearchResult;
1101 if(sSearchResult.empty())
1122pVariation->SetData().SetNote(
"SNP search result");
1123pVariation->SetDescription(
"SNP search result");
1124pVariation->SetId().SetDb(
"dbSNP");
1125pVariation->SetId().SetTag().SetStr(varid);
1128 autopLocation(
Ref(
new CSeq_loc(*pId, from, from + length - 1)));
1131pPlacement->SetLoc(*pLocation);
1134pPlacement->SetAssembly().SetDb(
"");
1135pPlacement->SetAssembly().SetTag().SetStr(assembly_acc);
1137pVariation->SetPlacements().push_back(pPlacement);
1140 autoiRsIdVariationMap(RsIdVariationMap.find(varid));
1141 if(iRsIdVariationMap == RsIdVariationMap.end()) {
1143iRsIdVariationMap = InsertResult.first;
1145iRsIdVariationMap->second.push_back(pVariation);
1149 for(
autoiRsIdVariationMap: RsIdVariationMap) {
1156 const string& sVariantID,
1158 const string& ref_allele,
1159 const string& alt_alleles) :
1163m_sRefAllele_orig(ref_allele)
1165 NStr::Split(alt_alleles,
",", m_AltAlleles_orig);
1169m_sRefAllele_display = m_sRefAllele_orig.empty() ?
string(
"-") : m_sRefAllele_orig;
1170 for(
autoalt_allele_orig: m_AltAlleles_orig) {
1171m_AltAlleles_display.push_back(alt_allele_orig.empty() ?
string(
"-") : alt_allele_orig);
1174m_AltAlleles_display.push_back(
"-");
1177m_Len = m_sRefAllele_orig.length() - 1;
1180m_Len = m_sRefAllele_orig.length() - 1;
1184our_id->Assign(seq_id);
1189 const string& sVariantID,
1191 const string& ref_allele,
1192 const string& alt_alleles) :
1210 intallele_len = -1;
1211all_alt_alleles_same_len =
true;
1214 if((alt_allele_display.length() == 5) && (alt_allele_display[0] ==
'<') && (alt_allele_display[4] ==
'>'))
1216 intnew_allele_len(
max(allele_len, (
int)alt_allele_display.length()));
1217 if(allele_len != -1 && new_allele_len != allele_len) {
1218all_alt_alleles_same_len =
false;
1220allele_len = new_allele_len;
1232 label= sBriefLine +
" \n"+
1234 boolall_alt_alleles_same_len(
true);
1236 if(allele_len > 0) {
1245 label=
"VCF-model-variant";
1248 label=
"VCF variant";
1257 label=
"CVcfVariant";
1270 return "Insertion";
1297 if(it_info != end_pos) {
1308 autosvtype = 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 stringend_str = it_info->second;
1331 if(!end_str.empty()) {
1333 if(end >
m_Pos+ 1) {
1339 if(
m_VCF_Type== EVCF_Type::eVCF_ClinVar) {
1342 if(it_info != end_pos) {
1358 autoit = sm_CLNVCSO2Type.
find(it_info->second);
1359 if(it != sm_CLNVCSO2Type.
end()) {
1387 stringsInfoColumns;
1389 if(!sInfoColumns.empty()) {
1390sInfoColumns +=
";";
1392sInfoColumns += column_value.first +
"="+ column_value.second;
1394 returnsInfoColumns;
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[]
TTo GetTo(void) const
Get the To member data.
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.
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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4