]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed bug that caused bayesian cutoff not to work if iters > 100. fixed bug in trim...
authorwestcott <westcott>
Tue, 4 May 2010 13:45:52 +0000 (13:45 +0000)
committerwestcott <westcott>
Tue, 4 May 2010 13:45:52 +0000 (13:45 +0000)
bayesian.cpp
trimseqscommand.cpp

index e5543cdf0c320847a7cb9bc16957b64bb73d3b6a..00467ff0feb0a5df82314685520943376582278e 100644 (file)
@@ -274,7 +274,7 @@ string Bayesian::bootstrapResults(vector<int> kmers, int tax, int numToSelect) {
                                        confidence = confidenceScores[seqTax.level][seqTax.name];
                                }
                                
-                               if (confidence >= confidenceThreshold) {
+                               if (((confidence/(float)iters) * 100) >= confidenceThreshold) {
                                        confidenceTax = seqTax.name + "(" + toString(((confidence/(float)iters) * 100)) + ");" + confidenceTax;
                                        simpleTax = seqTax.name + ";" + simpleTax;
                                }
index ef7dfdd0f45d649cc6296d91e106e75b9a6fd167..bb4506385774260141692e0ee5991ac5e10a9ee1 100644 (file)
@@ -778,10 +778,14 @@ bool TrimSeqsCommand::compareDNASeq(string oligo, string seq){
 bool TrimSeqsCommand::stripQualThreshold(Sequence& seq, ifstream& qFile){
        try {
                string rawSequence = seq.getUnaligned();
-               int seqLength = rawSequence.length();
-               string name;
+               int seqLength;  // = rawSequence.length();
+               string name, temp, temp2;
                
-               qFile >> name;
+               qFile >> name >> temp;
+       
+               splitAtEquals(temp2, temp); //separates length=242, temp=length, temp2=242
+               convert(temp, seqLength); //converts string to int
+       
                if (name.length() != 0) {  if(name.substr(1) != seq.getName())  {       m->mothurOut("sequence name mismatch btwn fasta and qual file"); m->mothurOutEndLine(); }  } 
                while (!qFile.eof())    {       char c = qFile.get(); if (c == 10 || c == 13){  break;  }       }