X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimera.h;h=2dc2989280af72a7b55f5e54b3e699ae1405dda9;hb=dbd5da8043df1cb9f5ff7c6ddb5f550ea49b52c2;hp=2febd00e4be6ac8e4c1e8b0f0493cc47ed487834;hpb=2ad3477dcd6a01628712b32e767353f917f2a95a;p=mothur.git diff --git a/chimera.h b/chimera.h index 2febd00..2dc2989 100644 --- a/chimera.h +++ b/chimera.h @@ -13,6 +13,7 @@ #include "mothur.h" #include "sparsematrix.hpp" +#include "sequence.hpp" typedef list::iterator MatData; typedef map SeqMap; //maps sequence to all distance for that seqeunce @@ -37,6 +38,29 @@ class Chimera { virtual void setCons(string) {}; virtual void setQuantiles(string) {}; + virtual vector readSeqs(string file) { + try { + ifstream in; + openInputFile(file, in); + vector container; + + //read in seqs and store in vector + while(!in.eof()){ + + Sequence* current = new Sequence(in); + container.push_back(current); + gobble(in); + } + + in.close(); + return container; + } + catch(exception& e) { + errorOut(e, "Chimera", "readSeqs"); + exit(1); + } + } + //pure functions virtual void getChimeras() = 0;