Description Usage Arguments Value Examples
View source: R/stackedBarChartsRPKM.R
Plot stacked bar charts of the relative abundance of total rpkm per individual, sample type and drug class
1 | plotIndividualAbundance(df_map_abundance, cols)
|
df_map_abundance |
A dataframe of relative abundances created from |
cols |
A character vector, named by ARG class |
A list of ggplot object where each graph represents a Location
1 2 3 4 5 6 | library(RColorBrewer)
df_map <- readMappingData("/home/vicky/Documents/CHMI/Resistome-paper/resistomeAnalysis/db/MAPPING_DATA/nonsubsampled_merged.csv", without_US_duplicates = TRUE)
df_map_rel_ind <- getRelativeAbundanceIndividuals(df_map)
cols <- brewer.pal(length(unique(df_map_rel_ind$Drug.Class.Alt)), "Set3")
names(cols) <- unique(df_map_rel_ind$Drug.Class.Alt)
g <- plotIndividualAbundance(df_map_rel_ind[df_map_rel_ind$Location == "HMP1",], cols)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.