ToPS
|
00001 #ifndef GENERALIZED_PAIR_HIDDEN_MARKOV_MODEL_CREATOR_HPP 00002 #define GENERALIZED_PAIR_HIDDEN_MARKOV_MODEL_CREATOR_HPP 00003 00004 #include "ProbabilisticModelCreator.hpp" 00005 #include "ProbabilisticModel.hpp" 00006 #include <boost/shared_ptr.hpp> 00007 00008 namespace tops { 00009 class GeneralizedPairHiddenMarkovModelCreator : public ProbabilisticModelCreator 00010 { 00011 public: 00012 GeneralizedPairHiddenMarkovModelCreator() {} 00013 virtual ~GeneralizedPairHiddenMarkovModelCreator(){}; 00014 virtual ProbabilisticModelPtr create(ProbabilisticModelParameters & parameters) const ; 00015 00016 virtual std::string help() const 00017 { 00018 std::stringstream out; 00019 out << "\nUSAGE: " << std::endl; 00020 out << "Mandatory parameters: " << std::endl; 00021 out << "\tstate_names" << std::endl; 00022 out << "\tobservation_symbols" << std::endl; 00023 out << "\tinitial_probabilities" << std::endl; 00024 out << "\tend_probabilities" << std::endl; 00025 out << "\tnumber_of_emissions" << std::endl; 00026 out << "\tduration_probabilities" << std::endl; 00027 out << "\ttransitions" << std::endl; 00028 out << "\temission_models" << std::endl; 00029 out << "Example: " << std::endl; 00030 out << "\tmodel_name = \"GeneralizedPairHiddenMarkovModel\"" << std::endl; 00031 out << "\tstate_names = (\"N\",\"C\")" << std::endl; 00032 out << "\tobservation_symbols = (\"A\",\"T\",\"C\",\"G\")" << std::endl; 00033 out << "\ttransitions = (\"N\" | \"N\": 0.899;" << std::endl; 00034 out << "\t \"C\" | \"N\": 0.1;" << std::endl; 00035 out << "\t \"N\" | \"C\": 0.999;" << std::endl; 00036 out << "\t(\"C\" : \"codingEmissionModel.txt\";" << std::endl; 00037 out << "\t\"N\" : \"noncodingEmissionModel.txt\";)" << std::endl; 00038 out << "\tinitial_probabilities = (\"N\": 0.9;" << std::endl; 00039 out << "\t \"C\": 0.1)" << std::endl; 00040 out << "end_probabilities = (\"N\" = 0.0001;" << std::endl; 00041 out << "\"C\" = 0.0001;)" << std::endl; 00042 out << "number_of_emissions = (\"C\" : \"1-1000,1-1000\";" << std::endl; 00043 out << "\"N\" : \"0-1,0-1\";)" << std::endl; 00044 out << "duration_probabilities = (\"C\" : \"durationCoding.txt\";)" << std::endl; 00045 return out.str(); 00046 } 00047 00048 00049 }; 00050 typedef boost::shared_ptr <GeneralizedPairHiddenMarkovModelCreator> GeneralizedPairHiddenMarkovModelCreatorPtr; 00051 } 00052 00053 #endif