打开蠕虫分析工具箱
open_worm_analysis_toolbox的Python项目详细描述
见https://github.com/openworm/open-worm-analysis-toolbox
|打开蠕虫分析工具箱
open worm analysis toolbox是schafer实验室的Worm Analysis Toolbox 1.3.4的python端口。
它可用于将{em1}$c.elegans的视频处理为统计数据,以便比较单个蠕虫的行为。
它也是openworm项目使用的一个包,用于确定其模拟蠕虫的行为与真实蠕虫的行为有多相似。它是作为OpenWorm project的子项目启动的。
OWAT is on PyPI,所以要安装,只需键入:
pip install open_worm_analysis_toolbox
贡献者请参见:
用法示例
importopen_worm_analysis_toolboxasmv# Load a "basic" worm from a filebw=mv.BasicWorm.from_schafer_file_factory("example_contour_and_skeleton_info.mat")# Normalize the basic wormnw=mv.NormalizedWorm.from_BasicWorm_factory(bw)# Plot this normalized worm wp=mv.NormalizedWormPlottable(nw,interactive=False)wp.show()# Obtain featureswf=mv.WormFeatures(nw)
稍后,如果我们有控制蠕虫,我们可以对蠕虫运行统计信息:
# Compute histogramsexperiment_histograms=mv.HistogramManager([wf,wf])control_histograms=mv.HistogramManager(control_worms)# Compute statisticsstat=mv.StatisticsManager(experiment_histograms,control_histograms)# Plot statistics for the first extended featurestat[0].plot(ax=None,use_alternate_plot=True)# Give an overall assessment of the worm's similarity to the control setprint("Nonparametric p and q values are %.2f and %.2f, respectively."%(stat.min_p_wilcoxon,stat.min_q_wilcoxon))