|
|
Re: can you give an example on how to use refvalue()... [message #69 is a reply to message #68] |
Thu, 02 July 2015 09:07 |
chemist69
Messages: 7 Registered: June 2015 Location: Germany
|
Junior Member |
|
|
Dear Thomas,
thanks a lot for coming back to me, DataWarrior is a great project!
refvalue takes four parameters. In the example that you give above, what would be the call to the function?
My concrete case involves a set of compounds which are categorized into scaffold fragments. Every compound belongs only to one fragment and the fragments are uniquely named and hierarchically dependent on each other:
Hierarchy scaf_smiles cpd_smiles cpd_id Activity
12 C1CC=CN1 Cc1cc[nH]c1 1 5
12 C1CC=CN1 O=C(O)c1cc[nH]c1 2 7
012_013 c1ccc2[nH]ccc2c1 O=C(O)c1c[nH]c2ccccc12 3 6
012_013 c1ccc2[nH]ccc2c1 NC(=O)c1c[nH]c2ccccc12 4 8
012_013 c1ccc2[nH]ccc2c1 COc2ccc1[nH]cc(C(N)=O)c1c2 5 9
I would like to display the data in a tree-like way so that the scaffold fragments (column Hierarchy) are displayed as nodes and the individual compounds are leaves in the tree.
Would that be possible?
Many thanks again for your help!
Kind regards,
Axel
If you're not part of the solution - you're part of the precipitate.
|
|
|
Re: can you give an example on how to use refvalue()... [message #70 is a reply to message #69] |
Thu, 02 July 2015 21:56 |
thomas
Messages: 715 Registered: June 2014
|
Senior Member |
|
|
Dear Axel,
the refvalue(ref-ID-column, category-column, value-column, ref-ID) syntax would be:
refvalue("B","A","C","xxxx")
Your second question is more difficult to answer: DataWarrior out-of-the-box doesn't have a simple solution.
But with a little programming it should be possible to even generate such a tree of hierarchical increasing
scaffolds contained in a dataset and to attach all compounds as leaves.
Currently, DataWarrior does support graph data, which includes tree structures. Various functions generate
such data, e.g. the evolutionary library and most prominent the similarity analysis. Last week I used an
unpublished and still experimental extention to layout a graph from a few thousand diseases connected over
their similarites, which were estimated by commonly mentioned genes in the literature.
But DataWarrior does not allow from the user interface to define a column to contain references to other rows.
If you want to construct a dwar file from tabular data in a way that DataWarrior recognized graph
relationsships, then you have to do it manually. First you need a column with unique row identifiers.
Second you need another column that contains references of the respective row to one or more other rows.
This is done by putting uniwue IDs from the first row into the second one, one ID per reference, delimited
by "; ". Third you need to define the second row as 'referencing column' and state whether references are
bi-directional or only one way. This is done by adding column properties to the file; Example:
<columnName="child">
<columnProperty="refColumn ID">
<columnProperty="refType topdown">
I have created a small dwar file from your example that illustrates the options. The file contains
three different tree views: one with static coordinates of all structures and two dynamic one, which
always use the selected molecule as root, both use a kind of forcefield approach for the layout
(circular and standard vertical tree)
Kind regards,
Thomas
|
|
|
Re: can you give an example on how to use refvalue()... [message #71 is a reply to message #70] |
Mon, 06 July 2015 14:22 |
chemist69
Messages: 7 Registered: June 2015 Location: Germany
|
Junior Member |
|
|
Dear Thomas,
thanks a lot for the extensive answer and the work you put into creating the extremely helpful example!!
This is exactly what I was looking for!
Kind regards,
Axel
If you're not part of the solution - you're part of the precipitate.
|
|
|