1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#ifndef CONSENSUSSEQSCOMMAND_H
#define CONSENSUSSEQSCOMMAND_H
//test
/*
* consensusseqscommand.h
* Mothur
*
* Created by westcott on 11/23/10.
* Copyright 2010 Schloss Lab. All rights reserved.
*
*/
#include "command.hpp"
#include "listvector.hpp"
#include "counttable.h"
class ConsensusSeqsCommand : public Command {
public:
ConsensusSeqsCommand(string);
~ConsensusSeqsCommand(){}
vector<string> setParameters();
string getCommandName() { return "consensus.seqs"; }
string getCommandCategory() { return "Sequence Processing"; }
string getHelpString();
string getOutputPattern(string);
string getCitation() { return "http://www.mothur.org/wiki/Consensus.seqs"; }
string getDescription() { return "create a consensus sequence for each OTU or for a fasta file"; }
int execute();
void help() { m->mothurOut(getHelpString()); }
private:
CountTable ct;
bool abort, allLines;
string fastafile, listfile, namefile, countfile, label;
set<string> labels;
vector<string> outputNames;
map<string, string> fastaMap;
map<string, string> nameMap;
map<string, int> nameFileMap;
int seqLength;
float cutoff;
int readFasta();
int readNames();
int processList(ListVector*&);
string getConsSeq(string, ofstream&, int);
char getBase(vector<int>, int);
};
#endif
|