Make a waffle plot from a data frame containing columns for fraction and subcellular localization.
waffle_iron( df, savePDF = FALSE, outputDir = getwd(), outputPrefix = format(Sys.time(), "%Y%m%d_%H%M%S"), fraction_colname = "fraction", waffleType = "Protein" )
df | A data frame containing columns for fraction and subcellular localization counts. |
---|---|
savePDF | Boolean value, controls whether to save PDF output to outputDir. Defaults to FALSE. |
outputDir | Directory to save PDF output. Defaults to R working directory. |
outputPrefix | String to use to prepend heatmap output filenames. Defaults to date and time. |
fraction_colname | Name of data frame column containing fractions. Defaults to 'fraction'. |
waffleType | Type of Waffle plot to make. This only affects the axis titles and filename. Typical values are "Protein" or "Proteoform". Defaults to "Protein". |
A waffle plot (ggplot object)
df <- data.frame( "fraction" = c(1,2,3,4,5,6), "Cytosol" = c(20,25,30,30,20,10), "Membrane" = c(15,10,20,25,10,5) ) waffle_iron( df )