python-bioInfo-codes-2

1.

_tkinter.TclError: no display name and no $DISPLAY environment variable

解决方案:

import matplotlib
matplotlib.use('Agg')
严重怀疑python2.7才用Agg。之前在3.5上,用TkAgg才可以正常生成图像呢。


2.

ValueError: Linkage 'Z' uses the same cluster more than once in Python scipy fcluster

原因:数据量太大,scipy.cluster.hierarchy处理不了,会报错。

解决:

使用fastcluster的linkage,而不用scipy.cluster.hierarchy的。

import fastcluster as fc

安装fastcluster用pip install fastcluster

据说会快一点。

原文地址:https://www.cnblogs.com/pxy7896/p/6636148.html