X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=prcseqscommand.cpp;h=d9c37769b07d24f40efbfef9e076da33f5c86c29;hb=b86361f726a0d1dfc9f2e91b795e402d97c46f9d;hp=afedc746360b495850d588b6c7ce3839ec3f9256;hpb=9aa36ad8297141ef9fcab04fea10e96d2fed26fe;p=mothur.git diff --git a/prcseqscommand.cpp b/prcseqscommand.cpp index afedc74..d9c3776 100644 --- a/prcseqscommand.cpp +++ b/prcseqscommand.cpp @@ -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());