Suggest: select within cluster by property [message #920] |
Fri, 29 May 2020 04:06 ![Go to next message Go to next message](/forum/theme/myThemeWithHFCSS/images/down.png) |
![](http://openmolecules.org/forum/images/avatars/tux07.jpg) |
DrCJM
Messages: 5 Registered: September 2019 Location: Australia
|
Junior Member |
|
|
Something I'd find really useful, that I can't see how to do at present, is to select compounds after clustering by a particular property. The "representative" compound in a cluster is identified, I assume, as the most "central" compound in the cluster, which is fine. But sometimes I want to select the most active compound in the cluster, or the smallest MW in the cluster etc. etc.
If that's already possible, advice on how would be great!
Otherwise, a method of saying "Select from each cluster by value of property X" is something I'd use a lot.
Cheers,
Craig.
|
|
|
Re: Suggest: select within cluster by property [message #921 is a reply to message #920] |
Sat, 30 May 2020 17:19 ![Go to previous message Go to previous message](/forum/theme/myThemeWithHFCSS/images/up.png) ![Go to next message Go to next message](/forum/theme/myThemeWithHFCSS/images/down.png) |
thomas
Messages: 693 Registered: June 2014
|
Senior Member |
|
|
Assuming you have cluster numbers in a column called 'Cluster No' and molecular weights in a column called 'Molweight', then you could use "Data->Add Calculated Values...", configure the dialog as follows:
![index.php?t=getfile&id=202&private=0](index.php?t=getfile&id=202&private=0)
This creates a new column with a '1' value for all cluster members that have the lowest molecular weight within their own cluster. All other rows have a '0' in that column. Note that the Molweight column should not be set to use logarithmic behaviour. I need to fix an issue there.
Thomas
[Updated on: Sat, 30 May 2020 17:22] Report message to a moderator
|
|
|
Re: Suggest: select within cluster by property [message #932 is a reply to message #921] |
Mon, 01 June 2020 03:35 ![Go to previous message Go to previous message](/forum/theme/myThemeWithHFCSS/images/up.png) ![Go to next message Go to next message](/forum/theme/myThemeWithHFCSS/images/down.png) |
![](http://openmolecules.org/forum/images/avatars/tux07.jpg) |
DrCJM
Messages: 5 Registered: September 2019 Location: Australia
|
Junior Member |
|
|
Hi Thomas,
when I try that I get an error: Function "categoryMin" requires 3 parameters
I'll play around and see if I can figure out how to get it working, but any further advice would be great.
EDIT
OK, got it to work, it needed the category value defined, so format is:
categoryMin(ClusterNo,"Cluster No","Molweight")
which generates a new column with the lowest Molweight for the cluster added to every row (same value for all members of the cluster). With that, and my now finding the appropriate functions in the Help page I think I can do what I need to do.
Cheers,
Craig.
[Updated on: Mon, 01 June 2020 03:56] Report message to a moderator
|
|
|
Re: Suggest: select within cluster by property [message #941 is a reply to message #932] |
Fri, 05 June 2020 16:34 ![Go to previous message Go to previous message](/forum/theme/myThemeWithHFCSS/images/up.png) |
thomas
Messages: 693 Registered: June 2014
|
Senior Member |
|
|
Hi Craig,
sorry this slipped my attention. The category functions were simplified during recent months to only use two parameters. The official version 5.2.1 still uses the 3 parameter form. Under this link you always find about weekly releases of replacement files of the most recent development cycle: openmolecules/datawarrior/dw521win.zip (Windows) and dw521x.zip (Mac/Linux). The have many fixes, new features, but often not up-to-date manual pages. And new features are sometimes in experimental state.
Best wishes, Thomas
|
|
|