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"
16 #include "counttable.h"
18 /************************************************************/
26 seqRNode(int n, Sequence s, string nm, int l) : numIdentical(n), seq(s), names(nm), active(1), length(l) {}
29 /************************************************************/
31 class ClusterFragmentsCommand : public Command {
34 ClusterFragmentsCommand(string);
35 ClusterFragmentsCommand();
36 ~ClusterFragmentsCommand() {}
38 vector<string> setParameters();
39 string getCommandName() { return "cluster.fragments"; }
40 string getCommandCategory() { return "Sequence Processing"; }
42 string getHelpString();
43 string getOutputPattern(string);
44 string getCitation() { return "http://www.mothur.org/wiki/Cluster.fragments"; }
45 string getDescription() { return "creates a namesfile with sequences that are a fragment of a larger sequence"; }
48 void help() { m->mothurOut(getHelpString()); }
53 string fastafile, namefile, countfile, outputDir;
55 vector<seqRNode> alignSeqs;
56 map<string, string> names; //represents the names file first column maps to second column
57 map<string, int> sizes; //this map a seq name to the number of identical seqs in the names file
58 map<string, int>::iterator itSize;
59 vector<string> outputNames;
63 void printData(string, string); //fasta filename, names file name
64 bool isFragment(string, string);
68 /************************************************************/