Skip to content

How to Use Code Filter

The Code Filter is an advanced query mode available in both the Filter panel and the Search panel across all data tables (Factor Overview, Marker Genes, ROI Stats, Gene list, etc.). It lets you write expressive, multi-condition queries instead of using the standard dropdown filters.


1. Activating Code Filter

Click the terminal icon on the right side of the Filter or Search panel to switch to Code Filter mode. Click it again to return to standard mode.

Info

Switching modes clears the current code expression, but standard filters are preserved.


2. Field Names

Field names are the exact column identifiers used internally.

Ensure correct field names

Please note that the field names often differ from the displayed header.

Recommend always open the syntax guide (click the ? icon inside the code input) to see all available field names for the current table.


3. Writing Expressions

Expressions are evaluated row-by-row. Each column field name (shown in the syntax guide) is a variable that holds the cell's value for that row.

Below are examples for different kind of expressions:

Basic comparisons

Filter rows by one condition:

1
2
3
pValue > 1.3
foldEnrichment >= 2
Chi2 < 10

Matching text — like

like performs SQL-style pattern matching. Use % as a wildcard:

Pattern Matches
gene like 'Gad%' genes starting with "Gad"
gene like '%dh' genes ending with "dh"
gene like '%GAPD%' genes containing "GAPD" anywhere
not gene like 'Mt-%' genes without "Mt-" at the beginning

Matching a list — in

1
gene in ('GAPDH', 'ACTB', 'Gad1')

Multi-word search (Search panel only)

Type space-separated words to match rows containing any of them:

1
Gad1 Gad2 Vip

This returns rows where any of the three terms appear anywhere in the row.

Combining conditions

Use and, or, and not (case-insensitive):

1
2
3
pValue > 1.3 and foldEnrichment > 2
pValue > 1.3 or Chi2 > 50
not gene like '%Rp%'

Usage Tips

  • Expressions are case-sensitive for text comparisons by default. Use like for flexible matching.
  • Numbers do not need quotes: pValue > 1.3 ✓ — pValue > "1.3"
  • String values require single quotes: gene like 'Gad%'
  • A red warning icon appears if your expression has a syntax error. Hover over it for details.
  • Code Filter and standard filters (dropdown) are additive — both apply at the same time.