Scripted modeling - no GUI
Process some data with a kinetic model and then plot it all without using the GUI
from tmaven.app import setup_maven
#### Analyze some data
## Make a new MAVEN instance
= setup_maven(['--log_stdout'])
maven
## Load data
'./notes/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[:
## Run vbFRET model selection with 1 through 6 states
1,6)
maven.modeler.run_fret_vbhmm_modelselection(
#### Make some plots
import matplotlib.pyplot as plt
=plt.subplots(2)
fig,ax
## Plot a 1D histogram in the first plots using the raw data instead of the Viterbi data
'idealized'] = False
maven.plots.fret_hist1d.prefs[0])
maven.plots.fret_hist1d.plot(fig,ax[
## Plot a trajectory in the second plot
1].plot(maven.data.corrected[0,:,0],'g')
ax[1].plot(maven.data.corrected[0,:,1],'r')
ax[
plt.show()