openmolecules.org

 
Home » DataWarrior » Functionality » red slide rule after applying filtering macro on EL -- warning, or error?
red slide rule after applying filtering macro on EL -- warning, or error? [message #2249] Tue, 23 July 2024 14:23 Go to next message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
Dear Thomas,

after the creation of a small EL with 279 entries, I applied a .dwam macro to remove entries containing the motif of the nitrile group. Though the number of structures retained is smaller, I observe DW's report of `visible: 182, total: 274` at the bottom of the frame. The export to .sdf via save -> safe special -> sd file exports 274 records. At the same time, the slide ruler «generation» turned red:

/forum/index.php?t=getfile&id=859&private=0

Is this an indicator of a warning, or of an error?

On other hand, I exported DW's evolutionary library right after its generation as .sdf. In a newly launched session of DW, the import of the filtering macro file and its application neither yields to a discrepancy of the numbers `visible` and `total` (both equate to 274), nor turns any of the slide rulers red.

The observations refer to current DW 06.02.01 for Linux used in Linux Debian 13/trixie.

Regards,

Norwid
Re: red slide rule after applying filtering macro on EL -- warning, or error? [message #2266 is a reply to message #2249] Wed, 31 July 2024 16:23 Go to previous message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Dear Norvid,

this is a little tricky and it also involves a bug that I just fixed:

A range filter is turning red if it refers to a column that has empty entries. This is to make you aware that this filter hides rows even if it allows the full data range, because all empty-data rows are hidden by that filter.

In your case some of the generation values are empty. It took me a while to understand why: For evolutionary libraries the column 'Parent Generation' references the column 'Generation' in a 'topdown' direction. This reference is defined in the column properties section of the file. That information is, for instance, used by 2D-views to place arrows between markers. When DataWarrior deletes rows, which are reference by other rows, then it clears the referencing ID from rows if the referenced rows are deleted. This should happen in the 'Parent Generation' column. Due to a bug after introducing multiple runs, it wrongly removes IDs from the 'Generation' column, which I have fixed now.

There is no problem with your file, except that after deleting the Nitriles some generation numbers are missing and the filter turned red to make you aware of this fact.

You could fix your file 'Evolutionary Library.dwar' before deleting rows by changing <columnName="Generation"> to <columnName="Parent Generation"> that it looks as below:

<columnName="Parent Generation">
<columnProperty="refColumn Generation">
<columnProperty="refType topdown">

The deletion of the Nitriles causes then to remove some entries in the "Parent Generation" column, which is the expected behaviour.

Best wishes,

Thomas
Previous Topic: feature suggest: batch import of multiple dwam macro
Next Topic: Retrieve data from SQL database
Goto Forum:
  


Current Time: Thu Nov 21 13:41:12 CET 2024

Total time taken to generate the page: 0.02911 seconds