plotPercentages: Plots a bar chart of the porportions of samples that contain...

Description Usage Arguments Value Examples

View source: R/getProportion.R

Description

Plots a bar chart of the porportions of samples that contain a property for each Location

Usage

1
plotPercentages(df_map_pb, cols)

Arguments

df_map_pb

A dataframe of proportions and 95% confidence intervals of samples that contain a unique property for each Location

colours

A character vector of colours, named by Location

Value

None

Examples

1
2
3
4
5
6
7
8
library(RColorBrewer)
library(ggplot2)
df_map <- readMappingData("/home/vicky/Documents/CHMI/Resistome-paper/resistomeAnalysis/db/MAPPING_DATA/nonsubsampled_merged.csv", without_US_duplicates = TRUE)
cols <- c("grey20", "grey50", "grey80", "white")
names(cols) <- c("China", "Philippines", "UK", "US")
df_map_pb_saliva_class <- joinProportionAndBootstrap(df_map, "Drug.Class", "saliva")

plotPercentages(df_map_pb_saliva_class, cols) + xlab("ARG class") + ylab("% saliva samples containing ARG class")

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