]> git.donarmstrong.com Git - mothur.git/blobdiff - sequence.cpp
added getline function to mothur and modified places where we use getline to use...
[mothur.git] / sequence.cpp
index 580f68ae7706ed15a11f9f460e29a56bd441767b..685f0726e6ec5042d32379874e54b83e8a6eff26 100644 (file)
@@ -53,7 +53,7 @@ Sequence::Sequence(ifstream& fastaFile){
                }
        }
 
-       if(sequence.find_first_of('-') != string::npos){        //      if there are any gaps in the sequence, assume that it is
+       if((sequence.find_first_of('-') != string::npos) || (sequence.find_first_of('.') != string::npos)) {    //      if there are any gaps in the sequence, assume that it is
                setAligned(sequence);                                                   //      an alignment file
        }
        setUnaligned(sequence);                                                         //      also set the unaligned sequence file
@@ -89,7 +89,7 @@ void Sequence::setName(string seqName) {
 
 void Sequence::setUnaligned(string sequence){
        
-       if(sequence.find_first_of('-') != string::npos) {
+       if(sequence.find_first_of('.') != string::npos || sequence.find_first_of('-') != string::npos) {
                string temp = "";
                for(int j=0;j<sequence.length();j++) {
                        if(isalpha(sequence[j]))        {       temp += sequence[j];    }