intensityPlot: Intensity Distribution Plot

View source: R/intensityPlot.R

intensityPlotR Documentation

Intensity Distribution Plot

Description

Intensity distribution plot of all the samples

Usage

intensityPlot(
  MSnSetObj,
  sampleColours = NULL,
  title = "",
  colourBy = "SampleGroup",
  transform = TRUE,
  xlab = "log2(intensity)",
  trFunc = log2xplus1
)

Arguments

MSnSetObj

MSnSet; an object of class MSnSet

sampleColours

character: a vector of colors for samples

title

character: title for the plot

colourBy

character: column name from pData(MSnSetObj) to use for coloring samples

transform

logical: whether to log transform intensities

xlab

character: label for x-axis

trFunc

func: internal helper function for log transformation

Details

The column provided to the colourBy argument will be used to colour the samples. The colours will be determined using the function assignColours, alternatively the user may specify a named vector of colours using the sampleColours argument. The names of the sampleColours vector should match the unique values in the colourBy column.

Value

An object created by ggplot

Examples


data(human_anno)
data(exp3_OHT_ESR1)
MSnSet_data <- convertToMSnset(exp3_OHT_ESR1$intensities_qPLEX1, 
                               metadata=exp3_OHT_ESR1$metadata_qPLEX1, 
                               indExpData=c(7:16), 
                               Sequences=2, 
                               Accessions=6)
intensityPlot(MSnSet_data, title = "qPLEX_RIME_ER")

# custom colours
customCols <- rainbow(length(unique(pData(MSnSet_data)$SampleGroup)))
names(customCols) <- unique(pData(MSnSet_data)$SampleGroup)
intensityPlot(MSnSet_data, 
              title = "qPLEX_RIME_ER", 
              sampleColours = customCols)


crukci-bioinformatics/qPLEXanalyzer documentation built on Sept. 24, 2024, 1:13 a.m.