- gobble(inNames);
- int size = 1;
- while (secondCol.find_first_of(',') != -1) {
- size++;
- secondCol = secondCol.substr(secondCol.find_first_of(',')+1, secondCol.length());
+ //gobble(inNames);
+ //int size = 1;
+ //while (secondCol.find_first_of(',') != -1) {
+ // size++;
+ // secondCol = secondCol.substr(secondCol.find_first_of(',')+1, secondCol.length());
+ //}
+
+ Sequence seq(inFasta); gobble(inFasta);
+
+ if (seq.getName() != "") { //can get "" if commented line is at end of fasta file
+ if (namefile != "") {
+ itSize = sizes.find(seq.getName());
+
+ if (itSize == sizes.end()) { mothurOut(seq.getName() + " is not in your names file, please correct."); mothurOutEndLine(); exit(1); }
+ else{
+ seqPNode tempNode(itSize->second, seq, names[seq.getName()]);
+ alignSeqs.push_back(tempNode);
+ if (seq.getAligned().length() > length) { length = alignSeqs[0].seq.getAligned().length(); }
+ }
+ }else { //no names file, you are identical to yourself
+ seqPNode tempNode(1, seq, seq.getName());
+ alignSeqs.push_back(tempNode);
+ if (seq.getAligned().length() > length) { length = alignSeqs[0].seq.getAligned().length(); }
+ }