eval_panel.Rd
Evaluate and annotate a given set of regions (panel)
eval_panel(reg_to_patient_mut)
A data.frame like object from panel_to_patient()
with all regions reg_id
linked to patients patient_id
via mutations mut_id
.
It should additionally contain the following columns:
reg_chr
reg_start
one-based
reg_end
one-based
A data frame with a single row and annotation columns to the panel
r2p <- panel_to_patient(gr_toy, mut_toy)
r2p
#> # A tibble: 6 × 10
#> reg_id reg_chr reg_start reg_end mut_id patient_id chr start end gene
#> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <dbl> <dbl> <chr>
#> 1 r1 1 1 2 m01 p1 1 1000 1000 g1
#> 2 r1 1 1 2 m01 p2 1 1000 1000 g1
#> 3 r1 1 1 2 m01 p1 1 1000 1000 g1
#> 4 r1 1 1 2 m01 p2 1 1000 1000 g1
#> 5 r3 2 1 1 m03 p1 2 3000 3000 g2
#> 6 NA NA NA NA NA p3 NA NA NA NA
eval_panel(r2p)
#> # A tibble: 1 × 9
#> n_reg size_total total_patients n_patient percent_patient n_mut
#> <int> <dbl> <int> <int> <dbl> <int>
#> 1 2 3 3 2 66.7 2
#> # ℹ 3 more variables: mut_per_patient_median <int>, mut_per_patient_mean <dbl>,
#> # mut_per_patient_df <list>