Uses a data frame containing mass and fraction columns to generate a heatmap showing the distribution of masses per fraction with a vertical orientation. DEPRECATED because make_heatmap() now supports vertical orientations.

make_heatmap_vertical(
  df,
  heatmapType = "Protein",
  binSize = 1000,
  savePDF = FALSE,
  outputDir = getwd(),
  pdfPrefix = format(Sys.time(), "%Y%m%d_%H%M%S"),
  massColname = "ObservedPrecursorMass",
  fractionColname = "fraction",
  Yrange = NULL,
  countRange = NULL
)

Arguments

df

A data frame containing columns for mass (in Daltons) and fraction.

heatmapType

Type of heatmap to create, typically "Protein" or "Proteoform".This only affects the legend title and output file name and can be any string.

binSize

Size of the mass bin in Daltons. Masses in the data frame should be in Daltons.

savePDF

Boolean value (TRUE or FALSE). Should a PDF be saved to the output directory?

outputDir

Directory to place output files in.

pdfPrefix

String to use to prepend heatmap names. Defaults to date and time.

massColname

Name of column containing masses. Defaults to "ObservedPrecursorMass".

fractionColname

Name of column containing fractions. Defaults to "fraction".

Yrange

Numeric vector of length 2 specifying range of heatmap in kDa. Defaults to NULL, and range is determined by rounding highest mass bin up to the nearest interval of 5.

countRange

Numeric vector of length 2 specifying range of counts to use for generating heatmap fill color range. Defaults to NULL, which determines color range automatically using ggplot2::scale_fill_viridis_c(option = "C", direction = -1)

Value

Examples

library(magrittr) tibble::tibble( "fraction" = c(1,1,1,1,2,2,3,3,3,3), "ObservedPrecursorMass" = c(1500,3000,4200,4250,3500,4500,10500,12050,12075,14050) ) %>% make_heatmap( heatmapType = "Proteoform", savePDF = F, binSize = 500 )
#> Error in make_heatmap(., heatmapType = "Proteoform", savePDF = F, binSize = 500): unused argument (heatmapType = "Proteoform")