The weight for each gene in the Row-Exclusivity test is the number of samples with a mutation in a gene divided by the number of samples.

calculate_row_exclusivity_weights(dat, sample_col, mutgene_col)

Arguments

dat

tibble with mutation information

sample_col

column of samples names (quoted)

mutgene_col

column of genes that are mutated (quoted)

Examples

library(wext) calculate_row_exclusivity_weights(dat = simple_dataset, sample_col = sample_name, mutgene_col = mutated_gene)
#> # A tibble: 112 x 3 #> sample_name mutated_gene row_ex_weights #> <chr> <chr> <dbl> #> 1 1 a 0.429 #> 2 1 b 0.429 #> 3 1 c 0.643 #> 4 1 d 0.643 #> 5 1 e 0.143 #> 6 1 f 0.0714 #> 7 1 g 0.143 #> 8 1 h 0.0714 #> 9 10 a 0.429 #> 10 10 b 0.429 #> # … with 102 more rows