Opened 6 weeks ago

Closed 12 days ago

#2329 closed enhancement (fixed)

Implement a more fine-grained link between item subtypes and annotation type categories

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

Description (last modified by Nicklas Nordborg)

There is currently a very soft link that matches the name of the ItemSubtype with the name of the AnnotationTypeCategory. This is used for filtering out a subset of annotation types that should be relevent for the given subtype. However, this filtering is no longer enough.

For example, we have the subtype AlignedSequences and matching category. The problem now is that we use the AlignedSequences subtype for RNAseq, WGS and miRNA. The have some common annotations and some that are only relevant for one. For example, the FRACTION_MIRNA is only relevant when we have sequenced miRNA, but it is still included in lists and form for all AlignedSequences.

So we need to divided the AlignedSequences category into different sub-categories. In this case, the ItemSubtype and Pipeline annotation could be combined to make this happen, but we need a generic solution. The outline so far is:

  • No items should need to be updated. We should not introduce new ItemSubtypes, but may have to add more settings to existing subtypes.
  • All annotations in a AnnotationTypeCategory should be relevant for a given item. This means that existing categories should be split into several categories.
  • We need to come up with a smarter way to match categories from existing items. We can't just use the names of the subtype and category.

The final solution was to create a real link from AnnotationTypeCategory to an ItemSubtype. We no longer have to rely on matching by name. Then, to discriminate between multiple categories that are linking to the same subtype we can use an annotation. The subtype can specify a single enumerated annotation type to use as discriminator. Categories that are linked to the subtype can then select one or more values from the enumeration that belong to the category.

Change History (16)

comment:1 by Nicklas Nordborg, 6 weeks ago

In 8247:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Added ItemSubtype as a property to AnnotationTypeCategory. This allows us to create multiple categories with different names that are linked to a single subtype. An item will still match all categories and the combined set of all annotation types.

comment:2 by Nicklas Nordborg, 6 weeks ago

In 8248:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Added SubCategoriesAnnotationType to ItemSubtype. The idea is that for each subtype we can specify an annotation (enumeration) that can be used to divide items into sub-categories. The next step is to define values on the AnnotationTypeCategory that should match values from the selected annotation type. For example, if we select Pipeline as the sub-category annotation type for AlignedSequences we can define annotation type categories for RNAseq, WGS and miRNA with values that matches the pipeline values.

comment:3 by Nicklas Nordborg, 6 weeks ago

In 8249:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Updated the isUsed() and getUsingItems() on AnnotationType and ItemSubtype.

comment:4 by Nicklas Nordborg, 6 weeks ago

In 8250:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Added possibility to select the values that should be associated with a given annotation type category. The values to choose from are taken from the annotation type that is linked via the selected item subtype.

comment:5 by Nicklas Nordborg, 5 weeks ago

In 8251:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

The "Annotations & parameters" tab and the "Edit annotations" dialog now try to find a matching annotation type category based on both the item subtype and the annotation type used for sub-categories.

comment:6 by Nicklas Nordborg, 5 weeks ago

In 8252:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Implemented better error handling in case the logged in user doesn't have permission to the annotation type.

comment:7 by Nicklas Nordborg, 5 weeks ago

In 8253:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Added possibility to set an AnnotationTypeCategory (=sub-category) for a context. If the category is linked to a subtype that has a specified annotation type for sub-categories a filter can be added to the context.

comment:8 by Nicklas Nordborg, 5 weeks ago

In 8254:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

It should now be possible to select sub-context from subtype selection list

comment:9 by Nicklas Nordborg, 4 weeks ago

In 8257:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Implemented functionality for specifying how a sub-category filter should be applied to a context via request parameters. There are four alternatives:

  • force: A filter is always applied
  • tmp: A temporary filter is always applied
  • auto: A filter is applied only if there is no existing filter
  • no: A filter is never applied


The "auto" option is the default.

comment:10 by Nicklas Nordborg, 4 weeks ago

In 8258:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

If there is only a single category with the same name as the subtype we do not add it as a sub-category since it will only look strange in the dropdown menu.

comment:11 by Nicklas Nordborg, 4 weeks ago

In 8260:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Sub-categories are now displayed in a pop-out sub-menu instead of in the main menu.

comment:12 by Nicklas Nordborg, 4 weeks ago

In 8261:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Added a "short name" to annotation type categories. It is optional, but if it exists, it will be used in the selection menu instead of the full name.

comment:13 by Nicklas Nordborg, 4 weeks ago

In 8268:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

The "Add parent or child item column" dialog should now pick up annotations from all categories that are linked to the selected subtype.

comment:14 by Nicklas Nordborg, 3 weeks ago

In 8283:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

Annotation categories that are linked to a subtype for a different item type should be excluded from the list in the "Annotate" dialog.

comment:15 by Nicklas Nordborg, 3 weeks ago

In 8286:

References #2329: Implement a more fine-grained link between item subtypes and annotation type categories

When creating a new item and a category is active in the current context this category should be selected in the annotations dialog.

comment:16 by Nicklas Nordborg, 12 days ago

Description: modified (diff)
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.