#' plots count data
#'
#' plot count data for Lewy Body project
#'
#' @param m MSnSet object
#' @param featureName name of the feature to be displayed
#'
#' @importFrom reshape2 melt
#' @importFrom ggplot2 ggplot aes facet_wrap geom_point ggtitle
#' @export plot.lewy.count.feature
plot.lewy.count.feature <- function(m, featureName){
m <- m[featureName,]
mlong <- melt(exprs(m), varnames=c("Feature.ID", "sample.id"),
value.name='value')
mlong$Feature.ID <- as.character(mlong$Feature.ID)
mlong$sample.id <- as.character(mlong$sample.id)
mlong <- merge(mlong, pData(m), by.x="sample.id", by.y="sample.id")
p <- ggplot(mlong, aes(x=match.group, y=value, color=subject.type)) +
geom_point(size=3) +
facet_wrap( ~ subject.type) +
ggtitle(featureName)
return(p)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.