DiTing icon indicating copy to clipboard operation
DiTing copied to clipboard

heatmap generate error

Open zhanghxzll opened this issue 2 years ago • 2 comments

您好, 我在运行diting的最后生成热图时出现如下错误提示: 2022-05-26 13:56:34 [INFO ] [8/12] Merge KEGG annotations* 2022-05-26 13:56:34 [INFO ] Merge KEGG annotations 2022-05-26 13:58:06 [INFO ] [9/12] Merge KEGG annotations and gene relative abundances 2022-05-26 13:58:06 [INFO ] Merge abundance table with kegg table 2022-05-26 13:59:20 [INFO ] Produce table of ko abundance among samples 2022-05-26 13:59:31 [INFO ] A table of ko abundance among samples was produced to diting_result/KEGG_annotation/ko_abundance_among_samples.tab 2022-05-26 13:59:31 [INFO ] [9/12] Build gene families 2022-05-26 13:59:31 [INFO ] Build gene family according to diting_result/KEGG_annotation/ko_abun.txt 2022-05-26 14:01:23 [INFO ] [10/12] Generate hierarchical table* 2022-05-26 14:01:23 [INFO ] [11/12] Calculate abundance of pathways* 2022-05-26 14:01:27 [INFO ] [12/12] Diagrammatic drawing 2022-05-26 14:01:27 [INFO ] Visualize abundance table /home/zhengpf/.conda/envs/diting-env/bin/scripts/sketch.py:62: MatplotlibDeprecationWarning: normalize=None does not normalize if the sum is less than 1 but this behavior is deprecated since 3.3 until two minor releases later. After the deprecation period the default value will be normalize=True. To prevent normalization pass normalize=False
plt.pie(abundance_nor, colors=colors, startangle=90) Traceback (most recent call last): File "/home/zhengpf/.conda/envs/diting-env/bin/diting.py", line 255, in main() File "/home/zhengpf/.conda/envs/diting-env/bin/diting.py", line 239, in main sketch(ABUNDANCE_TABLE) File "/home/zhengpf/.conda/envs/diting-env/bin/scripts/sketch.py", line 450, in sketch color = colors[i-1] IndexError: list index out of range

运行脚本如下: diting.py -r /backup/diting/fq -a /backup/diting/contig_layer -o diting_result -n 40 -m 200 运行到最后可以产生pathways_relative_abundance.tab文件,但是无法生成图片,请问您可以看出是什么问题吗? 谢谢!

zhanghxzll avatar May 27 '22 07:05 zhanghxzll

您好,

是不是因为样本数太多了啊?超过24个就不可以了,你可以根据需要合并你的样本,然后使用此命令生成图片:diting.py -vis <pathways_relative_abundance.tab>

xuechunxu avatar May 27 '22 08:05 xuechunxu

感谢回复!将样本数合并后确实可以了,但是之前报错是21个,也无法产生heatmap。

zhanghxzll avatar Jun 17 '22 09:06 zhanghxzll