Skip to contents

Returns the breadcrumb trail of filters applied to an AlphaVarSet.

Usage

av_get_filter_history(obj)

Arguments

obj

An AlphaVarSet object.

Value

A tibble with columns: step, description, n_before, n_after, timestamp. Returns an empty tibble (0 rows) if no filters have been applied.

Examples

example_file <- system.file("extdata", "bcl11a_rs1427407_example.csv",
                            package = "AlphaVaR")
obj <- av_import_csv(example_file)
#> Reading bcl11a_rs1427407_example.csv ...

filtered <- obj |>
  av_subset(output_type == "ATAC", .description = "ATAC tracks") |>
  av_get_top(n = 50)

av_get_filter_history(filtered)
#> # A tibble: 2 × 5
#>    step description                      n_before n_after timestamp          
#>   <dbl> <chr>                               <int>   <int> <dttm>             
#> 1     1 ATAC tracks                          2676     320 2026-08-14 20:02:13
#> 2     2 Top 50 entries by quantile_score      320      50 2026-08-14 20:02:13

av_get_filter_history(obj)
#> # A tibble: 0 × 5
#> # ℹ 5 variables: step <int>, description <chr>, n_before <int>, n_after <int>,
#> #   timestamp <dttm>