(
str[newFirst] ==
' ') {
165 autonewLast =
str.length() - 1;
166 while(
str[newLast] ==
' ') {
169 str=
str.substr(newFirst, newLast - newFirst + 1);
210ostr <<
" [CRawBedRecord"<< endl;
211ostr <<
"id=\""<< m_pInterval->GetId().AsFastaString() <<
"\" ";
212ostr <<
"start="<< m_pInterval->GetFrom() <<
" ";
213ostr <<
"stop="<< m_pInterval->GetTo() <<
" ";
217ostr <<
"score="<< m_score <<
" ";
228ostr <<
"[CRawBedTrack"<< endl;
229 for(vector<CRawBedRecord>::const_iterator it = m_Records.begin();
230it != m_Records.end(); ++it) {
233ostr <<
"]"<< std::endl;
239 const string& annotName,
240 const string& annotTitle,
245mColumnSeparator(
""),
246mColumnSplitFlags(0),
248mValidColumnCount(0),
249mAssumeErrorsAreRecordLevel(
true),
250m_CurrentFeatureCount(0),
253m_MaxBatchSize(10000),
279 const string& fileName)
284 autoorigExceptions = istr.exceptions();
285istr.exceptions(std::istream::failbit);
287istr.exceptions(origExceptions);
290cerr << e.
GetMsg() << endl;
350 if(!isBrowserLine && !isTrackLine) {
362 for(
const auto& lineData: readerData) {
363 stringline = lineData.mData;
387 intbufferLineNumber = 0;
391 "Bad data line: Inconsistent column count.");
396 "Bad data line: Invalid chrom boundaries.");
398 const size_tMIN_SAMPLE_SIZE = 50;
402vector<string>::size_type realColumnCount = 0;
403vector<string>::size_type validColumnCount = 0;
404 for(LineIt lineIt = preBuffer.
begin(); lineIt != preBuffer.
end(); ++lineIt) {
406 const auto& line = *lineIt;
418 if(realColumnCount == 0 ) {
421 if(realColumnCount != columnData.
ColumnCount()) {
423 throw(fatalColumns);
426 if(validColumnCount == 0) {
427validColumnCount = realColumnCount;
428 if(validColumnCount > 12) {
429validColumnCount = 12;
432 unsigned longchromStart = 0, chromEnd = 0;
441 if(validColumnCount >= 7) {
444 if(thickStart < chromStart || chromEnd < thickStart) {
445validColumnCount = 6;
449validColumnCount = 6;
452 if(validColumnCount >= 8) {
455 if(thickEnd < chromStart || chromEnd < thickEnd) {
456validColumnCount = 6;
460validColumnCount = 6;
465 if(validColumnCount >= 10) {
469 if(blockCount < 1) {
470validColumnCount = 9;
474validColumnCount = 9;
477 if(validColumnCount >= 11) {
478vector<string> blockSizes;
479 autocol10 = columnData[10];
481col10 = col10.substr(0, col10.size()-1);
484 if(blockSizes.size() != blockCount) {
485validColumnCount = 9;
489 for(
autoblockSize: blockSizes) {
494validColumnCount = 9;
498 if(validColumnCount >= 12) {
499vector<string> blockStarts;
500 autocol11 = columnData[11];
502col11 = col11.substr(0, col11.size()-1);
505 if(blockStarts.size() != blockCount) {
506validColumnCount = 9;
510 for(
autoblockStart: blockStarts) {
515validColumnCount = 9;
523validColumnCount == realColumnCount &&
524validColumnCount != 7 &&
525validColumnCount != 10 &&
526validColumnCount != 11);
550 "Bad track line: Expected \"track key1=value1 key2=value2 ...\". Ignored.");
555vector<string> parts;
557 if(parts.size() >= 3) {
558 const stringdigits(
"0123456789");
559 boolcol2_is_numeric =
560(string::npos == parts[1].find_first_not_of(digits));
561 boolcol3_is_numeric =
562(string::npos == parts[2].find_first_not_of(digits));
563 if(col2_is_numeric && col3_is_numeric) {
587 "Bad data line: Inconsistent column count.");
683 ftable.push_back(feature);
704 ftable.push_back(feature);
725 ftable.push_back(feature);
745 ftable.push_back(feature);
765 ftable.push_back(feature);
785 ftable.push_back(feature);
806 ftable.push_back( feature );
836display_data->
SetType().SetStr(
"Display Data");
838display_data->
AddField(
"name", columnData[3] );
841display_data->
AddField(
"name",
string(
"") );
842feature->
SetData().SetUser( *display_data );
881display_data->
AddField(
"blockSizes", columnData[10] );
884display_data->
AddField(
"blockStarts", columnData[11] );
886feature->
SetData().SetUser( *display_data );
898pBed->
SetType().SetStr(
"BED");
899pBed->
AddField(
"location",
"chrom");
901exts.push_back(pBed);
913pBed->
SetType().SetStr(
"BED");
914pBed->
AddField(
"location",
"chrom");
916exts.push_back(pBed);
933 catch(std::exception&) {
937 "Invalid data line: Bad \"ThickStart\" value.");
943 catch(std::exception&) {
947 "Invalid data line: Bad \"ThickStop\" value.");
953 else if(from < to) {
957 else if(from > to) {
973pBed->
SetType().SetStr(
"BED");
974pBed->
AddField(
"location",
"thick");
976exts.push_back(pBed);
993 catch(std::exception&) {
997 "Invalid data line: Bad \"ThickStart\" value.");
1003 catch(std::exception&) {
1007 "Invalid data line: Bad \"ThickStop\" value.");
1011 location->SetPnt().SetPoint(from);
1013 else if(from < to) {
1017 else if(from > to) {
1033pBed->
SetType().SetStr(
"BED");
1034pBed->
AddField(
"location",
"thick");
1036exts.push_back(pBed);
1044 size_tstrand_field = 5;
1045 if(columnData.ColumnCount() == 5 &&
1046(columnData[4] ==
"-"|| columnData[4] ==
"+")) {
1049 if(strand_field < columnData.ColumnCount()) {
1050 stringstrand = columnData[strand_field];
1051 if(strand !=
"+"&& strand !=
"-"&& strand !=
".") {
1055 "Invalid data line: Invalid strand character.");
1070vector<size_t> blockSizes;
1071vector<size_t> blockStarts;
1073blockSizes.reserve(blockCount);
1074vector<string> vals;
1076 if(vals.back() ==
"") {
1077vals.erase(vals.end()-1);
1079 if(vals.size() != blockCount) {
1083 "Invalid data line: Bad value count in \"blockSizes\".");
1087 for(
size_t i=0;
i< blockCount; ++
i) {
1091 catch(std::exception&) {
1095 "Invalid data line: Malformed \"blockSizes\" column.");
1100blockStarts.reserve(blockCount);
1101vector<string> vals;
1104 if(vals.back() ==
"") {
1105vals.erase(vals.end()-1);
1107 if(vals.size() != blockCount) {
1111 "Invalid data line: Bad value count in \"blockStarts\".");
1115 for(
size_t i=0;
i< blockCount; ++
i) {
1119 catch(std::exception&) {
1123 "Invalid data line: Malformed \"blockStarts\" column.");
1132 bool negative= columnData[5] ==
"-";
1136 for(
size_t i=0;
i< blockCount; ++
i) {
1138pInterval->
SetId(*pId);
1141blockStarts[
i] + blockSizes[
i] - 1));
1146 blocks.push_back(pInterval);
1150pBed->
SetType().SetStr(
"BED");
1151pBed->
AddField(
"location",
"block");
1153exts.push_back(pBed);
1164vector<size_t> blockSizes;
1165vector<size_t> blockStarts;
1167blockSizes.reserve(blockCount);
1168vector<string> vals;
1170 if(vals.back() ==
"") {
1171vals.erase(vals.end()-1);
1173 if(vals.size() != blockCount) {
1177 "Invalid data line: Bad value count in \"blockSizes\".");
1181 for(
size_t i=0;
i< blockCount; ++
i) {
1185 catch(std::exception&) {
1189 "Invalid data line: Malformed \"blockSizes\" column.");
1194blockStarts.reserve(blockCount);
1195vector<string> vals;
1198 if(vals.back() ==
"") {
1199vals.erase(vals.end()-1);
1201 if(vals.size() != blockCount) {
1205 "Invalid data line: Bad value count in \"blockStarts\".");
1209 for(
size_t i=0;
i< blockCount; ++
i) {
1213 catch(std::exception&) {
1217 "Invalid data line: Malformed \"blockStarts\" column.");
1226 bool negative= columnData[5] ==
"-";
1230 for(
size_t i=0;
i< blockCount; ++
i) {
1232pInterval->
SetId(*pId);
1235blockStarts[
i] + blockSizes[
i] -1));
1240 blocks.push_back(pInterval);
1244pBed->
SetType().SetStr(
"BED");
1245pBed->
AddField(
"location",
"block");
1247exts.push_back(pBed);
1254 unsigned intbaseId)
1258feature->
SetId().SetLocal().SetId(baseId);
1264pXrefThick->SetId(*pIdThick);
1265feature->
SetXref().push_back(pXrefThick);
1272pXrefBlock->SetId(*pIdBlock);
1273feature->
SetXref().push_back(pXrefBlock);
1281 unsigned intbaseId)
1285feature->
SetId().SetLocal().SetId(baseId);
1292 unsigned intbaseId)
1296feature->
SetId().SetLocal().SetId(baseId+1);
1301pXrefChrom->SetId(*pIdChrom);
1302feature->
SetXref().push_back(pXrefChrom);
1308pXrefBlock->SetId(*pIdBlock);
1309feature->
SetXref().push_back(pXrefBlock);
1317 unsigned intbaseId)
1321feature->
SetId().SetLocal().SetId(baseId+1);
1327pXrefBlock->SetId(*pIdBlock);
1328feature->
SetXref().push_back(pXrefBlock);
1334pXrefChrom->SetId(*pIdChrom);
1335feature->
SetXref().push_back(pXrefChrom);
1343 unsigned intbaseId)
1347feature->
SetId().SetLocal().SetId(baseId+2);
1352pXrefChrom->SetId(*pIdChrom);
1353feature->
SetXref().push_back(pXrefChrom);
1359pXrefBlock->SetId(*pIdThick);
1360feature->
SetXref().push_back(pXrefBlock);
1368 unsigned intbaseId)
1372feature->
SetId().SetLocal().SetId(baseId+2);
1377pXrefChrom->SetId(*pIdChrom);
1378feature->
SetXref().push_back(pXrefChrom);
1388!columnData[3].empty() && columnData[3] !=
".") {
1389feature->
SetTitle(columnData[0]);
1406 "Invalid data line: Bad \"score\" value.");
1409 if(columnData.
ColumnCount() < 5 || trackUseScore ==
"1") {
1417 if(int_score == 0 && columnData[4].compare(
"0") != 0) {
1421 catch(std::exception&) {
1426 if(d_score < 0 || int_score < 0) {
1429 else if(d_score > 0) {
1430pDisplayData->
AddField(
"score", d_score);
1433pDisplayData->
AddField(
"score", int_score);
1447 if(trackItemRgb ==
"On"&& columnData.
ColumnCount() >= 9) {
1448 stringfeatItemRgb = columnData[8];
1449 if(featItemRgb !=
".") {
1457 if(trackUseScore ==
"1"&& columnData.
ColumnCount() >= 5) {
1458 stringfeatScore = columnData[4];
1459 if(featScore !=
".") {
1467 if(!trackColorByStrand.empty() && columnData.
ColumnCount() >= 6) {
1475 stringfeatItemRgb = columnData[8];
1476 if(featItemRgb !=
".") {
1491 const stringcolorDefault(
"0 0 0");
1492pDisplayData->
AddField(
"color", colorDefault);
1498 const string& trackColorByStrand,
1504 stringcolorPlus, colorMinus;
1509 catch(std::exception&) {
1513 "Invalid track line: Bad colorByStrand value.");
1521 const string& featScore )
1527 "Invalid data line: Bad score value to be used for color.");
1533 catch(
conststd::exception&) {
1536 if(score < 0 || 1000 < score) {
1540vector<string> srgb{ greyValue, greyValue, greyValue};
1542pDisplayData->
AddField(
"color", rgbValue);
1548 const string& itemRgb,
1555 "Bad color value - converted to BLACK.");
1556 const stringrgbDefault =
"0 0 0";
1559 if(itemRgb ==
"0") {
1560pDisplayData->
AddField(
"color", rgbDefault);
1564vector<string> srgb;
1567 if(srgb.size() == 3) {
1568 autovaluesOk =
true;
1569 for(
auto i=0;
i<3; ++
i) {
1578 if((
test< 0) || (256 <=
test)) {
1585pDisplayData->
AddField(
"color", rgbDefault);
1588 autooutValue = srgb[0] +
" "+ srgb[1] +
" "+ srgb[2];
1589pDisplayData->
AddField(
"color", outValue);
1593 if(srgb.size() == 1) {
1594 autoassumeHex =
false;
1595 stringitemRgbCopy(itemRgb);
1598itemRgbCopy = itemRgb.substr(2);
1602itemRgbCopy = itemRgbCopy.substr(1);
1604 unsigned longcolorValue;
1605 intradix = (assumeHex ? 16 : 10);
1612pDisplayData->
AddField(
"color", rgbDefault);
1615 intblue = colorValue & 0xFF;
1617 intgreen = colorValue & 0xFF;
1619 intred = colorValue & 0xFF;
1622pDisplayData->
AddField(
"color", outValue);
1627pDisplayData->
AddField(
"color", rgbDefault);
1639 if(columnData.
ColumnCount() >= 4 && columnData[3] !=
".") {
1640 data.SetRegion() = columnData[3];
1643 data.SetRegion() = columnData[0];
1649pDisplayData->
SetType().SetStr(
"DisplaySettings");
1650exts.push_front(pDisplayData);
1678 catch(std::exception&) {
1682 "Invalid data line: Bad \"SeqStart\" value.");
1688 catch(std::exception&) {
1692 "Invalid data line: Bad \"SeqStop\" value.");
1696 location->SetPnt().SetPoint(from);
1698 else if(from < to) {
1706 "Invalid data line: \"SeqStop\" less than \"SeqStart\".");
1710 size_tstrand_field = 5;
1712(columnData[4] ==
"-"|| columnData[4] ==
"+")) {
1716 stringstrand = columnData[strand_field];
1717 if(strand !=
"+"&& strand !=
"-"&& strand !=
".") {
1721 "Invalid data line: Invalid strand character.");
1724 location->SetStrand(( columnData[strand_field] ==
"+") ?
1765 const string& line,
1780 stringlinecopy = line;
1793 "Invalid data line: Inconsistent column count.");
1805 catch(std::exception&) {
1809 "Invalid data line: Invalid \"SeqStart\" (column 2) value.");
1818 catch(std::exception&) {
1822 "Invalid data line: Invalid \"SeqStop\" (column 3) value.");
1833 catch(std::exception&) {
1837 "Invalid data line: Invalid \"Score\" (column 5) value.");
1861 if(columnData.ColumnCount() < 8 || mValidColumnCount < 8) {
1865 intstart = -1, from = -1, to = -1;
1871 catch(std::exception&) {
1874columnData.LineNo(),
1875 "Invalid data line: Bad \"Start/ThickStart/ThickStop\" values.");
1878 if(start == from && from == to) {
1891 if(columnData.ColumnCount() < 12 || mValidColumnCount < 12) {
1895 intstart = -1, from = -1, to = -1;
1901 catch(std::exception&) {
1904columnData.LineNo(),
1905 "Invalid data line: Bad \"Start/ThickStart/ThickStop\" values.");
1908 if(start == from && from == to) {
1921 return(columnData.ColumnCount() >= 12 && mValidColumnCount >= 12);
1931 return(columnData.ColumnCount() >= 8 && mValidColumnCount >= 8);
1977 "Invalid data line: Insufficient column count.");
1985 catch(std::exception&) {
1989 "Invalid data line: Invalid \"SeqStart\" (column 2) value.");
1997 catch(std::exception&) {
2001 "Invalid data line: Invalid \"SeqStop\" (column 3) value.");
2016columnCountUser->
SetType().SetStr(
"NCBI_BED_COLUMN_COUNT");
2021annot.
SetDesc().Set().push_back(userDesc);
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.
unsigned int LineNo() const
size_t ColumnCount() const
virtual bool ReadTrackData(ILineReader &, CRawBedTrack &, ILineErrorListener *=nullptr)
void xSetFeatureIdsThick(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xSetFeatureBedData(CRef< CSeq_feat > &, const CBedColumnData &, ILineErrorListener *)
void xSetFeatureLocationCds(CRef< CSeq_feat > &, const CBedColumnData &)
bool xReadBedRecordRaw(const string &, CRawBedRecord &, ILineErrorListener *)
bool xParseTrackLine(const CTempString &) override
unique_ptr< CBedAutoSql > mpAutoSql
virtual bool SetAutoSql(const string &)
void xSetFeatureColorByStrand(CRef< CUser_object >, const string &, ENa_strand, ILineErrorListener *)
void xSetFeatureColorFromScore(CRef< CUser_object >, const string &)
virtual void xAssignBedColumnCount(CSeq_annot &)
bool xAppendFeatureChrom(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
ENa_strand xGetStrand(const CBedColumnData &) const
void xSetFeatureScore(CRef< CUser_object >, const CBedColumnData &)
unique_ptr< CLinePreBuffer > mLinePreBuffer
void xSetFeatureLocationChrom(CRef< CSeq_feat > &, const CBedColumnData &)
CBedReader(int=fNormal, const string &="", const string &="", CReaderListener *=nullptr)
bool xReadBedDataRaw(ILineReader &, CRawBedTrack &, ILineErrorListener *)
bool mAssumeErrorsAreRecordLevel
void xSetFeatureLocationGene(CRef< CSeq_feat > &, const CBedColumnData &)
CRef< CSeq_feat > xAppendFeatureCds(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
unsigned int m_CurBatchSize
void xSetFeatureColor(CRef< CUser_object >, const CBedColumnData &, ILineErrorListener *)
bool xParseFeatureAutoSql(const CBedColumnData &, CSeq_annot &, ILineErrorListener *)
vector< string >::size_type mValidColumnCount
void xProcessData(const TReaderData &, CSeq_annot &) override
CRef< CSeq_annot > ReadSeqAnnot(ILineReader &lr, ILineErrorListener *pErrors=nullptr) override
Read a single object from given line reader containing BED data.
bool xParseFeature(const TReaderLine &, CSeq_annot &, ILineErrorListener *)
void xSetFeatureLocationRna(CRef< CSeq_feat > &, const CBedColumnData &)
bool xAppendFeatureBlock(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
CRef< CSeq_feat > xAppendFeatureGene(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
static void xCleanColumnValues(vector< string > &)
bool xContainsCdsFeature(const CBedColumnData &) const
void xSetFeatureColorDefault(CRef< CUser_object >)
CRef< CSeq_feat > xAppendFeatureRna(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
const unsigned int m_MaxBatchSize
void xSetFeatureIdsGene(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xSetFeatureIdsBlock(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xSetFeatureLocation(CRef< CSeq_feat > &, const CBedColumnData &)
unsigned int m_CurrentFeatureCount
bool xContainsBlockFeature(const CBedColumnData &) const
bool xContainsThickFeature(const CBedColumnData &) const
bool xParseFeatureThreeFeatFormat(const CBedColumnData &, CSeq_annot &, ILineErrorListener *)
void xSetFeatureLocationBlock(CRef< CSeq_feat > &, const CBedColumnData &)
void xSetFeatureIdsRna(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xSetFeatureTitle(CRef< CSeq_feat > &, const CBedColumnData &)
bool xParseFeatureGeneModelFormat(const CBedColumnData &, CSeq_annot &, ILineErrorListener *)
bool xAppendFeatureThick(const CBedColumnData &, CSeq_annot &, unsigned int, ILineErrorListener *)
void xPostProcessAnnot(CSeq_annot &) override
void xSetFeatureIdsChrom(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xGetData(ILineReader &, TReaderData &) override
void xSetFeatureDisplayData(CRef< CSeq_feat > &, const CBedColumnData &)
virtual bool xDetermineLikelyColumnCount(CLinePreBuffer &, ILineErrorListener *)
void xSetFeatureIdsCds(CRef< CSeq_feat > &, const CBedColumnData &, unsigned int)
void xSetFeatureLocationThick(CRef< CSeq_feat > &, const CBedColumnData &)
bool xContainsRnaFeature(const CBedColumnData &) const
vector< string >::size_type mRealColumnCount
void xSetFeatureColorFromItemRgb(CRef< CUser_object >, const string &, ILineErrorListener *)
CRef< CSeq_annot > xCreateSeqAnnot() override
bool xParseFeatureUserFormat(const CBedColumnData &, CSeq_annot &, ILineErrorListener *)
ILineReader & mLineReader
deque< string >::const_iterator LinePreIt
virtual ~CLinePreBuffer()
bool UngetLine(const string &line)
void AssignReader(ILineReader &lineReader)
static void StripSpaceCharsInPlace(string &str)
bool GetLine(string &line)
virtual bool IsCommentLine(const CTempString &line)
bool FillBuffer(size_t numLines)
CLinePreBuffer(ILineReader &lineReader)
void Dump(CNcbiOstream &ostr) const
void SetInterval(CSeq_id &id, unsigned int start, unsigned int stop, ENa_strand strand)
CRef< CSeq_interval > m_pInterval
void SetScore(unsigned int score)
void Dump(CNcbiOstream &ostr) const
void AddRecord(CRawBedRecord &record)
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
unsigned int m_uLineNumber
unique_ptr< CTrackData > m_pTrackDefaults
vector< TReaderLine > TReaderData
virtual bool xGetLine(ILineReader &, string &)
virtual void xAddConversionInfo(CSeq_annot &, ILineErrorListener *)
virtual bool xParseTrackLine(const CTempString &)
virtual bool xIsBrowserLine(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 &)
void SetLineNumber(int lineNumber)
void SetNameDesc(const string &name)
void SetTitleDesc(const string &title)
namespace ncbi::objects::
void AddOrReplaceQualifier(const string &qual_name, const string &qual_val)
Add a qualifier to this feature, or replace the value for the first one if it already exists.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
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
Abstract base class for lightweight line-by-line reading.
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define test(a, b, c, d, e)
static const char * str(char *buf, int n)
static const char location[]
static const column_t columns[]
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
@ eDiag_Fatal
Fatal error â guarantees exit(or abort)
const string & GetMsg(void) const
Get message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual bool AtEOF(void) const =0
Indicates (negatively) whether there is any more input.
CRef< CSeq_loc > Intersect(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper) const
Find the intersection with the seq-loc, merge/sort resulting ranges depending on flags.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
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 bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static unsigned long StringToULong(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned long.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a 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 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 unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
@ fDS_ProhibitFractions
StringToUInt8_DataSize(): Ignore any fraction part of a value, "1.2K" ~ "1K".
@ fConvErr_NoThrow
Do not throw an exception on error.
@ fAllowTrailingSymbols
Ignore trailing non-numerics characters.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
void SetType(TType &value)
Assign a value to Type data member.
TId & SetId(void)
Select the variant.
TXref & SetXref(void)
Assign a value to Xref data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
list< CRef< CUser_object > > TExts
TExts & SetExts(void)
Assign a value to Exts data member.
const TLocation & GetLocation(void) const
Get the Location member data.
void SetTitle(const TTitle &value)
Assign a value to Title data member.
TLocal & SetLocal(void)
Select the variant.
void SetId(TId &value)
Assign a value to Id data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetTo(TTo value)
Assign a value to To data member.
list< CRef< CSeq_interval > > Tdata
ENa_strand
strand of nucleic acid
void SetId(TId &value)
Assign a value to Id data member.
void SetFrom(TFrom value)
Assign a value to From data member.
void SetStrand(TStrand value)
Assign a value to Strand data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
TUser & SetUser(void)
Select the variant.
list< CRef< CSeq_feat > > TFtable
static SLJIT_INLINE sljit_ins lr(sljit_gpr dst, sljit_gpr src)
static DP_BlockInfo * blocks
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