ToPS
|
00001 /* 00002 * PairHiddenMarkovModelCreator.hpp 00003 * 00004 * Copyright 2011 Vitor Onuchic <vitoronuchic@gmail.com> 00005 * André Yoshiaki Kashiwabara <akashiwabara@usp.br> 00006 * Ígor Bonádio <ibonadio@ime.usp.br> 00007 * Vitor Onuchic <vitoronuchic@gmail.com> 00008 * Alan Mitchell Durham <aland@usp.br> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00023 * MA 02110-1301, USA. 00024 */ 00025 00026 #ifndef PAIR_HIDDEN_MARKOV_MODEL_CREATOR_HPP 00027 #define PAIR_HIDDEN_MARKOV_MODEL_CREATOR_HPP 00028 00029 #include "crossplatform.hpp" 00030 00031 #include "ProbabilisticModelCreator.hpp" 00032 #include "ProbabilisticModel.hpp" 00033 #include <boost/shared_ptr.hpp> 00034 00035 namespace tops { 00037 class DLLEXPORT PairHiddenMarkovModelCreator : public ProbabilisticModelCreator 00038 { 00039 public: 00040 PairHiddenMarkovModelCreator() {} 00041 virtual ~PairHiddenMarkovModelCreator(){}; 00042 virtual ProbabilisticModelPtr create(ProbabilisticModelParameters & parameters) const ; 00043 00044 virtual std::string help() const 00045 { 00046 std::stringstream out; 00047 out << "\nUSAGE: " << std::endl; 00048 out << "Mandatory parameters: " << std::endl; 00049 out << "\tstate_names" << std::endl; 00050 out << "\tobservation_symbols" << std::endl; 00051 out << "\tinitial_probabilities" << std::endl; 00052 out << "\ttransitions" << std::endl; 00053 out << "\temission_probabilities" << std::endl; 00054 out << "Example: " << std::endl; 00055 out << "\tmodel_name = \"PairHiddenMarkovModel\"" << std::endl; 00056 out << "\tstate_names = (\"I\",\"D\",\"M\")" << std::endl; 00057 out << "\tobservation_symbols = (\"A\",\"T\",\"C\",\"G\")" << std::endl; 00058 out << "\ttransitions = (\"M\" | \"M\": 0.7;" << std::endl; 00059 out << "\t \"M\" | \"I\": 0.15;" << std::endl; 00060 out << "\t \"M\" | \"D\": 0.3;" << std::endl; 00061 out << "\t \"I\" | \"M\": 0.7)" << std::endl; 00062 out << "\t \"I\" | \"I\": 0.7)" << std::endl; 00063 out << "\t \"D\" | \"D\": 0.7)" << std::endl; 00064 out << "\t \"D\" | \"M\": 0.15)" << std::endl; 00065 out << "\temissions = (\"AA\" | \"M\": 0.0625;" << std::endl; 00066 out << "\t \"AT\" | \"M\": 0.0625;" << std::endl; 00067 out << "\t \"AC\" | \"M\": 0.0625;" << std::endl; 00068 out << "\t \"AG\" | \"M\": 0.0625;" << std::endl; 00069 out << "\t \"TA\" | \"M\": 0.0625;" << std::endl; 00070 out << "\t \"TT\" | \"M\": 0.0625;" << std::endl; 00071 out << "\t \"TC\" | \"M\": 0.0625;" << std::endl; 00072 out << "\t \"TG\" | \"M\": 0.0625;" << std::endl; 00073 out << "\t \"CA\" | \"M\": 0.0625;" << std::endl; 00074 out << "\t \"CT\" | \"M\": 0.0625;" << std::endl; 00075 out << "\t \"CC\" | \"M\": 0.0625;" << std::endl; 00076 out << "\t \"CG\" | \"M\": 0.0625)" << std::endl; 00077 out << "\t \"GA\" | \"M\": 0.0625)" << std::endl; 00078 out << "\t \"GT\" | \"M\": 0.0625)" << std::endl; 00079 out << "\t \"GC\" | \"M\": 0.0625)" << std::endl; 00080 out << "\t \"GG\" | \"M\": 0.0625)" << std::endl; 00081 out << "\t \"A_\" | \"I\": 0.25)" << std::endl; 00082 out << "\t \"T_\" | \"I\": 0.25)" << std::endl; 00083 out << "\t \"C_\" | \"I\": 0.25)" << std::endl; 00084 out << "\t \"G_\" | \"I\": 0.25)" << std::endl; 00085 out << "\t \"_A\" | \"D\": 0.25)" << std::endl; 00086 out << "\t \"_T\" | \"D\": 0.25)" << std::endl; 00087 out << "\t \"_C\" | \"D\": 0.25)" << std::endl; 00088 out << "\t \"_G\" | \"D\": 0.25)" << std::endl; 00089 out << "\tinitial_probabilities = (\"M\": 1.0;" << std::endl; 00090 out << "\t \"I\": 0.0)" << std::endl; 00091 out << "\t \"D\": 0.0)" << std::endl; 00092 return out.str(); 00093 } 00094 00095 00096 }; 00097 typedef boost::shared_ptr <PairHiddenMarkovModelCreator> PairHiddenMarkovModelCreatorPtr; 00098 } 00099 00100 #endif