X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=binsequencecommand.h;fp=binsequencecommand.h;h=365fb3c3afdaf8cedd788b83e1ef2a29a4e9b00b;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/binsequencecommand.h b/binsequencecommand.h new file mode 100644 index 0000000..365fb3c --- /dev/null +++ b/binsequencecommand.h @@ -0,0 +1,54 @@ +#ifndef BINSEQCOMMAND_H +#define BINSEQCOMMAND_H +/* + * binsequencecommand.h + * Mothur + * + * Created by Sarah Westcott on 4/3/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +/* The bin.seqs command outputs a .fasta file for each distance you specify appending the OTU number to each name. */ + +#include "command.hpp" +#include "inputdata.h" +#include "listvector.hpp" +#include "fastamap.h" +#include "groupmap.h" + +class BinSeqCommand : public Command { + +public: + BinSeqCommand(string); + BinSeqCommand(); + ~BinSeqCommand(); + + vector setParameters(); + string getCommandName() { return "bin.seqs"; } + string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + string getCitation() { return "http://www.mothur.org/wiki/Bin.seqs"; } + string getDescription() { return "maps sequences to otus"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + +private: + + ListVector* list; + InputData* input; + FastaMap* fasta; + GroupMap* groupMap; + bool abort, allLines; + set labels; //holds labels to be used + string filename, fastafile, listfile, namesfile, groupfile, label, outputDir; + ofstream out; + ifstream in, inNames; + vector outputNames; + + void readNamesFile(); + int process(ListVector*); +}; + +#endif