For the complete documentation index, see llms.txt. This page is also available as Markdown.

How filtering works in the Advanced filter operators mode

Learn how Advanced filter operators mode combines filters, condition groups, and logical operators to determine which variants appear in the results.

To create a query using these concepts, see Build an advanced filtering query.

Include and exclude rules

In Advanced filter operators mode, most filters support two rules: Include and Exclude. Some filters support Include only.

  • Include: The filter defines conditions that variants must match to be included in the results. This is the default behavior.

  • Exclude: The filter defines conditions that exclude variants from the results. Variants that match the exclude condition are removed.

Condition groups and nesting

A condition group is a set of filters, nested groups, or both combined under a shared logical operator (AND or OR).

Nesting means placing one condition group inside another condition group. A nested group is the inner group placed inside an outer group. You can nest condition groups up to three levels inside the top-level group.

Condition groups let you express structured logic such as A AND (B OR (C AND D)).

Logical operators

Logical operators define how multiple filters, nested groups, or both are combined within a condition group.

  • AND: A variant must match all conditions in the group to be included in the results.

  • OR: A variant must match at least one condition in the group to be included in the results.

Logical operators apply at the group level. Each condition group has one operator that applies to all items at that level.

How a query is evaluated

Advanced filter operators mode evaluates a query in stages.

Evaluation starts with individual filters, then moves from the innermost nested groups through each outer group, and ends with the top-level group.

At each stage, the query produces a set of variants that the next stage uses.

1

Filter evaluation

Each filter is evaluated against the variant list according to how it is applied:

  • A filter applied with Include returns variants that match the filter condition.

  • A filter applied with Exclude removes variants that match the filter condition from the group's result.

2

Condition group evaluation

A condition group combines the variant sets produced by its filters and any nested groups using the group operator:

  • AND returns variants that match all conditions in the group.

  • OR returns variants that match at least one condition in the group.

Filters applied with Exclude remove matching variants from the current group’s result.

When a condition group contains another condition group, the inner group is evaluated first. Its result is a set of variants. The outer group then combines that set with the results from its own filters and any other nested groups using the outer group’s operator.

3

Top-level group evaluation

Evaluation continues outward until the top-level group is evaluated.

Result: The top-level group returns the final set of variants shown in the variant table.

Query example

Example query with a top-level AND group (dark gray), a first-level nested OR group (medium gray), and a second-level AND group (light gray).

Query structure

Query: A AND B AND (C OR (D AND E))

A variant appears in the results only if it matches A, B, and either C or both D and E.

Filtering conditions:

  • A: Quality is High or Moderate

  • B: Variant Type is SNV or Indel

  • C: Curate is Pathogenic or Likely Pathogenic

  • D: gnomAD Combined AF is ≤ 0.01

  • E: Main Severity is High or Moderate

Query evaluation

1

Second-level nested AND group

D AND E

The query selects variants where gnomAD Combined AF is ≤ 0.01 (D) and Main Severity is High or Moderate (E).

2

First-level nested OR group

C OR (D AND E)

The query selects variants where Curate is Pathogenic or Likely Pathogenic (C).

The query combines those variants with the variants selected by the second-level nested AND group.

3

Top-level AND group

A AND B AND (C OR (D AND E))

The query selects variants where Quality is High or Moderate (A) and Variant Type is SNV or Indel (B).

The final results include only variants that also match the first-level nested OR group.

Last updated

Was this helpful?