R/calculate_row_col_exclusivity_weights.R
calculate_row_col_exclusivity_weights.Rd
The weight for each mutation in the Row-Column-Exclusivity test cannot be calculated exactly for most use cases because there is no closed formula and a very large number of possible matrices to consider. Thus, the weights are calculated empirically from a sufficiently large number of samples of possible matrices.
calculate_row_col_exclusivity_weights(dat, sample_col, mutgene_col, Q = 100, quiet = TRUE)
dat | tibble with mutation information |
---|---|
sample_col | column of samples names (quoted) |
mutgene_col | column of genes that are mutated (quoted) |
Q | number of permutation matrices to use (default is 100) |
quiet | boolean for showing messages as run permutations (default is
|
library(wext) calculate_row_col_exclusivity_weights(dat = simple_dataset, sample_col = sample_name, mutgene_col = mutated_gene, Q = 5)#> # A tibble: 72 x 3 #> sample_name mutated_gene row_col_ex_weights #> <chr> <chr> <dbl> #> 1 1 a 0.8 #> 2 1 b 1 #> 3 1 c 0.8 #> 4 1 d 1 #> 5 1 e 0.4 #> 6 1 g 0.6 #> 7 1 h 0.4 #> 8 10 a 0.2 #> 9 10 b 0.2 #> 10 10 c 0.2 #> # … with 62 more rows