X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=fastamap.cpp;h=ebfecedb860bafb6385ca2f75a3752702354498b;hp=a1beda31ac5ee82c532676163179197a004f91eb;hb=5b7ac70116137b52dd7884b76c5bca660a5fea38;hpb=a2edaadb975e5cb5d6cf68353bfe95f53235600d diff --git a/fastamap.cpp b/fastamap.cpp index a1beda3..ebfeced 100644 --- a/fastamap.cpp +++ b/fastamap.cpp @@ -19,7 +19,7 @@ void FastaMap::readFastaFile(ifstream& in) { name = line.substr(1, line.length()); //rips off '>' //read through file - while (in.eof() != true) { + while (!in.eof()) { in >> line; if (line != "") { if (isalnum(line.at(0))) { //if it's a sequence line @@ -41,19 +41,9 @@ void FastaMap::readFastaFile(ifstream& in) { sequence = ""; } } + gobble(in); } - //store last sequence and name info. - seqmap[name] = sequence; - it = data.find(sequence); - if (it == data.end()) { //it's unique. - data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found. - data[sequence].groupnumber = 1; - data[sequence].names = name; - }else { // its a duplicate. - data[sequence].names += "," + name; - data[sequence].groupnumber++; - } } catch(exception& e) {