View source: R/subset-by-panel.R
| subset_by_panel | R Documentation | 
Subset a Binary Matrix By Genes Available on Specified Panel
subset_by_panel(gene_binary, panel_id = NULL, other_vars = NULL)
| gene_binary | A data frame with a row for each sample and column for each
alteration. Data frame must have a  | 
| panel_id | A character string or vector of the specified panel to subset the genes (see  | 
| other_vars | One or more column names (quoted or unquoted) in data to be retained in resulting data frame. Default is NULL. | 
a data frame with a sample_id column and columns for
alterations on genes that were sequenced on the specified panel.
Jessica Lavery
samples <- unique(gnomeR::mutations$sampleId)
gene_binary <- create_gene_binary(
  samples = samples, mutation = mutations, cna = cna,
  mut_type = "somatic_only",
  include_silent = FALSE,
  specify_panel = "impact"
)
subset_by_panel(gene_binary = gene_binary, panel_id = "IMPACT468")
p_genes <- tidyr::unnest(gnomeR::gene_panels, cols = c("genes_in_panel"))
p_genes <- p_genes[p_genes$gene_panel == 'IMPACT300', ]
setdiff(p_genes$genes_in_panel, names(gene_binary))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.