]> git.donarmstrong.com Git - mothur.git/commitdiff
worked on trim.seqs
authorwestcott <westcott>
Mon, 10 May 2010 12:11:55 +0000 (12:11 +0000)
committerwestcott <westcott>
Mon, 10 May 2010 12:11:55 +0000 (12:11 +0000)
classifyseqscommand.cpp
trimseqscommand.cpp
trimseqscommand.h

index 580dd9b6e056197bfc48cb39abcfb526237e1487..39f28d09e8c19f1ed4ab2d3a1e7a57d42c7e30f9 100644 (file)
@@ -226,7 +226,7 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option)  {
                                                }
                                                
                                        #endif
-                                       if (ableToOpen == 1) {  m->mothurOut("Unable to match group file with fasta file."); m->mothurOutEndLine(); abort = true;       }
+                                       if (ableToOpen == 1) {  m->mothurOut("Unable to match group file with fasta file, not using " + groupfileNames[i] + "."); m->mothurOutEndLine(); groupfileNames[i] = "";        }
                                        
                                }
                        }
@@ -551,7 +551,10 @@ int ClassifySeqsCommand::execute(){
                        m->mothurOut("It took " + toString(time(NULL) - start) + " secs to classify " + toString(numFastaSeqs) + " sequences."); m->mothurOutEndLine(); m->mothurOutEndLine();
                        start = time(NULL);
                        
-                       PhyloSummary taxaSum(taxonomyFileName, groupfileNames[s]);
+                       string group = "";
+                       if (groupfile != "") {  group = groupfileNames[s]; }
+                       
+                       PhyloSummary taxaSum(taxonomyFileName, group);
                        
                        if (m->control_pressed) {  for (int i = 0; i < outputNames.size(); i++) {       remove(outputNames[i].c_str()); } delete classify; return 0; }
                        
index 29fdc6365dbd9727754135efbd6c93d78e26629e..a544733375b004e651409ef47c9db62bb0f0756d 100644 (file)
@@ -604,7 +604,7 @@ void TrimSeqsCommand::getOligos(vector<string>& outFASTAVec){ //vector<ofstream*
 }
 //***************************************************************************************************************
 
-bool TrimSeqsCommand::stripBarcode(Sequence& seq, int& group){
+int TrimSeqsCommand::stripBarcode(Sequence& seq, int& group){
        try {
                string rawSequence = seq.getUnaligned();
                bool success = bdiffs + 1;      //guilty until proven innocent
@@ -722,7 +722,7 @@ bool TrimSeqsCommand::stripBarcode(Sequence& seq, int& group){
 
 //***************************************************************************************************************
 
-bool TrimSeqsCommand::stripForward(Sequence& seq){
+int TrimSeqsCommand::stripForward(Sequence& seq){
        try {
                string rawSequence = seq.getUnaligned();
                bool success = pdiffs + 1;      //guilty until proven innocent
index e2b0687e2108bc2f6bc95201917dd08d67f757bf..a4a4215277fadbdb5857dea6d9e9319e233cad01 100644 (file)
@@ -32,8 +32,8 @@ private:
        void getOligos(vector<string>&);
        bool stripQualThreshold(Sequence&, ifstream&);
        bool cullQualAverage(Sequence&, ifstream&);
-       bool stripBarcode(Sequence&, int&);
-       bool stripForward(Sequence&);
+       int stripBarcode(Sequence&, int&);
+       int stripForward(Sequence&);
        bool stripReverse(Sequence&);
        bool cullLength(Sequence&);
        bool cullHomoP(Sequence&);