Create a biocmask for an object
Usage
new_biocmask_manager(obj, ...)
# S3 method for class 'SummarizedExperiment'
new_biocmask_manager(obj, ...)
Examples
manager <- new_biocmask_manager(se_simple)
manager$ctx
#> [1] "assays"
q <- biocmask_quos(counts_1 = counts + 1,
cols(is_drug = condition=="drug"),
.ctx_default = "assays",
.ctx_opt = c("rows", "cols"))
manager$eval(q[[1]])
manager$results()
#> $assays
#> $assays$counts_1
#> [,1] [,2] [,3] [,4]
#> [1,] 15 9 8 10
#> [2,] 20 3 2 5
#> [3,] 17 7 16 21
#> [4,] 12 18 11 4
#> [5,] 19 14 13 6
#>
#>
#> $rows
#> named list()
#>
#> $cols
#> named list()
#>
#evaluating second quo without switching contexts will error
manager$eval(q[[2]]) |> try()
#> Error : object 'condition' not found
manager$ctx <- "cols"
manager$ctx
#> [1] "cols"
manager$eval(q[[2]])
manager$results()
#> $assays
#> $assays$counts_1
#> [,1] [,2] [,3] [,4]
#> [1,] 15 9 8 10
#> [2,] 20 3 2 5
#> [3,] 17 7 16 21
#> [4,] 12 18 11 4
#> [5,] 19 14 13 6
#>
#>
#> $rows
#> named list()
#>
#> $cols
#> $cols$is_drug
#> [1] FALSE FALSE TRUE TRUE
#>
#>