calculate_events: Calculate the number of mutually exclusive or co-mutation...

Description Usage Arguments Examples

Description

Calculate the number of mutually exclusive or co-mutation events in a bipartite graph

Usage

1
2
3
calc_mutex_events(gs, bgr, sample_is = TRUE)

calc_comut_events(gs, bgr, sample_is = TRUE)

Arguments

gs

the "gene set" is a vector of genes to consider

bgr

a bipartite graph (as a tidygraph graph object); it must have a boolean node attribute "type" that describes which group each node is in

sample_is

either TRUE or FALSE dictating which boolean value corresponds to the samples in the "type" attribute of bgr

Examples

1
2
3
4
5
6
7
8
9
set.seed(0)
suppressPackageStartupMessages(library(tidygraph))
bgr <- make_sample_gene_bipartite(
    simple_dataset$sample_name,
    simple_dataset$mutated_gene
)
plot(bgr)
calc_mutex_events(gs = c("a", "b"), bgr)
calc_comut_events(gs = c("c", "d"), bgr)

jhrcook/wext documentation built on May 17, 2021, 1:19 a.m.