BaselAbujamous / clust

Automatic and optimised consensus clustering of one or more heterogeneous datasets
Other
161 stars 36 forks source link

ImportError: No module named sklearn.metrics.pairwise #11

Closed 1136890515 closed 5 years ago

1136890515 commented 5 years ago

Dear author, I had download the tool but when I run "python clust.py",and it tells me "ImportError: No module named sklearn.metrics.pairwise".Actually,I have intstall sklearn,metrics,pairwise by "pip innstall".And I didn't find a pythonpackage named sklearn.metrics.pairwise. So,how can I to install clust? Thanks!

BaselAbujamous commented 5 years ago

Hi

Thanks for using Clust. The sklearn.metrics.pairwise package is part of the sklearn package. So when you install, you rather "pip install sklearn".

But, easier than that, how about "pip install clust" instead of downloading clust? Then when it is installed, run it as "clust ..."!

This will be easier for you :)

Please let me know if this works for you.

All the best Basel

1136890515 commented 5 years ago

Hi

Thanks for using Clust. The sklearn.metrics.pairwise package is part of the sklearn package. So when you install, you rather "pip install sklearn".

But, easier than that, how about "pip install clust" instead of downloading clust? Then when it is installed, run it as "clust ..."!

This will be easier for you :)

Please let me know if this works for you.

All the best Basel Thanks for your reply. You are so kind ! I have install clust by "pip install clust" successfully.But when I run "clust 1_RawData/Data -o out" with the exampledata,it tells me "ValueError: Input contains NaN, infinity or a value too large for
dtype('float64')".So ,do I use wrong way to run clust?

BaselAbujamous commented 5 years ago

Great to hear that clust has been installed successfully.

The 1_RawData/Data example dataset contains 3 datasets from 2 different species which have different sets of gene names. Clust is great because it can process these datasets collectively. However, you should tell clust which genes from the first species are orthologues of which which genes in the second species. This information is provided in the 1_RawData/MapIDs.txt file. So to run clust on this data, you should at least run:

clust 1_RawData/Data -m 1_RawData/MapIDs.txt

You can give more options if you like as well (e.g. replicate structure or normalisation techniques). Please see the full description of this example dataset here:

https://github.com/BaselAbujamous/clust#raw-expression-data-from-multiple-species


However, if you want to run clust on one dataset only, you don't need to worry about this -m option. Just put your single dataset file in the Data folder, for example, and run clust as "clust Data/"

1136890515 commented 5 years ago

Great to hear that clust has been installed successfully.

The 1_RawData/Data example dataset contains 3 datasets from 2 different species which have different sets of gene names. Clust is great because it can process these datasets collectively. However, you should tell clust which genes from the first species are orthologues of which which genes in the second species. This information is provided in the 1_RawData/MapIDs.txt file. So to run clust on this data, you should at least run:

clust 1_RawData/Data -m 1_RawData/MapIDs.txt

You can give more options if you like as well (e.g. replicate structure or normalisation techniques). Please see the full description of this example dataset here:

https://github.com/BaselAbujamous/clust#raw-expression-data-from-multiple-species

However, if you want to run clust on one dataset only, you don't need to worry about this -m option. Just put your single dataset file in the Data folder, for example, and run clust as "clust Data/"

Wow!Thanks for your help! I have run clust with my own data successfully.And my genes had been clusted into 15 clusters. But I have a new question, I want to get a weighted networks,how can I know the weight of genes ?For example,100 genes are C0,I want to know the the weight of those genes .Can clust get weight value?

BaselAbujamous commented 5 years ago

Very happy to hear you have run it successfully! :)

I hope the clusters that you obtained are of the quality that you expect!

Clust does not generate weighted networks. The idea of clust is to produce nice and tight clusters so every gene in clusters has a weight of 1 while many genes are not assigned to any cluster and therefore have zero weights all over the place.

If you need any help or ideas in any further analysis of your clusters or your data please let me know.