Opened 5 months ago

Closed 4 months ago

#2312 closed enhancement (fixed)

Add support for more filtering when when adding a parent/child column to a table

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.19.10
Component: core Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

The functionality for adding a parent or child column to a table currently allow us to select a specific main type and a subtype of the parent/child item.

It could be useful to have more filtering capabilities. For example, in the list of patients we could then list child derived bioassays with subtype AlignedSequences and Pipline=DNA/Normal/WGS. The column would then only show us alignments from normal DNA samples and not from the tumor or RNAseq pipelines.

In theory it would be possible to use a very complex filter, but in practice we need to encode everything into the column definition string. This is currently /DIRECTION/ITEMTYPE/subtype-id/property. We need to add the extra filter information into this string without breaking existing definitions. Since the subtype-id part is always a numeric ID it would relatively easy to add more information to this field. For example: /DIRECTION/ITEMTYPE/subtype-id:filter-def/property where we need make sure that filter-def is encoded in a way that doesn't break other parsing (eg. it can't contain '/').

To begin with I think that using a single annotation for filtering should be powerful enough.

Change History (11)

comment:1 by Nicklas Nordborg, 5 months ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 5 months ago

In 8173:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Implemented a simple filter definition. The syntax that is supported is /DIRECTION/ITEMTYPE/subtype-id&annotationtype-id=value/property

The filter supports filtering on a single annotation type and value and is optional. The filter has been implemented in the RelatedItemColum class which means that the columns will now only show parent or child items that also matched the extra filter. It is not yet implemented in the search functionality for the table or in the GUI for defining the column.

comment:3 by Nicklas Nordborg, 5 months ago

In 8174:

References #2312: Add support for more filtering when when adding a parent/child column to a table

The new filter should now also work when searching in tables.

comment:4 by Nicklas Nordborg, 5 months ago

In 8175:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Synchronization filters in item lists can now format the new type of filter properly. It will display something like: child(AlignedSequences & {Pipeline} = 'DNA/Normal/WGS').name = ....

comment:5 by Nicklas Nordborg, 5 months ago

In 8176:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Added support in the "Add parent or child item column" dialog for selecting an annotation type and value to use as filter for the parent/child items.

comment:6 by Nicklas Nordborg, 5 months ago

In 8183:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Fixes an issue with filtering with '=' (find items with a missing parent/child). This didn't work at all before, but now work in some cases. The "disallow doubling back" feature interferes a lot with this kind of filter so if the filter is on a column with a parent->child relation with no doubling back, it will not return the expected result.

comment:7 by Nicklas Nordborg, 5 months ago

In 8184:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Realized that we can't simply skip a filter when querying for missing values since there is a difference between a missing an item and an existing item that is missing a value. So we need to execute a filter that is "NOT NULL".

comment:8 by Nicklas Nordborg, 5 months ago

In 8185:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Clear the selected checkboxes after columns have been added.

comment:9 by Nicklas Nordborg, 4 months ago

In 8186:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Added support for using an item list as a filter. The filter-def specification is then given as /DIRECTION/ITEMTYPE/subtype-id&list=list-id/property, for example: /CHILD/DERIVEDBIOASSAY/25&list=123/name

comment:10 by Nicklas Nordborg, 4 months ago

In 8187:

References #2312: Add support for more filtering when when adding a parent/child column to a table

Updated the documentation.

comment:11 by Nicklas Nordborg, 4 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.