00001
00002
00003
00005 #ifndef PRINTVEC_H
00006 #define PRINTVEC_H
00007
00008 #include "CustomScore.h"
00009 #include "Options.h"
00010 #include <fstream>
00011 #include <stdexcept>
00012
00013 using std::vector;
00014
00015 class RegionPrediction;
00016 class DataSetAbstractProduct;
00017
00018 class PrintVec : public CustomScore {
00019 public:
00020 static void newInstance(const Options& opts,
00021 const DataSetAbstractProduct& dsap) {
00022 assert(!_instance);
00023 _instance = new PrintVec(opts,dsap);
00024 }
00025 static PrintVec* getInstance() {
00026 assert(_instance);
00027 return _instance;
00028 }
00029 static void deleteInstance() {
00030 assert(_instance);
00031 delete _instance;
00032 }
00033 CustomScore::LabelScore score(const RegionPrediction&, const string&) const;
00034 void score(vector<RegionPrediction*>&, const string&) const;
00035 bool parseOnly() const { return true;}
00036 int getEnd5() const { return _end5; }
00037 int getEnd3() const { return _end3; }
00038
00039 double getProb(const AnnotationItem&, EvScores::Bnd_t, dsu::Strand_t) const { return -1; }
00040
00041 public:
00042 vector<std::ostream*> _ostrmVec;
00043
00044 protected:
00045 virtual ~PrintVec() throw() {
00046 for(unsigned i = 0; i < _ostrmVec.size(); ++i) {
00047 delete _ostrmVec[i];
00048 }
00049 }
00050 PrintVec(const Options&, const DataSetAbstractProduct&);
00051
00052 private:
00053 void scoreHelp(const RegionPrediction&, const string&, dsu::Strand_t) const;
00054
00055 private:
00056 static PrintVec * _instance;
00057
00058 private:
00059 PrintVec(const PrintVec&);
00060 const DataSetAbstractProduct& _geneList;
00061 int _end5, _end3;
00062
00063 };
00064
00065 #endif // PRINTVEC_H