From b86361f726a0d1dfc9f2e91b795e402d97c46f9d Mon Sep 17 00:00:00 2001 From: Sarah Westcott Date: Wed, 28 Mar 2012 14:52:15 -0400 Subject: [PATCH] mods to pcr.seqs --- createdatabasecommand.cpp | 2 +- prcseqscommand.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/createdatabasecommand.cpp b/createdatabasecommand.cpp index e4a911f..9d90e74 100644 --- a/createdatabasecommand.cpp +++ b/createdatabasecommand.cpp @@ -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"; 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()); -- 2.39.2