From 2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332 Mon Sep 17 00:00:00 2001 From: westcott Date: Fri, 27 Jan 2012 11:07:58 -0500 Subject: [PATCH] added sequence name to error string in fastq.info. Changed np_shannon to npshannon. --- collectcommand.cpp | 10 +++++----- parsefastaqcommand.cpp | 2 +- summarycommand.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/collectcommand.cpp b/collectcommand.cpp index e0d62dd..7ad4136 100644 --- a/collectcommand.cpp +++ b/collectcommand.cpp @@ -44,7 +44,7 @@ vector CollectCommand::setParameters(){ CommandParameter pshared("shared", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(pshared); CommandParameter plabel("label", "String", "", "", "", "", "",false,false); parameters.push_back(plabel); CommandParameter pfreq("freq", "Number", "", "100", "", "", "",false,false); parameters.push_back(pfreq); - CommandParameter pcalc("calc", "Multiple", "sobs-chao-nseqs-coverage-ace-jack-shannon-shannoneven-np_shannon-heip-smithwilson-simpson-simpsoneven-invsimpson-bootstrap-geometric-qstat-logseries-bergerparker-bstick-goodscoverage-efron-boneh-solow-shen", "sobs-chao-ace-jack-shannon-npshannon-simpson", "", "", "",true,false); parameters.push_back(pcalc); + CommandParameter pcalc("calc", "Multiple", "sobs-chao-nseqs-coverage-ace-jack-shannon-shannoneven-npshannon-heip-smithwilson-simpson-simpsoneven-invsimpson-bootstrap-geometric-qstat-logseries-bergerparker-bstick-goodscoverage-efron-boneh-solow-shen", "sobs-chao-ace-jack-shannon-npshannon-simpson", "", "", "",true,false); parameters.push_back(pcalc); CommandParameter pabund("abund", "Number", "", "10", "", "", "",false,false); parameters.push_back(pabund); CommandParameter psize("size", "Number", "", "0", "", "", "",false,false); parameters.push_back(psize); CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); @@ -94,7 +94,7 @@ CollectCommand::CollectCommand(){ outputTypes["jack"] = tempOutNames; outputTypes["shannon"] = tempOutNames; outputTypes["shannoneven"] = tempOutNames; - outputTypes["np_shannon"] = tempOutNames; + outputTypes["npshannon"] = tempOutNames; outputTypes["heip"] = tempOutNames; outputTypes["smithwilson"] = tempOutNames; outputTypes["simpson"] = tempOutNames; @@ -151,7 +151,7 @@ CollectCommand::CollectCommand(string option) { outputTypes["jack"] = tempOutNames; outputTypes["shannon"] = tempOutNames; outputTypes["shannoneven"] = tempOutNames; - outputTypes["np_shannon"] = tempOutNames; + outputTypes["npshannon"] = tempOutNames; outputTypes["heip"] = tempOutNames; outputTypes["smithwilson"] = tempOutNames; outputTypes["simpson"] = tempOutNames; @@ -346,8 +346,8 @@ int CollectCommand::execute(){ cDisplays.push_back(new CollectDisplay(new ShannonEven(), new OneColumnFile(fileNameRoot+"shannoneven"))); outputNames.push_back(fileNameRoot+"shannoneven"); outputTypes["shannoneven"].push_back(fileNameRoot+"shannoneven"); }else if (Estimators[i] == "npshannon") { - cDisplays.push_back(new CollectDisplay(new NPShannon(), new OneColumnFile(fileNameRoot+"np_shannon"))); - outputNames.push_back(fileNameRoot+"np_shannon"); outputTypes["np_shannon"].push_back(fileNameRoot+"np_shannon"); + cDisplays.push_back(new CollectDisplay(new NPShannon(), new OneColumnFile(fileNameRoot+"npshannon"))); + outputNames.push_back(fileNameRoot+"npshannon"); outputTypes["npshannon"].push_back(fileNameRoot+"npshannon"); }else if (Estimators[i] == "heip") { cDisplays.push_back(new CollectDisplay(new Heip(), new OneColumnFile(fileNameRoot+"heip"))); outputNames.push_back(fileNameRoot+"heip"); outputTypes["heip"].push_back(fileNameRoot+"heip"); diff --git a/parsefastaqcommand.cpp b/parsefastaqcommand.cpp index 9509a20..730873a 100644 --- a/parsefastaqcommand.cpp +++ b/parsefastaqcommand.cpp @@ -166,7 +166,7 @@ int ParseFastaQCommand::execute(){ //sanity check sequence length and number of quality scores match if (name2 != "") { if (name != name2) { m->mothurOut("[ERROR]: names do not match. read " + name + " for fasta and " + name2 + " for quality."); m->mothurOutEndLine(); m->control_pressed = true; break; } } - if (quality.length() != sequence.length()) { m->mothurOut("[ERROR]: lengths do not match. read " + toString(sequence.length()) + " characters for fasta and " + toString(quality.length()) + " characters for quality scores."); m->mothurOutEndLine(); m->control_pressed = true; break; } + if (quality.length() != sequence.length()) { m->mothurOut("[ERROR]: Lengths do not match for sequence " + name + ". Read " + toString(sequence.length()) + " characters for fasta and " + toString(quality.length()) + " characters for quality scores."); m->mothurOutEndLine(); m->control_pressed = true; break; } //print sequence info to files if (fasta) { outFasta << ">" << name << endl << sequence << endl; } diff --git a/summarycommand.cpp b/summarycommand.cpp index 022b174..83ea8c9 100644 --- a/summarycommand.cpp +++ b/summarycommand.cpp @@ -42,7 +42,7 @@ vector SummaryCommand::setParameters(){ CommandParameter psabund("sabund", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(psabund); CommandParameter pshared("shared", "InputTypes", "", "", "LRSS", "LRSS", "none",false,false); parameters.push_back(pshared); CommandParameter plabel("label", "String", "", "", "", "", "",false,false); parameters.push_back(plabel); - CommandParameter pcalc("calc", "Multiple", "sobs-chao-nseqs-coverage-ace-jack-shannon-shannoneven-np_shannon-heip-smithwilson-simpson-simpsoneven-invsimpson-bootstrap-geometric-qstat-logseries-bergerparker-bstick-goodscoverage-efron-boneh-solow-shen", "sobs-chao-ace-jack-shannon-npshannon-simpson", "", "", "",true,false); parameters.push_back(pcalc); + CommandParameter pcalc("calc", "Multiple", "sobs-chao-nseqs-coverage-ace-jack-shannon-shannoneven-npshannon-heip-smithwilson-simpson-simpsoneven-invsimpson-bootstrap-geometric-qstat-logseries-bergerparker-bstick-goodscoverage-efron-boneh-solow-shen", "sobs-chao-ace-jack-shannon-npshannon-simpson", "", "", "",true,false); parameters.push_back(pcalc); CommandParameter pabund("abund", "Number", "", "10", "", "", "",false,false); parameters.push_back(pabund); CommandParameter psize("size", "Number", "", "0", "", "", "",false,false); parameters.push_back(psize); CommandParameter pgroupmode("groupmode", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pgroupmode); -- 2.39.2