Skip to content
Paul Lott edited this page Jul 29, 2013 · 23 revisions

StochHMM implements standard HMM, HMM with duration (for viterbi algorithm) and in the future will implement hidden semi-Markov model architectures and algorithms. It grants researchers the power to integrate additional datasets in their HMM to improve predictions. Finally, it adapts HMM algorithms to provide stochastic decoding giving researchers the ability to explore and rank sub-optimal predictions.

To run the StochHMM command-line application you'll need a model file and a sequence.

##Command-line options:

###Required command-line options and files

-model <model file>	import model file
-seq <sequence file>	import sequence file in fasta format

###Non-stochastic Decoding: Different algorithms available for decoding

-viterbi	performs viterbi traceback
-posterior	Calculates posterior probabilities
		If no output options are supplied, this will return the posterior scores
		for all of the states.

	-threshold <score>: Return only the States with a GFF_DESC, if they are
			greater than or equal to the threshold amount.

-nbest <number of paths> 		performs n-best viterbi algorithm

###Stochastic Decoding:

-stochastic <Type> 
	Types:
		forward		performs stochastic traceback using forward algorithm
		viterbi		performs stochastic traceback using modified-viterbi algorithm
		posterior	performs stochastic traceback using posterior algorithm
-rep  <number of tracebacks to sample>

###Output options:

-gff			prints path in GFF format
-path			prints state path according to state number
-label			prints state path as labels
-hits			prints hit table for multiple tracebacks for all states at each position

A couple example model files have been provided.

3_16_Eddy.hmm - GC rich model from Problem 3.16 of 
	"Problems and Solutions in Biological Sequence Analysis. M. Borodovsky and S. Ekisheva. Cambridge
	 Press, UK (2006)"

Dice.hmm - Dishonest Casino Dice model from pg 65 of 
	"Biological Sequence Analysis: Probabilistic models of proteins and nucleic acids. R Durbin, S.
	 Eddy, A. Krogh, and G. Mitchison. Cambridge Press, UK (1998)"

GC-skew.hmm - SkewR model for predicting R-loop forming regions in the human genome. See 
	"Ginno,P.A. et al. (2012) R-loop formation is a distinctive characteristic of unmethylated human
	 CpG island promoters. Mol. Cell, 45, 814–825."
$ stochhmm -model ../examples/Dice.hmm -seq ../examples/Dice.fa -viterbi -label
#Score: -539.062
Eddy Dice TRACK_NAME:TRACK1	StochHMM	FAIR	1	48	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	LOADED	49	66	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	FAIR	67	78	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	LOADED	79	112	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	FAIR	113	179	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	LOADED	180	192	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	FAIR	193	270	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	LOADED	271	289	.	+	.
Eddy Dice TRACK_NAME:TRACK1	StochHMM	FAIR	290	300	.	+	.
$ stochhmm -model ../examples/3_16Eddy.hmm -seq ../example/3_16Eddy.fa -viterbi -gff
$ stochhmm -model ../examples/3_16Eddy.hmm -seq ../example/3_17Eddy.fa -posterior
$ stochhmm -model ../examples/Dice.hmm -seq ../examples/Dice.fa -stochastic viterbi -rep 10 -label
$ stochhmm -model ../examples/Dice.hmm -seq ../examples/Dice.fa -stochastic posterior -rep 10 -label