]> git.donarmstrong.com Git - mothur.git/blobdiff - kmerdb.cpp
added versioning info to all shortcut files mothur makes.
[mothur.git] / kmerdb.cpp
index 33761a8416524fa3a0fd10b7136ea5a097d3fd08..bd5b9762b41dbc63e116172ad00e419755fdbbf1 100644 (file)
@@ -109,6 +109,9 @@ void KmerDB::generateDB(){
                ofstream kmerFile;                                                                              //      once we have the kmerLocations folder print it out
                openOutputFile(kmerDBName, kmerFile);                                   //      to a file
                
+               //output version
+               kmerFile << m->getVersion() << endl;
+               
                for(int i=0;i<maxKmer;i++){                                                             //      step through all of the possible kmer numbers
                        kmerFile << i << ' ' << kmerLocations[i].size();        //      print the kmer number and the number of sequences with
                        for(int j=0;j<kmerLocations[i].size();j++){                     //      that kmer.  then print out the indices of the sequences
@@ -156,6 +159,9 @@ void KmerDB::readKmerDB(ifstream& kmerDBFile){
                                        
                kmerDBFile.seekg(0);                                                                    //      start at the beginning of the file
                
+               //read version
+               string line = getline(kmerDBFile); gobble(kmerDBFile);
+               
                string seqName;
                int seqNumber;