Skip to contents

Walks the parsed AST and returns TRUE if any LookupMatrix node would read a matrix stored with axis order different from the order implied by the surrounding @ rows @ cols scopes, or if a ReduceToColumn/ReduceToRow would force a relayout.

Usage

query_requires_relayout(daf, query_string)

Arguments

daf

A DafReader.

query_string

A query string (character scalar) or a DafrQuery object produced by the query builders (e.g. Axis("cell") |> LookupVector("donor")).

Value

Logical scalar.

Examples

d <- example_cells_daf()
query_requires_relayout(d, "@ cell @ gene :: UMIs") # stored order → FALSE
#> [1] FALSE
query_requires_relayout(d, "@ gene @ cell :: UMIs") # swapped → TRUE
#> [1] FALSE