]> git.donarmstrong.com Git - mothur.git/blobdiff - splitgroupscommand.h
added split.groups command
[mothur.git] / splitgroupscommand.h
diff --git a/splitgroupscommand.h b/splitgroupscommand.h
new file mode 100644 (file)
index 0000000..f6e8760
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef SPLITGROUPSCOMMAND_H
+#define SPLITGROUPSCOMMAND_H
+
+/*
+ *  splitgroupscommand.h
+ *  Mothur
+ *
+ *  Created by westcott on 9/20/10.
+ *  Copyright 2010 Schloss Lab. All rights reserved.
+ *
+ */
+
+
+/* split.groups - given a group file, split sequences and names files in to separate files *.group1.fasta and .group1.names. */
+
+
+#include "command.hpp"
+#include "groupmap.h"
+#include "sequence.hpp"
+
+/***************************************************************************************/
+
+class SplitGroupCommand : public Command {
+       
+public:
+       SplitGroupCommand(string);      
+       ~SplitGroupCommand();
+       int execute();  
+       void help();
+
+       
+private:
+       int readNames(); 
+       int splitFasta(); 
+       
+       vector<string> outputNames;
+       map<string, vector<string> > nameMap;
+       map<string, vector<string> >::iterator itNames;
+       GroupMap* groupMap;
+       
+       string outputDir, namefile, groupfile, groups, fastafile;
+       vector<string> Groups;
+       bool abort;
+};
+
+/***************************************************************************************/
+
+#endif
+
+
+