vector<string> testSample;
53 if(testSample.empty()) {
82vector<string>& testSample)
91testSample.push_back(testLine);
106 stringtestLine = sample[0];
123 const stringCONSENSUS_CHARS =
" .:*";
125 stringtestLine = sample[0];
133 size_tlineCount = 0;
134 size_tblockCount = 0;
135 while(blockCount < 3) {
137 if(lineCount < sample.size()) {
138line = sample[lineCount];
142sample.push_back(line);
144 if(lineCount > 0 && line.empty()) {
145 automaybeConsensus = sample[lineCount-1];
147 autofirstConsensusChar = maybeConsensus.find_first_of(
148CONSENSUS_CHARS.substr(1));
149 if(firstConsensusChar == string::npos) {
152 autofirstNonConsensusChar = maybeConsensus.find_first_not_of(
154 if(firstNonConsensusChar != string::npos) {
176 for( ;
i< sample.size(); ++
i) {
181 if(
i< sample.size()) {
199 stringtestLine = sample[0];
200vector<string> tokens;
202 if(tokens.size() != 2) {
205 if(tokens.front().find_first_not_of(
"0123456789") != string::npos) {
208 if(tokens.back().find_first_not_of(
"0123456789") != string::npos) {
225 if(!sample[0].
empty()) {
229vector<string> tokens;
231 if(tokens.empty()) {
234 for(
size_tindex = 0; index < tokens.size(); ++index) {
236 if(
offset!= 10 + 10*index) {
254 size_tlineIndex = 0;
258 if(sample.size() < lineIndex + 4) {
261 if(!sample[lineIndex].
empty()) {
266vector<string> tokens;
268 if(tokens.size() != 2) {
271 intstartOffset(0), endOffset(0);
276 catch(std::exception&) {
279 if(startOffset != 1) {
282 if(endOffset > 50) {
287list<string> dataColumns;
289 if(dataColumns.size() < 2) {
292dataColumns.pop_front();
293 stringseqData =
NStr::Join(dataColumns.begin(), dataColumns.end(),
"");
294 intdataSize = seqData.size();
295 return(dataSize == (endOffset - startOffset + 1));
bool xSampleIsSequin(const TSample &)
bool xSampleIsFastaGap(const TSample &)
EAlignFormat GetFormat(CPeekAheadStream &iStr)
bool xSampleIsPhylip(const TSample &)
bool xSampleIsNexus(const TSample &)
void xInitSample(CPeekAheadStream &iStr, TSample &sample)
static const int SAMPLE_SIZE
bool xSampleIsMultAlign(const TSample &)
bool xSampleIsClustal(TSample &, CPeekAheadStream &iStr)
bool PeekLine(string &str)
The NCBI C++ standard methods for dealing with std::string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
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 void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
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 unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ fConvErr_NoThrow
Do not throw an exception on error.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
constexpr bool empty(list< Ts... >) noexcept
static PCRE2_SIZE * offsets
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