Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5: clusters are not sorted by size by default #37

Closed
rhjohnstone opened this issue Sep 4, 2020 · 0 comments
Closed

T5: clusters are not sorted by size by default #37

rhjohnstone opened this issue Sep 4, 2020 · 0 comments

Comments

@rhjohnstone
Copy link
Contributor

Cell 17:

print ('Ten molecules from second largest cluster:')
# Draw molecules
Draw.MolsToGridImage([mols[i][0] for i in clusters[1][:10]], 
                     legends=[mols[i][1] for i in clusters[1][:10]], 
                     molsPerRow=5)

However, the clusters returned by Butina.ClusterData(distance_matr,len(fps),cutoff,isDistData=True) are not sorted by default, i.e. we cannot guarantee that clusters[1] is indeed the second largest cluster.

In the talktorial, it does happen that (at least) the first two clusters are correctly ordered, but when I was using a different original target, the second cluster only had one element, while others had more. Anyway, this is easily checked by just listing the lens of the clusters. Moreover, the docs do not claim that they are ordered.

dominiquesydow added a commit that referenced this issue Sep 17, 2020
Fixes #37, orders clusters by size + updates plots
@jaimergp jaimergp mentioned this issue Nov 13, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant