GGiecold-zz / Cluster_Ensembles

A package for combining multiple partitions into a consolidated clustering. The combinatorial optimization problem of obtaining such a consensus clustering is reformulated in terms of approximation algorithms for graph or hyper-graph partitioning.
MIT License
69 stars 43 forks source link

Test usage error #13

Closed Qwarctick closed 6 years ago

Qwarctick commented 6 years ago

Hi,

After following the installation instructions, I tried to launch a test with the following command :

>>> import numpy as np
>>> import Cluster_Ensembles as CE
>>> cluster_runs = np.random.randint(0, 50, (50, 15000))
>>> consensus_clustering_labels = CE.cluster_ensembles(cluster_runs, verbose = True, N_clusters_max = 50)

I got the following error :

>>> consensus_clustering_labels = CE.cluster_ensembles(cluster_runs, verbose = True, N_clusters_max = 50)

INFO: Cluster_Ensembles: cluster_ensembles: due to a rather large number of cells in your data-set, using only 'HyperGraph Partitioning Algorithm' (HGPA) and 'Meta-CLustering Algorithm' (MCLA) as ensemble consensus functions.

*****
INFO: Cluster_Ensembles: HGPA: consensus clustering using HGPA.

#
INFO: Cluster_Ensembles: wgraph: writing wgraph_HGPA.
INFO: Cluster_Ensembles: wgraph: 15000 vertices and 2500 non-zero hyper-edges.
#

#
INFO: Cluster_Ensembles: sgraph: calling shmetis for hypergraph partitioning.
/home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Hypergraph_Partitioning/hmetis-1.5-linux/shmetis: 1: /home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Hypergraph_Partitioning/hmetis-1.5-linux/shmetis: Syntax error: "(" unexpected
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Cluster_Ensembles.py", line 300, in cluster_ensembles
    cluster_ensemble.append(consensus_functions[i](hdf5_file_name, cluster_runs, verbose, N_clusters_max))
  File "/home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Cluster_Ensembles.py", line 648, in HGPA
    return hmetis(hdf5_file_name, N_clusters_max)
  File "/home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Cluster_Ensembles.py", line 973, in hmetis
    labels = sgraph(N_clusters_max, file_name)
  File "/home/philippe/miniconda3/envs/concenssus/lib/python2.7/site-packages/Cluster_Ensembles/Cluster_Ensembles.py", line 1201, in sgraph
    with open(out_name, 'r') as file:
IOError: [Errno 2] No such file or directory: 'wgraph_HGPA.part.50'
GGiecold-zz commented 6 years ago

Have you installed METIS?

Qwarctick commented 6 years ago

Yes, installed with apt install. I'm on a Ubuntu 18.04

GGiecold-zz commented 6 years ago

Make sure to chmod 755 each of the executables whose absolute path binding is returned by $ locate shmetis.

Qwarctick commented 6 years ago

All files are in 755

aopisco commented 6 years ago

I installed from here: http://glaros.dtc.umn.edu/gkhome/metis/metis/download

followed the instructions and it worked but I'm using Mac.