Run hHMM in tMAVEN script mode
The following is a script example for apply a hierarchical HMM (hHMM) in tMAVEN. The algorithm used is translated into Python from the MATLAB version described in: Hon, J., and Gonzalez, R.L., Jr., Bayesian-estimated hierarchical HMMs enable robust analysis of single-molecule kinetic heterogeneity. Biophysical Journal. 116, 1790-1802 (2019).
from tmaven.app import setup_maven
#### Analyze data with hHMM
## Make a new MAVEN instance
= setup_maven(['--log_stdout'])
maven
## Load data
'example_smd.hdf5','L1-tRNA')
maven.io.load_smdtmaven_hdf5(
## Turn on only the first 10 trajectorys
*=False
maven.data.flag_ons10]+=True
maven.data.flag_ons[:
# Specify the model parameters
'modeler.hhmm.restarts'] = 4
maven.prefs['modeler.hhmm.maxiters'] = 100
maven.prefs['modeler.hhmm.tolerance'] = 1e-4
maven.prefs[
## Run 2xw hHMM
maven.modeler.run_fret_hhmm()
# Export
= 'result_hhmm.hdf5'
oname maven.modeler.export_result_to_hdf5(oname)
This script runs a two-level two-state hHMM. Integrating this into the tMAVEN GUI, along with interface options to specify and customize the tree structure of the hHMM applied to the data, is currently a work in progress.