pcaPlot | R Documentation |
PCA plots of the samples within MSnset
pcaPlot(
MSnSetObj,
omitIgG = FALSE,
sampleColours = NULL,
transFunc = log2xplus1,
transform = TRUE,
colourBy = "SampleGroup",
title = "",
labelColumn = "BioRep",
labelsize = 4,
pointsize = 4,
x.nudge = 4,
x.PC = 1
)
MSnSetObj |
MSnSet; an object of class MSnSet |
omitIgG |
Logical: whether to remove IgG from the PCA plot |
sampleColours |
character: A named vector of colours for samples |
transFunc |
func: internal helper function for log transformation |
transform |
logical: whether to log transform intensities |
colourBy |
character: column name to use for colouring samples from
|
title |
character: title for the plot |
labelColumn |
character: column name from |
labelsize |
numeric: size of the labels |
pointsize |
numeric: size of plotting points |
x.nudge |
numeric: distance to move labels along the x-axis away from the plotting points |
x.PC |
numeric: The principle component to plot on the x-axis; the following PC will be plotted on the y-axis |
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.
An object created by ggplot
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)
exprs(MSnSet_data) <- exprs(MSnSet_data)+0.01
pcaPlot(MSnSet_data, omitIgG = TRUE, labelColumn = "BioRep")
# custom colours and PC2 v PC3
customCols <- rainbow(length(unique(pData(MSnSet_data)$SampleGroup)))
names(customCols) <- unique(pData(MSnSet_data)$SampleGroup)
pcaPlot(MSnSet_data,
omitIgG = TRUE,
labelColumn = "BioRep",
sampleColours = customCols,
x.PC=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.