R/filter_by_mutation_frequency.R
filter_by_mutation_frequency.Rd
Returns a vector of genes that passes the minimum number of mutations.
filter_by_mutation_frequency(bgr, min_times_mut, sample_is = TRUE)
bgr | a bipartite edge graph that has the node attributes |
---|---|
min_times_mut | minimum number of mutations per gene |
sample_is | either |
a vector of (unique) gene names
library(wext) suppressPackageStartupMessages(library(tidygraph)) bgr <- make_sample_gene_bipartite( simple_dataset$sample_name, simple_dataset$mutated_gene ) filter_by_mutation_frequency(bgr, 2)#> [1] "a" "c" "d" "e" "b" "g"filter_by_mutation_frequency(bgr, 3)#> [1] "a" "c" "d" "b"filter_by_mutation_frequency(bgr, 4, sample_is = FALSE)#> [1] "1" "2"