|
StochHMM
v0.34
Flexible Hidden Markov Model C++ Library and Application
|
#include <externDefinitions.h>
Public Member Functions | |
| ExDefSequence () | |
| ExDefSequence (size_t size) | |
| bool | parse (std::ifstream &, stateInfo &) |
| bool | defined (size_t) |
| bool | isAbsolute (size_t) |
| size_t | getAbsState (size_t) |
| bool | isWeighted (size_t) |
| bool | isWeighted (size_t, size_t) |
| double | getWeight (size_t, size_t) |
| void | print () |
| Copy constructor for ExDefSequence. | |
| std::string | stringify () |
Private Member Functions | |
| bool | _parseAbsDef (stringList &ln, stateInfo &) |
| Parse the absolute def from stringList give the stateInfo. | |
| bool | _parseWeightDef (stringList &ln, stateInfo &) |
| Parse the weightDef from stringList give the stateInfo. | |
Private Attributes | |
| sparseArray< ExDef * > | defs |
Friends | |
| class | sequences |
Contains external definitions for the sequence An external definition is how a particular position of the sequence is either weighted toward a state or in some cases is absolutely produced by a given state Each position can contain an external definition either absolute or states weighted by some value;
Definition at line 55 of file externDefinitions.h.
|
inline |
Definition at line 58 of file externDefinitions.h.
|
inline |
Creates an ExDefSequence
| size | amount of ExDef in the sequence |
Definition at line 62 of file externDefinitions.h.
|
private |
Parse the absolute def from stringList give the stateInfo.
Definition at line 220 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), defs, StochHMM::stringList::size(), SIZE_MAX, StochHMM::split_line(), StochHMM::stateInfo::stateIterByName, and StochHMM::stringToInt().
Referenced by parse().
|
private |
Parse the weightDef from stringList give the stateInfo.
Definition at line 318 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), defs, StochHMM::stringList::size(), StochHMM::stateInfo::stateIterByGff, StochHMM::stateInfo::stateIterByLabel, StochHMM::stateInfo::stateIterByName, StochHMM::stringToDouble(), and StochHMM::stringToInt().
Referenced by parse().
| bool StochHMM::ExDefSequence::defined | ( | size_t | position | ) |
Defined if there is a external definition defined for the position
| position | Position of the sequence to check for external definition |
Definition at line 60 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), and defs.
Referenced by StochHMM::sequences::exDefDefined().
| size_t StochHMM::ExDefSequence::getAbsState | ( | size_t | position | ) |
Get the absolute state defined for the position in the sequence
| position | Position of the sequence |
Definition at line 85 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), and defs.
| double StochHMM::ExDefSequence::getWeight | ( | size_t | position, |
| size_t | stateIter | ||
| ) |
Get the weight for the external definition at a position in the sequence
| position | Position in the sequence |
| stateIter | Index of state to get weight |
Definition at line 111 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), and defs.
Referenced by StochHMM::sequences::getWeight().
| bool StochHMM::ExDefSequence::isAbsolute | ( | size_t | position | ) |
External definitions are either absolute or weighted. Checks to see if the *external definition at position in sequence is absolute
| position | Position in teh sequence |
Definition at line 74 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), and defs.
| bool StochHMM::ExDefSequence::isWeighted | ( | size_t | position | ) |
Check to see if the external definition at the position is weighted and not absolute
| position | Position in the sequence |
Definition at line 100 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), and defs.
| bool StochHMM::ExDefSequence::isWeighted | ( | size_t | , |
| size_t | |||
| ) |
| bool StochHMM::ExDefSequence::parse | ( | std::ifstream & | file, |
| stateInfo & | info | ||
| ) |
Parses the ExDefSequence from a file stream
| file | File stream to be used to parse the External definitions from |
Definition at line 182 of file externDefinitions.cpp.
References _parseAbsDef(), _parseWeightDef(), and StochHMM::stringList::fromDef().
Referenced by StochHMM::sequence::getFasta(), and StochHMM::sequence::getReal().
| void StochHMM::ExDefSequence::print | ( | ) |
Copy constructor for ExDefSequence.
Print the External definitions to stdout
Definition at line 49 of file externDefinitions.cpp.
References StochHMM::sparseArray< T >::defined(), defs, and StochHMM::sparseArray< T >::size().
| std::string StochHMM::ExDefSequence::stringify | ( | ) |
|
friend |
Definition at line 62 of file externDefinitions.h.
|
private |
Definition at line 94 of file externDefinitions.h.
Referenced by _parseAbsDef(), _parseWeightDef(), defined(), StochHMM::sequences::exDefDefined(), getAbsState(), getWeight(), isAbsolute(), isWeighted(), and print().
1.8.1