R/make_empty_results_tracker.R
results_tracker.Rd
A tibble that contains the gene sets to consider mutual exclusivity or co-mutation between. This uses a bit of logic to reduce the number of gene sets to consider by accounting the for test at hand (exclusivity or co-mutation), the minimum mutations in a gene to consider it in any gene sets, and a seed gene is the user is interested in interactions with only one or a few genes.
make_empty_results_tracker(bgr, k, which_test, seed_genes, min_times_mut) exclusivity_results_tracker(bgr, k, seed_genes, min_times_mut) comutation_results_tracker(bgr, k, seed_genes, min_times_mut) make_combs_tibble(genes, k, seed_genes)
bgr | a bipartite edge graph that has the node attributes |
---|---|
k | size of gene sets to consider (default is 2) |
which_test | test for mutual exclusivity ( |
seed_genes | a vector of gene(s) that must be in the gene set to be tested (optional) |
min_times_mut | minimum number of times a gene must be mutated in all samples to be considered for the gene sets (default is 5) |
genes | a vector of gene(s) to make combinations of size |
A tibble with two columns: gene_sets
contains list objects of
k
genes, t_BM_gr
is a column of zeros that will eventually
hold the number of events (either mutual exclusivity or co-mutation) that
occur between the genes in the gene sets in the permuted bipartite graphs
exclusivity_results_tracker
: Create the tracker when testing for mutual
exclusivity.
comutation_results_tracker
: Create the tracker when testing for co-mutation.
make_combs_tibble
: Create the final tibble object with the gene sets
of size k
.
library(wext) bgr <- make_sample_gene_bipartite( simple_dataset$sample_name, simple_dataset$mutated_gene ) make_empty_results_tracker(bgr, 2, "exclusivity", c(), 2)#> # A tibble: 15 x 2 #> gene_sets t_BM_ge #> <list> <dbl> #> 1 <chr [2]> 0 #> 2 <chr [2]> 0 #> 3 <chr [2]> 0 #> 4 <chr [2]> 0 #> 5 <chr [2]> 0 #> 6 <chr [2]> 0 #> 7 <chr [2]> 0 #> 8 <chr [2]> 0 #> 9 <chr [2]> 0 #> 10 <chr [2]> 0 #> 11 <chr [2]> 0 #> 12 <chr [2]> 0 #> 13 <chr [2]> 0 #> 14 <chr [2]> 0 #> 15 <chr [2]> 0