38 for(
size_t i=0;i<defs.size();i++){
112 std::cerr <<
"Alphabet limit reached. Unable to add additional characters to the track:\t" << character << std::endl;
133 std::string string_character(character);
136 if (string_character.size()>
maxSize){
maxSize=string_character.size();};
142 for(
size_t i=0;i<characters.size();i++){
153 for(
size_t i =0; i < chSize; i++ ){
169 for(
size_t i=0;i<chSize;i++){
185 if (characters.size() != complements.size()){
187 std::cerr <<
"Number of Complement characters and Characters don't match.\n";
192 for(
size_t i=0;i<characters.size();i++){
213 std::string string_character(character);
214 std::string string_complement(complement);
222 if (characters.size() != complements.size()){
223 std::cerr <<
"Number of Complement characters and Characters don't match.\n";
227 for(
size_t i=0;i<characters.size();i++){
247 std::cerr <<
"Maximum number of discrete symbols reached at 255\n";
262 std::cerr << symbol <<
"not found in HMM definitions. Using default ambiguous character.\n";
266 std::cerr <<
"Encountered an ambiguous character in the sequence. No ambiguous characters are allowed because they weren't set in the model. To allow ambiguous characters, please add an \" Ambiguous Character Definition\" to the model" << std::endl;
280 std::cerr <<
"Track Max Symbols Size:\t" <<
maxSize <<
"\t Must use function track::symbolIndex(const std::string& symbol)\n";
284 charIndices =
new (std::nothrow) std::vector<uint8_t>(255,255);
286 (*charIndices)[(it->first)[0]] = it->second;
296 std::cerr <<
"Encountered an ambiguous character in the sequence. No ambiguous characters are allowed because they weren't set in the model. To allow ambiguous characters, please add an \" Ambiguous Character Definition\" to the model" << std::endl;
319 if (lst[1].compare(
"REAL_NUMBER")==0){
327 std::cerr <<
"Real number track function tag must contain FUNCTION: and USE: . Please check the formatting of your tag. Here is the tag as parsed: " << tag.
stringify() << std::endl;
337 std::cerr <<
"Real number track tag must contain FUNCTION: and USE: . Please check the formatting of your tag. Here is the tag as parsed: " << tag.
stringify() << std::endl;
346 for(
size_t i=1;i<lst.
size();i++){
348 std::cerr <<
"Track import failed, because number of symbols exceeded 255. Alternatively, you can create a real number track for different emissions" << std::endl;
362 output+=
name +
":\t";
368 output+=
"REAL_NUMBER";
383 output+=
name +
":\t";
391 for(
size_t k = 0; k<regChar.size();k++){
392 if (k>0){output+=
",";}
403 std::string output=
"";
409 size_t currentOrder = order;
411 while (currentOrder>1){
413 size_t temp = floor ((
double) wordIndex / dreg);
419 wordIndex-=temp*dreg;
435 std::cout <<
alphabet.size() << std::endl;
437 size_t currentOrder = order;
439 while (currentOrder>1){
441 size_t temp = floor ((
double) wordIndex / dreg);
442 word[currentOrder-1] = temp;
443 wordIndex-=temp*dreg;
457 std::vector<std::pair<std::string,std::vector<std::string> > > temp;
464 for (
size_t i=0;i<temp.size();i++){
477 opening=text.find_first_of(
'[');
478 while(opening!=std::string::npos){
479 std::pair<std::string,std::vector<std::string> > amb;
480 amb.first=text.substr(start,opening-start);
483 closing=text.find_first_of(
']',opening);
484 if (closing!=std::string::npos){
485 std::string tempString=text.substr(opening+1,closing-opening-1);
488 start=text.find_first_not_of(
',',closing+1);
489 results.push_back(amb);
490 opening=text.find_first_of(
'[',closing);
512 std::string& name= tk->
name;
514 if (!
index.count(name)){
519 std::cerr <<
"Track with name: " << name <<
" already exists. Cannot add tracks with the same name\n";
530 if (
index.count(name)){
543 if (
index.count(name)){
552 if (
index.count(name)){
567 std::string trackString;
568 std::string ambigString;
569 std::string lnSep(50,
'=');
570 trackString+=
"TRACK SYMBOL DEFINITIONS\n" + lnSep +
"\n";
572 for(
size_t i=0;i<
trks.size();i++){
573 trackString+=
trks[i]->stringify();
574 if (
trks[i]->isAmbiguousSet()){
575 ambigString+=
trks[i]->stringifyAmbig();
578 if (!ambigString.empty()){
579 ambigString=
"AMBIGUOUS SYMBOL DEFINITIONS\n" + lnSep +
"\n"+ ambigString;
580 trackString+=
"\n" + ambigString +
"\n";
599 std::cerr<<
"Complement of " << val <<
" is not set in track\n";
604 std::cerr <<
"No complements are set in the track\n";
621 std::cerr<<
"Complement of " << character <<
" is not set in track\n";
626 std::cerr <<
"No complements are set in the track\n";
642 std::cerr<<
"Complement of " << value <<
" is not set in track\n";
647 std::cerr <<
"No complements are set in the track\n";
665 std::cerr<<
"Complement of " << character <<
" is not set in track\n";
670 std::cerr <<
"No complements are set in the track\n";