& spectype )
106 if( typemap.
empty() ) {
114 returntypemap[spectype];
121 "CVcfReader::xProcessMetaLineInfo: Unrecognized line or record type.",
130 const string& specnumber )
133 if( specnumber ==
"R") {
136 if( specnumber ==
"A") {
139 if( specnumber ==
"G") {
142 if( specnumber ==
".") {
153 "CVcfReader::xProcessMetaLineInfo: Unrecognized SpecNumber type in FORAMT directive. " 154 "Recognized settings are \'A\', \'G\', \'R\', \'.\', or numeric.",
167m_MetaHandled(
false)
204pAnnot->
SetData().SetFtable();
234 for(
autolineInfo: readerData) {
235 const auto& line = lineInfo.mData;
237 boollineContainsVersion(
false);
269 "CVcfReader::ReadSeqAnnot: Unrecognized line or record type.");
307 bool& lineContainsVersion)
310 const stringprefix =
"##fileformat=VCFv";
316 string(
"CVcfReader::xProcessMetaLineFileFormat: ") +
317 "Missing VCF version string. Assuming VCFv"+
319 ". Proceed with care!");
322lineContainsVersion =
false;
326lineContainsVersion =
true;
328 stringversionStr = line.substr(prefix.length(), string::npos);
332 catch(
conststd::exception&) {
336 string(
"CVcfReader::xProcessMetaLineFileFormat: ") +
337 "Data file contains an unrecognized version string \""+
339 "\". Assuming VCFv"+
341 ". Proceed with care!");
351 string(
"CVcfReader::xProcessMetaLineFileFormat: Data file format \"") +
353 "\" exceeds reader supported format \""+
355 "\". Proceed with care!");
369 const stringprefix =
"##INFO=<";
370 const stringpostfix =
">";
377vector<string> fields;
378 string key, id, numcount,
type, description;
379 string info= line.substr(
380prefix.length(), line.length() - prefix.length() - postfix.length() );
388 "CVcfReader::xProcessMetaLineInfo: ##INFO with bad or missing \"ID\".",
393 if(
key!=
"Number") {
398 "CVcfReader::xProcessMetaLineInfo: ##INFO with bad or missing \"Number\".",
403 if(
key!=
"Type") {
408 "CVcfReader::xProcessMetaLineInfo: ##INFO with bad or missing \"Type\".",
413 if(
key!=
"Description") {
418 "CVcfReader::xProcessMetaLineInfo: ##INFO with bad or missing \"Description\".",
437 const stringprefix =
"##FILTER=<";
438 const stringpostfix =
">";
445vector<string> fields;
446 string key, id, description;
447 string info= line.substr(
448prefix.length(), line.length() - prefix.length() - postfix.length() );
456 "CVcfReader::xProcessMetaLineInfo: ##FILTER with bad or missing \"ID\".",
461 if(
key!=
"Description") {
466 "CVcfReader::xProcessMetaLineInfo: ##FILTER with bad or missing \"Description\".",
485 const stringprefix =
"##FORMAT=<";
486 const stringpostfix =
">";
493vector<string> fields;
494 string key, id, numcount,
type, description;
495 string info= line.substr(
496prefix.length(), line.length() - prefix.length() - postfix.length() );
504 "CVcfReader::xProcessMetaLineInfo: ##FORMAT with bad or missing \"ID\".",
509 if(
key!=
"Number") {
514 "CVcfReader::xProcessMetaLineInfo: " 515 "##FORMAT with bad or missing \"Number\".",
520 if(
key!=
"Type") {
525 "CVcfReader::xProcessMetaLineInfo: " 526 "##FORMAT with bad or missing \"Type\".",
531 if(
key!=
"Description") {
536 "CVcfReader::xProcessMetaLineInfo: " 537 "##FORMAT with bad or missing \"Description\".",
569vector<string>::iterator pos_format = find(
625pFeat->
SetData().SetVariation().SetData().SetSet().SetType(
626CVariation_ref::C_Data::C_Set::eData_set_type_package );
627pFeat->
SetData().SetVariation().SetVariant_prop().SetVersion( 5 );
629ext.
SetType().SetStr(
"VcfAttributes");
656annot.
SetData().SetFtable().push_back(pFeat);
668pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
672vector<string> variant;
674 switch(
data.m_SetType) {
676pIdentity->SetDeletion();
679variant.push_back(
data.m_strRef);
687variants.push_back(pIdentity);
691 for(
unsigned int i=0;
i<
data.m_Alt.size(); ++
i) {
703 for(
unsigned int i=0;
i<
data.m_Alt.size(); ++
i) {
707 switch(
data.m_SetType) {
747pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
751vector<string> variant;
752variant.push_back(
data.m_Alt[index]);
755variants.push_back(pVariant);
768pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
772vector<string> variant;
773variant.push_back(
data.m_Alt[index]);
776variants.push_back(pVariant);
787pItem->SetSeq().SetThis();
790instance.
SetDelta().push_back(pItem);
803pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
808pVariant->SetDeletion();
813variants.push_back(pVariant);
826pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
830 stringinsertion(
data.m_Alt[index]);
832pLiteral->
SetSeq_data().SetIupacna().Set(insertion);
834 static_cast<TSeqPos>(insertion.size()));
837pItem->SetSeq().SetLiteral(*pLiteral);
840instance.
SetDelta().push_back(pItem);
842variants.push_back(pVariant);
856 stringinsertion(
data.m_Alt[index]);
859pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
865 if(insertion.size() == 0) {
868variants.push_back(pVariant);
874pLiteral->
SetSeq_data().SetIupacna().Set(insertion);
878pItem->SetSeq().SetLiteral(*pLiteral);
879instance.
SetDelta().push_back(pItem);
882 if(insertion.size() == 1 &&
data.m_strRef.size() == 1) {
888variants.push_back(pVariant);
907 data.m_strLine = line;
912 if( (
data.m_Ids.size() == 1) && (
data.m_Ids[0] ==
".") ) {
922vector<string> infos;
925 for( vector<string>::iterator it = infos.begin();
926it != infos.end(); ++it )
930 data.m_Info[
key] = vector<string>();
937 for(
size_tu=9; u <
columns.size(); ++u ) {
938vector<string> values;
949 "Unable to parse given VCF data (syntax error).",
962 boolmaybeAllSnv = (
data.m_strRef.size() == 1);
964 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
965 if(
data.m_Alt[u].size() != 1) {
966maybeAllSnv =
false;
977 boolmaybeAllMnv =
true;
978 size_trefSize =
data.m_strRef.size();
979 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
980 if(
data.m_Alt[u].size() != refSize) {
981maybeAllMnv =
false;
991 boolmaybeAllIns =
true;
992 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
994maybeAllIns =
false;
1008 boolmaybeAllDel =
false;
1009 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1010 if(
data.m_Alt.size() == 1 &&
data.m_Alt[0].empty()) {
1011maybeAllDel =
true;
1032 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1033 if(
data.m_Alt[u] ==
data.m_strRef) {
1038 "CVcfReader::xNormalizeData: Invalid alternative.",
1046 booltrimComplete =
false;
1047 while(!
data.m_strRef.empty()) {
1048 charleadBase =
data.m_strRef[0];
1049 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1051trimComplete =
true;
1058 data.m_strRef =
data.m_strRef.substr(1);
1059 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1060 data.m_Alt[u] =
data.m_Alt[u].substr(1);
1066trimComplete =
false;
1067 size_trefSize =
data.m_strRef.size();
1068 size_ttrimSize = 0;
1069 while(refSize > trimSize) {
1070 stringpostfix =
data.m_strRef.substr(refSize-1-trimSize, trimSize+1);
1071 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1072 size_taltSize =
data.m_Alt[u].size();
1073 if(altSize < trimSize+1) {
1074trimComplete =
true;
1077 stringpostfixA =
data.m_Alt[u].substr(altSize-1-trimSize, trimSize+1);
1078 if(postfix != postfixA) {
1079trimComplete =
true;
1090 data.m_strRef.substr(0,
data.m_strRef.size()-trimSize);
1091 for(
size_tu=0; u <
data.m_Alt.size(); ++u) {
1093 data.m_Alt[u].substr(0,
data.m_Alt[u].size()-trimSize);
1142 if(
data.m_strRef.size() == 1) {
1152 static_cast<TSeqPos>(
data.m_iPos -1 +
data.m_strRef.length() - 1));
1163 if(
data.m_strRef.size() == 1) {
1171 static_cast<TSeqPos>(
data.m_iPos -1 +
data.m_strRef.length() - 1));
1185 if(
data.m_pdQual ) {
1216 if(
data.m_Info.empty()) {
1219vector<string> infos;
1220 for(
map<
string,vector<string> >::const_iterator cit =
data.m_Info.begin();
1221cit !=
data.m_Info.end(); cit++ )
1223 const string&
key= cit->first;
1224vector<string>
value= cit->second;
1225 if(
value.empty() ) {
1226infos.push_back(
key);
1230infos.push_back(
key+
"="+ joined );
1240 const string& strLine,
1247vector<string> parts;
1249 if(parts.size() >= 3) {
1250 const stringdigits(
"0123456789");
1251 boolcol2_is_numeric =
1252(string::npos == parts[1].find_first_not_of(digits));
1253 boolcol3_is_numeric =
1254(string::npos == parts[2].find_first_not_of(digits));
1255 if(col2_is_numeric && col3_is_numeric) {
1263 "Bad track line: Expected \"track key1=value1 key2=value2 ...\". Ignored.");
1276 if(
data.m_FormatKeys.empty()) {
1284pGenotypeData->
SetLabel().SetStr(
"genotype-data");
1287cit !=
data.m_GenotypeData.end(); ++cit) {
1288pGenotypeData->
AddField(cit->first,cit->second);
1290ext.
SetData().push_back(pGenotypeData);
1297 constvector<string>& ids,
1301 for(
const string&
id: ids) {
1307pDbtag->SetDb(
"dbSNP");
1308pDbtag->SetTag().SetId(idval);
1327 if(
data.m_Ids.empty() ) {
1334 autoit =
data.m_Info.find(
"SOURCE");
1336 if(
data.m_Info.end() != it) {
1337vector<string> sources = it->second;
1338 if(sources.size() > 0 &&
1350 if(
data.m_Info.find(
"DB") !=
data.m_Info.end() ) {
1351 string id=
data.m_Ids[0];
1360 else if(
data.m_Info.find(
"H2") !=
data.m_Info.end() ) {
1368 for(
size_t i=1;
i<
data.m_Ids.size(); ++
i) {
1369 if(
data.m_Info.find(
"DB") !=
data.m_Info.end()
1370&&
data.m_Info.find(
"H2") !=
data.m_Info.end() )
1393VP& props = pFeat->
SetData().SetVariation().SetVariant_prop();
1396props.SetResource_link() = 0;
1397props.SetGene_location() = 0;
1398props.SetEffect() = 0;
1399props.SetMapping() = 0;
1400props.SetFrequency_based_validation() = 0;
1401props.SetGenotype() = 0;
1402props.SetQuality_check() = 0;
1405props.SetVersion() = 5;
1408it = infos.
find(
"SLO");
1409 if(infos.
end() != it) {
1410props.SetResource_link() |= VP::eResource_link_submitterLinkout;
1413it = infos.
find(
"S3D");
1414 if(infos.
end() != it) {
1415props.SetResource_link() |= VP::eResource_link_has3D;
1418it = infos.
find(
"TPA");
1419 if(infos.
end() != it) {
1420props.SetResource_link() |= VP::eResource_link_provisional;
1423it = infos.
find(
"PM");
1424 if(infos.
end() != it) {
1425props.SetResource_link() |= VP::eResource_link_preserved;
1428it = infos.
find(
"CLN");
1429 if(infos.
end() != it) {
1430props.SetResource_link() |= VP::eResource_link_clinical;
1434it = infos.
find(
"PMC");
1435 if(infos.
end() != it) {
1438it = infos.
find(
"PMID");
1439 if(infos.
end() != it) {
1440vector<string> pmids = it->second;
1441 for(vector<string>::const_iterator cit = pmids.begin();
1442cit != pmids.end(); ++cit)
1451 "CVcfReader::xAssignVariantProps: Invalid PMID database ID.");
1456pDbtag->
SetDb(db);
1457pDbtag->
SetTag().SetId(
1469it = infos.
find(
"R5");
1470 if(infos.
end() != it) {
1471props.SetGene_location() |= VP::eGene_location_near_gene_5;
1474it = infos.
find(
"R3");
1475 if(infos.
end() != it) {
1476props.SetGene_location() |= VP::eGene_location_near_gene_3;
1479it = infos.
find(
"INT");
1480 if(infos.
end() != it) {
1481props.SetGene_location() |= VP::eGene_location_intron;
1484it = infos.
find(
"DSS");
1485 if(infos.
end() != it) {
1486props.SetGene_location() |= VP::eGene_location_donor;
1489it = infos.
find(
"ASS");
1490 if(infos.
end() != it) {
1491props.SetGene_location() |= VP::eGene_location_acceptor;
1494it = infos.
find(
"U5");
1495 if(infos.
end() != it) {
1496props.SetGene_location() |= VP::eGene_location_utr_5;
1499it = infos.
find(
"U3");
1500 if(infos.
end() != it) {
1505it = infos.
find(
"SYN");
1506 if(infos.
end() != it) {
1507props.SetGene_location() |= VP::eEffect_synonymous;
1510it = infos.
find(
"NSN");
1511 if(infos.
end() != it) {
1512props.SetGene_location() |= VP::eEffect_stop_gain;
1515it = infos.
find(
"NSM");
1516 if(infos.
end() != it) {
1517props.SetGene_location() |= VP::eEffect_missense;
1520it = infos.
find(
"NSF");
1521 if(infos.
end() != it) {
1522props.SetGene_location() |= VP::eEffect_frameshift;
1527it = infos.
find(
"WGT");
1528 if(infos.
end() != it) {
1534props.SetMap_weight() = VP::eMap_weight_is_uniquely_placed;
1538props.SetMap_weight() = VP::eMap_weight_placed_twice_on_same_chrom;
1542props.SetMap_weight() = VP::eMap_weight_placed_twice_on_diff_chrom;
1546props.SetMap_weight() = VP::eMap_weight_many_placements;
1551it = infos.
find(
"ASP");
1552 if(infos.
end() != it) {
1553props.SetMapping() |= VP::eMapping_is_assembly_specific;
1556it = infos.
find(
"CFL");
1557 if(infos.
end() != it) {
1558props.SetMapping() |= VP::eMapping_has_assembly_conflict;
1561it = infos.
find(
"OTH");
1562 if(infos.
end() != it) {
1563props.SetMapping() |= VP::eMapping_has_other_snp;
1568it = infos.
find(
"OTH");
1569 if(infos.
end() != it) {
1570props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_above_5pct_all;
1573it = infos.
find(
"G5A");
1574 if(infos.
end() != it) {
1575props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_above_5pct_1plus;
1578it = infos.
find(
"VLD");
1579 if(infos.
end() != it) {
1580props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_validated;
1583it = infos.
find(
"MUT");
1584 if(infos.
end() != it) {
1585props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_is_mutation;
1588it = infos.
find(
"GMAF");
1589 if(infos.
end() != it) {
1595it = infos.
find(
"GNO");
1596 if(infos.
end() != it) {
1597props.SetGenotype() |= VP::eGenotype_has_genotypes;
1600it = infos.
find(
"HD");
1601 if(infos.
end() != it) {
1602props.SetResource_link() |= VP::eResource_link_genotypeKit;
1607 if(infos.
end() != infos.
find(
"PH3")) {
1609pDbtag->
SetDb(
"BioProject");
1610pDbtag->
SetTag().SetId(60835);
1611pFeat->
SetData().SetVariation().SetOther_ids().push_back(pDbtag);
1613 if(infos.
end() != infos.
find(
"KGPhase1")) {
1615pDbtag->
SetDb(
"BioProject");
1616pDbtag->
SetTag().SetId(28889);
1617pFeat->
SetData().SetVariation().SetOther_ids().push_back(pDbtag);
1626it = infos.
find(
"GCF");
1627 if(infos.
end() != it) {
1628props.SetQuality_check() |= VP::eQuality_check_genotype_conflict;
1631it = infos.
find(
"NOV");
1632 if(infos.
end() != it) {
1633props.SetQuality_check() |= VP::eQuality_check_non_overlapping_alleles;
1636it = infos.
find(
"WTD");
1637 if(infos.
end() != it) {
1638props.SetQuality_check() |= VP::eQuality_check_withdrawn_by_submitter;
1641it = infos.
find(
"NOC");
1642 if(infos.
end() != it) {
1643props.SetQuality_check() |= VP::eQuality_check_contig_allele_missing;
1656 autoit = infos.
find(
"SOURCE");
1657 if(infos.
end() != it) {
1658vector<string> sources = it->second;
1659 if(sources.size() > 0 &&
1662 boolvalid_id=
false;
1673 "CVcfReader::xAssignVariantProps: No valid dbSNP identifier");
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.
static CObjReaderLineException * Create(EDiagSev eSeverity, unsigned int uLine, const std::string &strMessage, EProblem eProblem=eProblem_GeneralParsingError, const std::string &strSeqId=string(""), const std::string &strFeatureName=string(""), const std::string &strQualifierName=string(""), const std::string &strQualifierValue=string(""), CObjReaderLineException::EErrCode eErrCode=eFormat, const TVecOfLines &vecOfOtherLines=TVecOfLines())
Please use this instead of the constructor because the ctor is protected.
Common file reader utility functions.
static void Tokenize(const string &instr, const string &delim, vector< string > &tokens)
Tokenize a given string, respecting quoted substrings an atomic units.
static CRef< CSeq_id > AsSeqId(const string &rawId, long flags=0, bool localInts=true)
Convert a raw ID string to a Seq-id, based in given customization flags.
Defines and provides stubs for a general interface to a variety of file readers.
virtual bool xParseBrowserLine(const CTempString &, CSeq_annot &)
unique_ptr< CReaderMessageHandler > m_pMessageHandler
virtual bool xUngetLine(ILineReader &)
virtual bool xIsCommentLine(const CTempString &)
virtual CRef< CSeq_annot > xCreateSeqAnnot()
unsigned int m_uLineNumber
void ProcessError(CObjReaderLineException &, ILineErrorListener *)
vector< TReaderLine > TReaderData
virtual bool xGetLine(ILineReader &, string &)
virtual bool xParseTrackLine(const CTempString &)
virtual void xAssignTrackData(CSeq_annot &)
virtual CRef< CSeq_annot > ReadSeqAnnot(CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr)
Read an object from a given input stream, render it as a single Seq-annot.
std::atomic< unsigned int > m_uDataCount
virtual bool xIsTrackLine(const CTempString &)
namespace ncbi::objects::
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CUser_field & AddField(const string &label, int value)
add fields to the current user field
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
enum CVcfData::SetType_t m_SetType
map< string, vector< string > > INFOS
vector< string > m_FormatKeys
map< string, vector< string > > GTDATA
vector< string > m_MetaDirectives
void xProcessData(const TReaderData &, CSeq_annot &) override
virtual bool xAssignVariantMnv(const CVcfData &, unsigned int, CRef< CSeq_feat >)
virtual bool xProcessFilter(CVcfData &, CRef< CSeq_feat >)
void xAssignVariantSource(CVcfData &, CRef< CSeq_feat >)
virtual bool xAssignVariantProps(CVcfData &, CRef< CSeq_feat >)
virtual bool xProcessScore(CVcfData &, CRef< CSeq_feat >)
virtual bool xProcessTrackLine(const string &, CSeq_annot &)
virtual bool xAssignVariantIns(const CVcfData &, unsigned int, CRef< CSeq_feat >)
virtual bool xProcessDataLine(const string &, CSeq_annot &)
virtual bool xProcessMetaLine(const string &, CSeq_annot &)
CRef< CAnnotdesc > m_Meta
map< string, CVcfFormatSpec > m_FormatSpecs
virtual bool xNormalizeData(CVcfData &, ILineErrorListener *=nullptr)
bool xAssigndbSNPTag(const vector< string > &ids, CRef< CDbtag > pDbtag) const
virtual bool xProcessHeaderLine(const string &, CSeq_annot &)
static const double mMaxSupportedVersion
virtual bool xProcessMetaLineInfo(const string &, CSeq_annot &)
virtual bool xAssignVariationAlleleSet(const CVcfData &, CRef< CSeq_feat >)
vector< string > m_GenotypeHeaders
virtual bool xAssignVariantDelins(const CVcfData &, unsigned int, CRef< CSeq_feat >)
map< string, CVcfInfoSpec > m_InfoSpecs
map< string, CVcfFilterSpec > m_FilterSpecs
bool xIsCommentLine(const CTempString &) override
CVcfReader(int=0, CReaderListener *=nullptr)
virtual bool xAssignVcfMeta(CSeq_annot &)
virtual bool xAssignVariationIds(CVcfData &, CRef< CSeq_feat >)
virtual bool xAssignVariantDel(const CVcfData &, unsigned int, CRef< CSeq_feat >)
virtual bool xAssignVariantSnv(const CVcfData &, unsigned int, CRef< CSeq_feat >)
virtual void xSetFileFormat(const string &, CSeq_annot &, bool &)
virtual bool xAssignFeatureLocationSet(const CVcfData &, CRef< CSeq_feat >)
CRef< CSeq_annot > ReadSeqAnnot(ILineReader &, ILineErrorListener *=nullptr) override
Read an object from a given line reader, render it as a single Seq-annot, if possible.
void xGetData(ILineReader &, TReaderData &) override
virtual bool xProcessMetaLineFilter(const string &, CSeq_annot &)
virtual bool xParseData(const string &, CVcfData &, ILineErrorListener *=nullptr)
virtual bool xProcessMetaLineFormat(const string &, CSeq_annot &)
CRef< CSeq_annot > xCreateSeqAnnot() override
virtual bool xProcessFormat(CVcfData &, CRef< CSeq_feat >)
virtual bool xProcessInfo(CVcfData &, CRef< CSeq_feat >)
@ eProblem_GeneralParsingError
Abstract base class for lightweight line-by-line reading.
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const column_t columns[]
unsigned int TSeqPos
Type for sequence locations and lengths.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
TObjectType & GetNCObject(void) const
Get object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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 bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
bool IsSetData(void) const
the object itself Check if a value has been assigned to Data data member.
void SetTag(TTag &value)
Assign a value to Tag data member.
TData & SetData(void)
Assign a value to Data data member.
void SetLabel(TLabel &value)
Assign a value to Label data member.
const TData & GetData(void) const
Get the Data member data.
void SetType(TType &value)
Assign a value to Type data member.
void SetDb(const TDb &value)
Assign a value to Db data member.
TDbxref & SetDbxref(void)
Assign a value to Dbxref data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetExt(TExt &value)
Assign a value to Ext data member.
void SetData(TData &value)
Assign a value to Data data member.
void ResetExt(void)
Reset Ext data member.
const TExt & GetExt(void) const
Get the Ext member data.
void SetLength(TLength value)
Assign a value to Length data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
TUser & SetUser(void)
Select the variant.
const TUser & GetUser(void) const
Get the variant data.
bool IsSetDesc(void) const
used only for stand alone Seq-annots Check if a value has been assigned to Desc data member.
bool IsUser(void) const
Check if variant User is selected.
list< CRef< CVariation_ref > > TVariations
void SetObservation(TObservation value)
Assign a value to Observation data member.
void SetType(TType value)
Assign a value to Type data member.
TDelta & SetDelta(void)
Assign a value to Delta data member.
@ eType_snv
delta=[morph of length 1] NOTE: this is snV not snP; the latter requires frequency-based validation t...
@ eType_delins
delta=[del, ins]
@ eType_identity
delta=[]
@ eGene_location_utr_3
In 3' UTR (0x80)
@ eAction_del_at
excise sequence at location if multiplier is specified, delete len(location)*multiplier positions dow...
@ eAction_ins_before
insert seq before the location.start
@ eObservation_variant
inst represent the observed variant at a given position
@ eObservation_reference
inst represents the reference base at the position
Lightweight interface for getting lines of data with minimal memory copying.
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
static SLJIT_INLINE sljit_ins lr(sljit_gpr dst, sljit_gpr src)
static void s_AddDeleteDeltaItem(CVariation_inst &instance)
ESpecType SpecType(const string &spectype)
ESpecNumber SpecNumber(const string &specnumber)
@ eNumber_CountAllAlleles
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