59 #define NCBI_USE_ERRCODE_X Objtools_Rd_RepMask
102 const string& spectype )
106 if ( typemap.
empty() ) {
114 return typemap[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.",
234 for (
auto lineInfo: readerData) {
235 const auto& line = lineInfo.mData;
237 bool lineContainsVersion(
false);
269 "CVcfReader::ReadSeqAnnot: Unrecognized line or record type.");
307 bool& lineContainsVersion)
310 const string prefix =
"##fileformat=VCFv";
316 string(
"CVcfReader::xProcessMetaLineFileFormat: ") +
317 "Missing VCF version string. Assuming VCFv" +
319 ". Proceed with care!");
322 lineContainsVersion =
false;
326 lineContainsVersion =
true;
328 string versionStr = line.substr(prefix.length(), string::npos);
332 catch (std::exception except) {
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 string prefix =
"##INFO=<";
370 const string postfix =
">";
377 vector<string> fields;
378 string key, id, numcount,
type, description;
379 string info = line.substr(
380 prefix.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 string prefix =
"##FILTER=<";
438 const string postfix =
">";
445 vector<string> fields;
446 string key, id, description;
447 string info = line.substr(
448 prefix.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 string prefix =
"##FORMAT=<";
486 const string postfix =
">";
493 vector<string> fields;
494 string key, id, numcount,
type, description;
495 string info = line.substr(
496 prefix.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\".",
569 vector<string>::iterator pos_format = find(
625 pFeat->
SetData().SetVariation().SetData().SetSet().SetType(
626 CVariation_ref::C_Data::C_Set::eData_set_type_package );
627 pFeat->
SetData().SetVariation().SetVariant_prop().SetVersion( 5 );
629 ext.
SetType().SetStr(
"VcfAttributes" );
656 annot.
SetData().SetFtable().push_back(pFeat);
668 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
672 vector<string> variant;
674 switch(
data.m_SetType) {
676 pIdentity->SetDeletion();
679 variant.push_back(
data.m_strRef);
687 variants.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) {
747 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
751 vector<string> variant;
752 variant.push_back(
data.m_Alt[index]);
755 variants.push_back(pVariant);
768 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
772 vector<string> variant;
773 variant.push_back(
data.m_Alt[index]);
776 variants.push_back(pVariant);
787 pItem->SetSeq().SetThis();
790 instance.
SetDelta().push_back(pItem);
803 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
808 pVariant->SetDeletion();
813 variants.push_back(pVariant);
826 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
830 string insertion(
data.m_Alt[index]);
832 pLiteral->
SetSeq_data().SetIupacna().Set(insertion);
834 static_cast<TSeqPos>(insertion.size()));
837 pItem->SetSeq().SetLiteral(*pLiteral);
840 instance.
SetDelta().push_back(pItem);
842 variants.push_back(pVariant);
856 string insertion(
data.m_Alt[index]);
859 pFeature->
SetData().SetVariation().SetData().SetSet().SetVariations();
865 if (insertion.size() == 0) {
868 variants.push_back(pVariant);
874 pLiteral->
SetSeq_data().SetIupacna().Set(insertion);
878 pItem->SetSeq().SetLiteral(*pLiteral);
879 instance.
SetDelta().push_back(pItem);
882 if (insertion.size() == 1 &&
data.m_strRef.size() == 1) {
888 variants.push_back(pVariant);
907 data.m_strLine = line;
912 if ( (
data.m_Ids.size() == 1) && (
data.m_Ids[0] ==
".") ) {
922 vector<string> infos;
925 for ( vector<string>::iterator it = infos.begin();
926 it != infos.end(); ++it )
930 data.m_Info[
key] = vector<string>();
937 for (
size_t u=9; u <
columns.size(); ++u ) {
938 vector<string> values;
949 "Unable to parse given VCF data (syntax error).",
962 bool maybeAllSnv = (
data.m_strRef.size() == 1);
964 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
965 if (
data.m_Alt[u].size() != 1) {
977 bool maybeAllMnv =
true;
978 size_t refSize =
data.m_strRef.size();
979 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
980 if (
data.m_Alt[u].size() != refSize) {
991 bool maybeAllIns =
true;
992 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1008 bool maybeAllDel =
false;
1009 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1010 if (
data.m_Alt.size() == 1 &&
data.m_Alt[0].empty()) {
1032 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1033 if (
data.m_Alt[u] ==
data.m_strRef) {
1038 "CVcfReader::xNormalizeData: Invalid alternative.",
1046 bool trimComplete =
false;
1047 while (!
data.m_strRef.empty()) {
1048 char leadBase =
data.m_strRef[0];
1049 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1051 trimComplete =
true;
1058 data.m_strRef =
data.m_strRef.substr(1);
1059 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1060 data.m_Alt[u] =
data.m_Alt[u].substr(1);
1066 trimComplete =
false;
1067 size_t refSize =
data.m_strRef.size();
1068 size_t trimSize = 0;
1069 while (refSize > trimSize) {
1070 string postfix =
data.m_strRef.substr(refSize-1-trimSize, trimSize+1);
1071 for (
size_t u=0; u <
data.m_Alt.size(); ++u) {
1072 size_t altSize =
data.m_Alt[u].size();
1073 if (altSize < trimSize+1) {
1074 trimComplete =
true;
1077 string postfixA =
data.m_Alt[u].substr(altSize-1-trimSize, trimSize+1);
1078 if (postfix != postfixA) {
1079 trimComplete =
true;
1090 data.m_strRef.substr(0,
data.m_strRef.size()-trimSize);
1091 for (
size_t u=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) {
1163 if (
data.m_strRef.size() == 1) {
1185 if (
data.m_pdQual ) {
1216 if (
data.m_Info.empty()) {
1219 vector<string> infos;
1220 for (
map<
string,vector<string> >::const_iterator cit =
data.m_Info.begin();
1221 cit !=
data.m_Info.end(); cit++ )
1223 const string&
key = cit->first;
1224 vector<string>
value = cit->second;
1225 if (
value.empty() ) {
1226 infos.push_back(
key );
1230 infos.push_back(
key +
"=" + joined );
1240 const string& strLine,
1247 vector<string> parts;
1249 if (parts.size() >= 3) {
1250 const string digits(
"0123456789");
1251 bool col2_is_numeric =
1252 (string::npos == parts[1].find_first_not_of(digits));
1253 bool col3_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()) {
1284 pGenotypeData->
SetLabel().SetStr(
"genotype-data");
1287 cit !=
data.m_GenotypeData.end(); ++cit) {
1288 pGenotypeData->
AddField(cit->first,cit->second);
1290 ext.
SetData().push_back(pGenotypeData);
1297 const vector<string>& ids,
1301 for (
const string&
id : ids) {
1307 pDbtag->SetDb(
"dbSNP");
1308 pDbtag->SetTag().SetId(idval);
1327 if (
data.m_Ids.empty() ) {
1334 auto it =
data.m_Info.find(
"SOURCE");
1336 if (
data.m_Info.end() != it) {
1337 vector<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() )
1393 VP& props = pFeat->
SetData().SetVariation().SetVariant_prop();
1396 props.SetResource_link() = 0;
1397 props.SetGene_location() = 0;
1398 props.SetEffect() = 0;
1399 props.SetMapping() = 0;
1400 props.SetFrequency_based_validation() = 0;
1401 props.SetGenotype() = 0;
1402 props.SetQuality_check() = 0;
1405 props.SetVersion() = 5;
1408 it = infos.
find(
"SLO");
1409 if (infos.
end() != it) {
1410 props.SetResource_link() |= VP::eResource_link_submitterLinkout;
1413 it = infos.
find(
"S3D");
1414 if (infos.
end() != it) {
1415 props.SetResource_link() |= VP::eResource_link_has3D;
1418 it = infos.
find(
"TPA");
1419 if (infos.
end() != it) {
1420 props.SetResource_link() |= VP::eResource_link_provisional;
1423 it = infos.
find(
"PM");
1424 if (infos.
end() != it) {
1425 props.SetResource_link() |= VP::eResource_link_preserved;
1428 it = infos.
find(
"CLN");
1429 if (infos.
end() != it) {
1430 props.SetResource_link() |= VP::eResource_link_clinical;
1434 it = infos.
find(
"PMC");
1435 if (infos.
end() != it) {
1438 it = infos.
find(
"PMID");
1439 if (infos.
end() != it) {
1440 vector<string> pmids = it->second;
1441 for (vector<string>::const_iterator cit = pmids.begin();
1442 cit != pmids.end(); ++cit)
1451 "CVcfReader::xAssignVariantProps: Invalid PMID database ID.");
1469 it = infos.
find(
"R5");
1470 if (infos.
end() != it) {
1471 props.SetGene_location() |= VP::eGene_location_near_gene_5;
1474 it = infos.
find(
"R3");
1475 if (infos.
end() != it) {
1476 props.SetGene_location() |= VP::eGene_location_near_gene_3;
1479 it = infos.
find(
"INT");
1480 if (infos.
end() != it) {
1481 props.SetGene_location() |= VP::eGene_location_intron;
1484 it = infos.
find(
"DSS");
1485 if (infos.
end() != it) {
1486 props.SetGene_location() |= VP::eGene_location_donor;
1489 it = infos.
find(
"ASS");
1490 if (infos.
end() != it) {
1491 props.SetGene_location() |= VP::eGene_location_acceptor;
1494 it = infos.
find(
"U5");
1495 if (infos.
end() != it) {
1496 props.SetGene_location() |= VP::eGene_location_utr_5;
1499 it = infos.
find(
"U3");
1500 if (infos.
end() != it) {
1505 it = infos.
find(
"SYN");
1506 if (infos.
end() != it) {
1507 props.SetGene_location() |= VP::eEffect_synonymous;
1510 it = infos.
find(
"NSN");
1511 if (infos.
end() != it) {
1512 props.SetGene_location() |= VP::eEffect_stop_gain;
1515 it = infos.
find(
"NSM");
1516 if (infos.
end() != it) {
1517 props.SetGene_location() |= VP::eEffect_missense;
1520 it = infos.
find(
"NSF");
1521 if (infos.
end() != it) {
1522 props.SetGene_location() |= VP::eEffect_frameshift;
1527 it = infos.
find(
"WGT");
1528 if (infos.
end() != it) {
1534 props.SetMap_weight() = VP::eMap_weight_is_uniquely_placed;
1538 props.SetMap_weight() = VP::eMap_weight_placed_twice_on_same_chrom;
1542 props.SetMap_weight() = VP::eMap_weight_placed_twice_on_diff_chrom;
1546 props.SetMap_weight() = VP::eMap_weight_many_placements;
1551 it = infos.
find(
"ASP");
1552 if (infos.
end() != it) {
1553 props.SetMapping() |= VP::eMapping_is_assembly_specific;
1556 it = infos.
find(
"CFL");
1557 if (infos.
end() != it) {
1558 props.SetMapping() |= VP::eMapping_has_assembly_conflict;
1561 it = infos.
find(
"OTH");
1562 if (infos.
end() != it) {
1563 props.SetMapping() |= VP::eMapping_has_other_snp;
1568 it = infos.
find(
"OTH");
1569 if (infos.
end() != it) {
1570 props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_above_5pct_all;
1573 it = infos.
find(
"G5A");
1574 if (infos.
end() != it) {
1575 props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_above_5pct_1plus;
1578 it = infos.
find(
"VLD");
1579 if (infos.
end() != it) {
1580 props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_validated;
1583 it = infos.
find(
"MUT");
1584 if (infos.
end() != it) {
1585 props.SetFrequency_based_validation() |= VP::eFrequency_based_validation_is_mutation;
1588 it = infos.
find(
"GMAF");
1589 if (infos.
end() != it) {
1595 it = infos.
find(
"GNO");
1596 if (infos.
end() != it) {
1597 props.SetGenotype() |= VP::eGenotype_has_genotypes;
1600 it = infos.
find(
"HD");
1601 if (infos.
end() != it) {
1602 props.SetResource_link() |= VP::eResource_link_genotypeKit;
1607 if (infos.
end() != infos.
find(
"PH3")) {
1609 pDbtag->
SetDb(
"BioProject");
1610 pDbtag->
SetTag().SetId(60835);
1611 pFeat->
SetData().SetVariation().SetOther_ids().push_back(pDbtag);
1613 if (infos.
end() != infos.
find(
"KGPhase1")) {
1615 pDbtag->
SetDb(
"BioProject");
1616 pDbtag->
SetTag().SetId(28889);
1617 pFeat->
SetData().SetVariation().SetOther_ids().push_back(pDbtag);
1626 it = infos.
find(
"GCF");
1627 if (infos.
end() != it) {
1628 props.SetQuality_check() |= VP::eQuality_check_genotype_conflict;
1631 it = infos.
find(
"NOV");
1632 if (infos.
end() != it) {
1633 props.SetQuality_check() |= VP::eQuality_check_non_overlapping_alleles;
1636 it = infos.
find(
"WTD");
1637 if (infos.
end() != it) {
1638 props.SetQuality_check() |= VP::eQuality_check_withdrawn_by_submitter;
1641 it = infos.
find(
"NOC");
1642 if (infos.
end() != it) {
1643 props.SetQuality_check() |= VP::eQuality_check_contig_allele_missing;
1656 auto it = infos.
find(
"SOURCE");
1657 if (infos.
end() != it) {
1658 vector<string> sources = it->second;
1659 if (sources.size() > 0 &&
1662 bool valid_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.
unique_ptr< CReaderMessageHandler > m_pMessageHandler
virtual bool xUngetLine(ILineReader &)
virtual bool xIsCommentLine(const CTempString &)
virtual CRef< CSeq_annot > xCreateSeqAnnot()
unsigned int m_uDataCount
unsigned int m_uLineNumber
virtual bool xParseBrowserLine(const string &, CSeq_annot &)
void ProcessError(CObjReaderLineException &, ILineErrorListener *)
vector< TReaderLine > TReaderData
virtual bool xGetLine(ILineReader &, string &)
virtual bool xParseTrackLine(const string &)
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.
struct SReaderLine { SReaderLine(unsigned int line, string data):mLine(line), mData(data) {} TReaderLine
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]
@ 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