featurebox | R Documentation |
featurebox boxplot expression/abundance values of a feature(s) of interest from a matrix
featurebox(abundance_matrix, metadata = NULL, features = NULL, group_by = NULL)
abundance_matrix |
dataframe; samples are columns and features are rows |
metadata |
dataframe; samples are rows and rownames should match those in abundance_matrix |
features |
vector; character vector of features to plot i.e. a feature(s) in rownames of abundance_matrix |
group_by |
character; grouping variable for boxplot. If set then variable must be present in metadata. If NULL each sample is plotted separately. |
grob
abundance_matrix <- data.frame(matrix(rnorm(1000), ncol=20, nrow=50))
colnames(abundance_matrix) <- LETTERS[1:20]
metadata <- data.frame(group = c(rep("group1", 5), rep("group2", 5),
rep("group3", 5), rep("group4", 5)))
rownames(metadata) <- LETTERS[1:20]
featurebox(abundance_matrix, metadata=metadata, features="10", group_by="group")
# multiple features
featurebox(abundance_matrix, metadata=metadata, features=c("10", "20", "30", "40"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.