View source: R/base_package_functions.R View source: R/Package-Code5-Compiled.R
subsetGenes | R Documentation |
Quick function to subset genes/variables from a data matrix based on an annotation or characteristic. Can also pull out genes/variables by name with the option to order the columns by expression of a given gene.
subsetGenes(data, group, take.out, list, order.by = NULL, exact = F,
subset.by = "annotation")
data |
numeric data matrix with samples/observations in the columns and genes/variables in the rows |
group |
character string pointing to a column name in the annotations.genes stored in params. Can also supply a custom vector the same length as the rows of the input matrix. |
take.out |
level or levels of the group vector supplied indicating the genes to be extracted |
list |
character vector of genes/variables to be pulled out of the data matrix for viewing |
order.by |
optional string equal to one of the rownames of the supplied data frame. Columns of output data matrix will be ordered according to the supplied gene from lowest to highest expression value. |
exact |
whether or not to search for exact or inexact matches of 'list' in 'data'. If exact = T (default) output will contain genes/variables that exactly match the list supplied. If set to FALSE, will search for inexact matches. |
subset.by |
whether to subset by an annotation stored in params$annotations.genes ("annotation", default) or by the a list of names to search for in row names ("name") |
data matrix with the same number of columns as the input data matrix but subset for the specified gene/variable list
~~Alison Moss~~
ion.subset <- subsetGenes(RAGP_norm, list = c("Kcn","Cacn","Hcn","Scn"),
exact = FALSE, subset.by = "name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.