Triage Templates

Modifying and using triage templates for fast, easy batch curation.

Gwenn Berry avatar
Written by Gwenn Berry
Updated over a week ago

This article describes how to modify and use triage templates to improve your curation workflow.

Overview

Triage Templates are a set of rules-based bucket designations that allow you to automatically categorize your results into buckets upon opening your curation triage.

For example, if you follow a rules-based curation process, you can automatically bucket anything below your filters to be marked in batch as false-positive without having to filter, move, and mark these yourself. This has the effect of both removing manual steps and de-cluttering your results view.

Triage templates are applied on top of and following any user-defined triage buckets, and only automatically categorize results from the All Results table (i.e., if you already have triaged results, those results will remain where you have placed them).

Note: the order of buckets in your template matters. Eligible results will go to the first bucket they match to. Buckets should therefore go in order of specificness, with any "catch-all" type buckets being listed last. For example, if you are stratifying results into buckets based on a quality score, e.g. high-quality >=50, medium >=25, and low, buckets should be listed in that order (listing the medium bucket before the high-quality bucket would cause any high-quality variants to get siphoned off by the medium-quality bucket).

Using Triage Templates

When a triage template is configured for your project, it will automatically be applied to each sample curation you open.

Once loaded, triage template buckets act like any other triage bucket. If you save a triage with a triage template in place, the template buckets will become saved triage buckets. If you do not want to use the triage template for a particular curation, you may un-apply it using the toggle in the top toolbar. Note that if you un-apply the template after having saved a triage using it, you will see the previously saved buckets that were automatically generated.

Saving a Triage with Triage Template

As noted above, if you save a triage with a triage template in place, the template buckets will become saved triage buckets (and can then be treated as any other bucket). By default, after saving a triage based on a triage template, the triage template view will be un-applied so that you are now working only with native buckets. If you subsequently move items out of triage and wish to reapply the template, simply toggle the template view at the top of your page.

Removing Triage Template Buckets from Triage

When using standard buckets in curation triages, you have the option to delete a bucket and move all of its contents to the base triage bucket. You may do the same when using a triage template, but note that when loading the page again, the bucket will be automatically created -- but all of the contents that you already moved into base triage will remain there. Any items that were still in All Results and match the rules of the template bucket will be moved into the template bucket. If there are no matching results, the bucket will remain empty. If you un-apply the triage template to the view, these buckets will not be shown.

Configuring Triage Templates

Triage templates can be defined at the project level or used ad hoc. To use at the project level, follow the instructions in Curation Project User Settings. To use them ad hoc, select Add Triage Template from the quick actions bar.

Defining Triage Template Buckets

Define the rules for your Triage Template using the template editor. The template takes the form of a JSON array of rules-based bucket objects, where each object contains the following:

{
"name":<YOUR_BUCKET>,
"rules": {"and":[<RULES>], "or":[<RULES>],
"inverse": <true|false - OPTIONAL, DEFAULT=FALSE>
}

The name field corresponds to the name of the bucket that will be created to hold the results matching these rules.

The inverse field is an optional boolean field, and if supplied indicates that the bucket should collect results that do not match the rules.

The rules section of each bucket object should include either (or both) "and" or "or" sections. Rules are defined in each as an array of rule objects. Rule objects take the following form:

{
"field": "<YOUR_FIELD>",
"operator": "<OPERATOR>",
"value": <VALUE>
}

...where YOUR_FIELD is one of the columns in your results, value is either a string or number that you want to compare against (e.g. an exact match on a string field, or a threshold on a number), and operator is one of the following:

=

!=

<

<=

>

>=

Note: string similarity/pattern operators are not yet supported for Triage Templates

Example Triage Template

The JSON configuration below is an example of a triage template that filters any result item with a quality score of 50 or higher into a "high quality" bucket, and anything with a quality score of 5 or lower or a filter field matching "FAIL" into a "suspicious" bucket. All other results will remain in the All Results table.

[
{
"name": "high_quality",
"rules": {
"and": [
{
"field": "quality",
"operator": ">=",
"value": 50
}
]
}
},
{
"name": "suspicious",
"rules": {
"or": [
{
"field": "quality",
"operator": "<=",
"value": 5
},
{
"field": "filter",
"operator": "=",
"value": "FAIL"
}
]
}
},
]

Did this answer your question?