plotIndividualAbundance: Plot stacked bar charts of the relative abundance of total...

Description Usage Arguments Value Examples

View source: R/stackedBarChartsRPKM.R

Description

Plot stacked bar charts of the relative abundance of total rpkm per individual, sample type and drug class

Usage

1
plotIndividualAbundance(df_map_abundance, cols)

Arguments

df_map_abundance

A dataframe of relative abundances created from getRelativeAbundanceIndividuals

cols

A character vector, named by ARG class

Value

A list of ggplot object where each graph represents a Location

Examples

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)

blue-moon22/resistomeAnalysis documentation built on Jan. 17, 2020, 4:15 a.m.