]> git.donarmstrong.com Git - mothur.git/commitdiff
mods to pcr.seqs
authorSarah Westcott <mothur.westcott@gmail.com>
Wed, 28 Mar 2012 18:52:15 +0000 (14:52 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Wed, 28 Mar 2012 18:52:15 +0000 (14:52 -0400)
createdatabasecommand.cpp
prcseqscommand.cpp

index e4a911fc6a1c620777e5b91f1a5ab6223d8bfef2..9d90e74509ab1bc4f555686fb166caeeb52e8195 100644 (file)
@@ -36,7 +36,7 @@ string CreateDatabaseCommand::getHelpString(){
        try {
                string helpString = "";
                helpString += "The create.database command reads a listfile, *.cons.taxonomy, *.rep.fasta, *.rep.names and optional groupfile, and creates a database file.\n";
-               helpString += "The create.database command parameters are repfasta, list, repname, contaxonomy, group and label. List, repfasta, repnames, and contaxonomy are required.  \n";
+               helpString += "The create.database command parameters are repfasta, list, repname, contaxonomy, group and label. List, repfasta, repnames, and contaxonomy are required.\n";
         
         helpString += "The create.database command should be in the following format: \n";
                helpString += "create.database(repfasta=yourFastaFileFromGetOTURep, repname=yourNameFileFromGetOTURep, contaxonomy=yourConTaxFileFromClassifyOTU, list=yourListFile) \n";       
index afedc746360b495850d588b6c7ce3839ec3f9256..d9c37769b07d24f40efbfef9e076da33f5c86c29 100644 (file)
@@ -266,7 +266,7 @@ int PcrSeqsCommand::execute(){
                outputNames.push_back(trimSeqFile); outputTypes["fasta"].push_back(trimSeqFile);
         
         string badSeqFile = thisOutputDir + m->getRootName(m->getSimpleName(fastafile)) + "pcr.scrap.fasta";
-               outputNames.push_back(badSeqFile); outputTypes["fasta"].push_back(badSeqFile);
+               
                
         length = 0;
                if(oligosfile != ""){    readOligos();     }  if (m->control_pressed) {  return 0; }
@@ -304,6 +304,7 @@ int PcrSeqsCommand::execute(){
         //don't write or keep if blank
         if (badNames.size() != 0)   { writeAccnos(badNames);        }   
         if (m->isBlank(badSeqFile)) { m->mothurRemove(badSeqFile);  }
+        else { outputNames.push_back(badSeqFile); outputTypes["fasta"].push_back(badSeqFile); }
         
         if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) {       m->mothurRemove(outputNames[i]); } return 0; }
         if (namefile != "")                    {               readName(badNames);             }   
@@ -601,7 +602,10 @@ int PcrSeqsCommand::driverPcr(string filename, string goodFasta, string badFasta
                         }
                     }
                 }
-                                    
+                
+                //trimming removed all bases
+                if (currSeq.getUnaligned() == "") { goodSeq = false; }
+                
                                if(goodSeq == 1)    {   currSeq.printSequence(goodFile);        }
                                else {  
                     badSeqNames.insert(currSeq.getName());