Hello,
I’m trying to analyze my merged abundance table with hclust2.py and get the following errors. Could you please advise on what I might be doing wrong?
Thanks.
Traceback (most recent call last):
File “/Share/home/lk/miniconda3/envs/hclust2/bin/hclust2.py”, line 825, in
hclust2_main()
File “/Share/home/lk/miniconda3/envs/hclust2/bin/hclust2.py”, line 803, in hclust2_main
cl.shcluster()
File “/Share/home/lk/miniconda3/envs/hclust2/bin/hclust2.py”, line 380, in shcluster
self.shclusters = sph.linkage(self.s_dm, method=self.args.slinkage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Share/home/lk/miniconda3/envs/hclust2/lib/python3.11/site-packages/scipy/cluster/hierarchy.py”, line 1068, in linkage
n = int(distance.num_obs_y(y))
^^^^^^^^^^^^^^^^^^^^^
File “/Share/home/lk/miniconda3/envs/hclust2/lib/python3.11/site-packages/scipy/spatial/distance.py”, line 2564, in num_obs_y
raise ValueError("The number of observations cannot be determined on "
ValueError: The number of observations cannot be determined on an empty distance matrix.
The code is as follows:
hclust2.py -i merged_abundance_table_species.txt -o heatmap.log_scale.png \
–ftop 20 \
–f_dist_f braycurtis \
–s_dist_f braycurtis
–cell_aspect_ratio 1.5
–log_scale
–flabel_size 4
–legend_file $output/${x}_heatmap.log_scale.legend.png
–max_flabel_len 100
–max_slabel_len 100
–metadata_height 0.075
–minv 0.1
–no_slabels
–dpi 300
The first few lines of the input file looks like: