1 #ifndef CLUSTERFRAGMENTSCOMMAND_H
2 #define CLUSTERFRAGMENTSCOMMAND_H
5 * clusterfragmentscommand.h
8 * Created by westcott on 9/23/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
14 #include "command.hpp"
15 #include "sequence.hpp"
17 /************************************************************/
25 seqRNode(int n, Sequence s, string nm, int l) : numIdentical(n), seq(s), names(nm), active(1), length(l) {}
28 /************************************************************/
30 class ClusterFragmentsCommand : public Command {
33 ClusterFragmentsCommand(string);
34 ClusterFragmentsCommand();
35 ~ClusterFragmentsCommand() {}
37 vector<string> setParameters();
38 string getCommandName() { return "cluster.fragments"; }
39 string getCommandCategory() { return "Sequence Processing"; }
40 string getHelpString();
41 string getCitation() { return "http://www.mothur.org/wiki/Cluster.fragments"; }
42 string getDescription() { return "creates a namesfile with sequences that are a fragment of a larger sequence"; }
45 void help() { m->mothurOut(getHelpString()); }
49 string fastafile, namefile, outputDir;
51 vector<seqRNode> alignSeqs;
52 map<string, string> names; //represents the names file first column maps to second column
53 map<string, int> sizes; //this map a seq name to the number of identical seqs in the names file
54 map<string, int>::iterator itSize;
55 vector<string> outputNames;
59 void printData(string, string); //fasta filename, names file name
60 bool isFragment(string, string);
64 /************************************************************/