CommandParameter pfasta("fasta", "InputTypes", "", "", "PhylipColumnFasta", "PhylipColumnFasta", "FastaTaxName",false,false); parameters.push_back(pfasta);
CommandParameter pname("name", "InputTypes", "", "", "none", "none", "ColumnName-FastaTaxName",false,false); parameters.push_back(pname);
CommandParameter pcolumn("column", "InputTypes", "", "", "PhylipColumnFasta", "PhylipColumnFasta", "ColumnName",false,false); parameters.push_back(pcolumn);
- CommandParameter ptaxlevel("taxlevel", "Number", "", "1", "", "", "",false,false); parameters.push_back(ptaxlevel);
+ CommandParameter ptaxlevel("taxlevel", "Number", "", "3", "", "", "",false,false); parameters.push_back(ptaxlevel);
CommandParameter psplitmethod("splitmethod", "Multiple", "classify-fasta-distance", "distance", "", "", "",false,false); parameters.push_back(psplitmethod);
CommandParameter plarge("large", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(plarge);
CommandParameter pshowabund("showabund", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pshowabund);
CommandParameter ptiming("timing", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(ptiming);
CommandParameter pprocessors("processors", "Number", "", "1", "", "", "",false,false); parameters.push_back(pprocessors);
- CommandParameter pcutoff("cutoff", "Number", "", "10", "", "", "",false,false); parameters.push_back(pcutoff);
+ CommandParameter pcutoff("cutoff", "Number", "", "0.25", "", "", "",false,false); parameters.push_back(pcutoff);
CommandParameter pprecision("precision", "Number", "", "100", "", "", "",false,false); parameters.push_back(pprecision);
CommandParameter pmethod("method", "Multiple", "furthest-nearest-average-weighted", "average", "", "", "",false,false); parameters.push_back(pmethod);
CommandParameter phard("hard", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(phard);
helpString += "The phylip and column parameter allow you to enter your distance file. \n";
helpString += "The fasta parameter allows you to enter your aligned fasta file. \n";
helpString += "The name parameter allows you to enter your name file and is required if your distance file is in column format. \n";
- helpString += "The cutoff parameter allow you to set the distance you want to cluster to, default is 10.0. \n";
+ helpString += "The cutoff parameter allow you to set the distance you want to cluster to, default is 0.25. \n";
helpString += "The precision parameter allows you specify the precision of the precision of the distances outputted, default=100, meaning 2 decimal places. \n";
helpString += "The method allows you to specify what clustering algorythm you want to use, default=average, option furthest, nearest, or average. \n";
helpString += "The splitmethod parameter allows you to specify how you want to split your distance file before you cluster, default=distance, options distance, classify or fasta. \n";
helpString += "The taxonomy parameter allows you to enter the taxonomy file for your sequences, this is only valid if you are using splitmethod=classify. Be sure your taxonomy file does not include the probability scores. \n";
- helpString += "The taxlevel parameter allows you to specify the taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list. \n";
+ helpString += "The taxlevel parameter allows you to specify the taxonomy level you want to use to split the distance file, default=3, meaning use the first taxon in each list. \n";
helpString += "The large parameter allows you to indicate that your distance matrix is too large to fit in RAM. The default value is false.\n";
#ifdef USE_MPI
helpString += "When using MPI, the processors parameter is set to the number of MPI processes running. \n";
else { splitmethod = temp; }
}
- temp = validParameter.validFile(parameters, "cutoff", false); if (temp == "not found") { temp = "10"; }
+ temp = validParameter.validFile(parameters, "cutoff", false); if (temp == "not found") { temp = "0.25"; }
convert(temp, cutoff);
cutoff += (5 / (precision * 10.0));
- temp = validParameter.validFile(parameters, "taxlevel", false); if (temp == "not found") { temp = "1"; }
+ temp = validParameter.validFile(parameters, "taxlevel", false); if (temp == "not found") { temp = "3"; }
convert(temp, taxLevelCutoff);
method = validParameter.validFile(parameters, "method", false); if (method == "not found") { method = "average"; }
commands["screen.seqs"] = "MPIEnabled";
commands["summary.seqs"] = "MPIEnabled";
commands["cluster.split"] = "MPIEnabled";
- commands["shhh.seqs"] = "MPIEnabled";
+ commands["shhh.flows"] = "MPIEnabled";
commands["sens.spec"] = "sens.spec";
commands["seq.error"] = "seq.error";
commands["seq.error"] = "summary.tax";
else if(commandName == "reverse.seqs") { command = new ReverseSeqsCommand(optionString); }
else if(commandName == "trim.seqs") { command = new TrimSeqsCommand(optionString); }
else if(commandName == "trim.flows") { command = new TrimFlowsCommand(optionString); }
- else if(commandName == "shhh.seqs") { command = new ShhherCommand(optionString); }
+ else if(commandName == "shhh.flows") { command = new ShhherCommand(optionString); }
else if(commandName == "list.seqs") { command = new ListSeqsCommand(optionString); }
else if(commandName == "get.seqs") { command = new GetSeqsCommand(optionString); }
else if(commandName == "remove.seqs") { command = new RemoveSeqsCommand(optionString); }
else if(commandName == "reverse.seqs") { pipecommand = new ReverseSeqsCommand(optionString); }
else if(commandName == "trim.seqs") { pipecommand = new TrimSeqsCommand(optionString); }
else if(commandName == "trim.flows") { pipecommand = new TrimFlowsCommand(optionString); }
- else if(commandName == "shhh.seqs") { pipecommand = new ShhherCommand(optionString); }
+ else if(commandName == "shhh.flows") { pipecommand = new ShhherCommand(optionString); }
else if(commandName == "list.seqs") { pipecommand = new ListSeqsCommand(optionString); }
else if(commandName == "get.seqs") { pipecommand = new GetSeqsCommand(optionString); }
else if(commandName == "remove.seqs") { pipecommand = new RemoveSeqsCommand(optionString); }
else if(commandName == "reverse.seqs") { shellcommand = new ReverseSeqsCommand(); }
else if(commandName == "trim.seqs") { shellcommand = new TrimSeqsCommand(); }
else if(commandName == "trim.flows") { shellcommand = new TrimFlowsCommand(); }
- else if(commandName == "shhh.seqs") { shellcommand = new ShhherCommand(); }
+ else if(commandName == "shhh.flows") { shellcommand = new ShhherCommand(); }
else if(commandName == "list.seqs") { shellcommand = new ListSeqsCommand(); }
else if(commandName == "get.seqs") { shellcommand = new GetSeqsCommand(); }
else if(commandName == "remove.seqs") { shellcommand = new RemoveSeqsCommand(); }
#include "datavector.hpp"
-/* This class is a child to datavector. It represents OTU information at a certain distance.
+/* DataStructure for a list file.
+ This class is a child to datavector. It represents OTU information at a certain distance.
A list vector can be converted into and ordervector, rabundvector or sabundvector.
Each member of the internal container "data" represents an individual OTU.
So data[0] = "a,b,c,d,e,f".
if (m->control_pressed) { delete parser; m->mothurRemove(newFastaFile); m->mothurRemove(newNamesFile); return 0; }
- m->mothurOut("Total number of sequences before precluster was " + toString(alignSeqs.size()) + "."); m->mothurOutEndLine();
+ m->mothurOut("Total number of sequences before pre.cluster was " + toString(alignSeqs.size()) + "."); m->mothurOutEndLine();
m->mothurOut("pre.cluster removed " + toString(count) + " sequences."); m->mothurOutEndLine(); m->mothurOutEndLine();
printData(newFastaFile, newNamesFile);
m->mothurOut("/******************************************/"); m->mothurOutEndLine();
- newNamesFile = filenames["name"][0];
- newFastaFile = filenames["fasta"][0];
-
+ m->renameFile(filenames["fasta"][0], newFastaFile);
+
}else {
if (namefile != "") { readNameFile(); }
if (it == thisName.end()) { m->mothurOut(thisSeqs[i].getName() + " is not in your names file, please correct."); m->mothurOutEndLine(); error = true; }
else{
//get number of reps
- int numReps = 0;
+ int numReps = 1;
for(int j=0;j<(it->second).length();j++){
if((it->second)[j] == ','){ numReps++; }
}
*
*/
+//DataStructure for a quality file.
+
#include "mothur.h"
#include "mothurout.h"
#include "datavector.hpp"
-/* This class is a child to datavector. It represents OTU information at a certain distance.
+/* Data Structure for a rabund file.
+ This class is a child to datavector. It represents OTU information at a certain distance.
A rabundvector can be converted into and ordervector, listvector or sabundvector.
Each member of the internal container "data" represents an individual OTU.
So data[0] = 6, because there are six member in that OTU.
#include "calculator.h"
-/* This class is a child to datavector. It represents OTU information at a certain distance.
+/* Data Structure for a sabund file.
+ This class is a child to datavector. It represents OTU information at a certain distance.
A sabundvector can be converted into and ordervector, listvector or rabundvector.
Each member of the internal container "data" represents the number of OTU's with that many members, but staring at 1.
So data[1] = 2, because there are two OTUs with 1 member.
*
*/
+
+//Data Structure for a fasta file.
+
#include "mothur.h"
#include "mothurout.h"
string first, second;
int countName = 0;
+ set<string> thisnames1;
while(!inName.eof()) {
if (m->control_pressed) { break; }
it = splitMap.find(group);
if (it != splitMap.end()) { //adding seqs to this group
(it->second) += "," + names[i];
+ thisnames1.insert(names[i]);
countName++;
}else { //first sighting of this group
splitMap[group] = names[i];
countName++;
+ thisnames1.insert(names[i]);
//is this seq in the fasta file?
if (i != 0) { //if not then we need to add a duplicate sequence to the seqs for this group so the new "fasta" and "name" files will match
if (error == 1) { m->control_pressed = true; }
if (countName != (groupMap->getNumSeqs())) {
+ vector<string> groupseqsnames = groupMap->getNamesSeqs();
+ for (int i = 0; i < groupseqsnames.size(); i++) {
+ set<string>::iterator itnamesfile = thisnames1.find(groupseqsnames[i]);
+ if (itnamesfile == thisnames1.end()){
+ cout << "missing name " + groupseqsnames[i] << '\t' << allSeqsMap[groupseqsnames[i]] << endl;
+ }
+ }
m->mothurOutEndLine();
m->mothurOut("[ERROR]: Your name file contains " + toString(countName) + " valid sequences, and your groupfile contains " + toString(groupMap->getNumSeqs()) + ", please correct.");
m->mothurOutEndLine();
#include "rabundvector.hpp"
//#include "groupmap.h"
-/* This class is a child to datavector. It represents OTU information at a certain distance.
+/* DataStructure for a shared file.
+ This class is a child to datavector. It represents OTU information at a certain distance.
It is similiar to an rabundvector except each member of data knows which group it belongs to.
Each member of the internal container "data" is a struct of type individual.
An individual which knows the OTU from which it came,
string ShhherCommand::getHelpString(){
try {
string helpString = "";
- helpString += "The shhh.seqs command reads a file containing flowgrams and creates a file of corrected sequences.\n";
+ helpString += "The shhh.flows command reads a file containing flowgrams and creates a file of corrected sequences.\n";
return helpString;
}
catch(exception& e) {
~ShhherCommand() {}
vector<string> setParameters();
- string getCommandName() { return "shhh.seqs"; }
- string getCommandCategory() { return "Hidden"; }
+ string getCommandName() { return "shhh.flows"; }
+ string getCommandCategory() { return "Sequence Processing"; }
string getHelpString();
- string getCitation() { return "no citation"; }
- string getDescription() { return "shhh.seqs"; }
+ string getCitation() { return "http://www.mothur.org/wiki/Shhh.flows"; }
+ string getDescription() { return "shhh.flows"; }
int execute();
vector<string> setParameters();
string getCommandName() { return "trim.flows"; }
- string getCommandCategory() { return "Hidden"; }
+ string getCommandCategory() { return "Sequence Processing"; }
string getHelpString();
- string getCitation() { return "no citation"; }
+ string getCitation() { return "http://www.mothur.org/wiki/Trim.flows"; }
string getDescription() { return "trim.flows"; }