X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=fastamap.h;h=355a8df51786bdac9c229aed9d4233bd46d41c3e;hb=edec660ee2be477ac1539109d949a60cb7e16243;hp=864a2d03951a9892919dfbdc8641a156e4ef5134;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed;p=mothur.git diff --git a/fastamap.h b/fastamap.h index 864a2d0..355a8df 100644 --- a/fastamap.h +++ b/fastamap.h @@ -12,11 +12,7 @@ using namespace std; -#include -#include -#include -#include -#include "utilities.hpp" +#include "mothur.h" /* This class represents the fasta file. It reads a fasta file a populates the internal data structure "data". @@ -33,12 +29,12 @@ public: string getGroupName(string); //pass a sequence name get its group int getGroupNumber(string); //pass a sequence name get number of sequence in its group string getNames(string); //pass a sequence get the string of names in the group separated by ','s. - void push_back(string, string); //sequencename, groupname - void set(string, string, string); //sequencename, groupname, groupnumber, names. - void clear(); - int size(); //returns number of unique sequences - void print(ostream&); //produces a 2 column file with the groupname in the first column and the names in the second column. + void push_back(string, string); //sequencename, sequence + int sizeUnique(); //returns number of unique sequences + void printNamesFile(ostream&); //produces a 2 column file with the groupname in the first column and the names in the second column - a names file. + void printCondensedFasta(ostream&); //produces a fasta file. void readFastaFile(ifstream&); + string getSequence(string); //pass it a name of a sequence, it returns the sequence. private: struct group { @@ -47,8 +43,10 @@ private: string names; //the names of the sequence separated by ','. }; - map data; //sequence, groupinfo + map data; //sequence, groupinfo - condensed representation of file + map seqmap; //name, sequence - uncondensed representation of file map::iterator it; + map::iterator it2; }; #endif