Does evaluating this query require a matrix relayout (transpose)?
Source:R/queries.R
query_requires_relayout.RdWalks 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.
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")).
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