8 * Created by Sarah Westcott on 1/16/09.
9 * Copyright 2009 Schloss Lab UMASS AMherst. All rights reserved.
18 /* This class represents the fasta file. It reads a fasta file a populates the internal data structure "data".
19 Data is a map where the key is the sequence and the value is a struct containing the sequences groupname,
20 a list of the sequences names who have the same sequence and a number of how many sequence names there are. */
29 string getGroupName(string); //pass a sequence name get its group
30 int getGroupNumber(string); //pass a sequence name get number of sequence in its group
31 string getNames(string); //pass a sequence get the string of names in the group separated by ','s.
32 void push_back(string, string); //sequencename, sequence
33 int sizeUnique(); //returns number of unique sequences
34 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.
35 void printCondensedFasta(ostream&); //produces a fasta file.
36 void readFastaFile(ifstream&);
37 string getSequence(string); //pass it a name of a sequence, it returns the sequence.
41 string groupname; //the group name for identical sequences, will be set to the first sequence found.
42 int groupnumber; //the number of sequence names with the same sequence.
43 string names; //the names of the sequence separated by ','.
46 map<string, group> data; //sequence, groupinfo - condensed representation of file
47 map<string, string> seqmap; //name, sequence - uncondensed representation of file
48 map<string, group>::iterator it;
49 map<string, string>::iterator it2;