projectScoreLandscape {singscore} | R Documentation |
plotScoreLandscape()
This function takes the output (ggplot object) of the function
plotScoreLandscape()
and a new dataset. It projects the new data
points onto the landscape plot and returns a new ggplot object with
projected data points.
projectScoreLandscape(plotObj = NULL, scoredf1, scoredf2, subSamples = NULL, sampleLabels = NULL, annot = NULL, isInteractive = FALSE)
plotObj |
a dataframe, resulted from |
scoredf1 |
data.frame, result of the simpleScore() function which scores the gene expression matrix against a gene set of interest |
scoredf2 |
data.frame, result of the simpleScore() function which scores
the gene expression matrix against another gene set of interest. Scores in
scoredf1 and scoredf2 consist of the new data points that will be projected
on the |
subSamples |
vector of character or indices for subsetting the scoredfs,
default as NULL and all samples in scoredfs will be plotted. The subsetted
samples are projected onto the landscape plot of |
sampleLabels |
vector of character, sample names to display, ordered in the same way as samples are ordered in the 'scoredfs' data matrix, default as NULL which means the projected points are not labelled. |
annot |
vector of characters, annotations used to colour the data and should have the same number of samples as in scoredfs |
isInteractive |
boolean, whether the plot is interactive default as FALSE |
New data points on the already plotted ggplot object from plotScoreLanscape()
ranked <- rankGenes(toy_expr_se) scoredf1 <- simpleScore(ranked, upSet = toy_gs_up, downSet = toy_gs_dn) scoredf2 <- simpleScore(ranked, upSet = toy_gs_up) psl <- plotScoreLandscape(scoredf1, scoredf2) projectScoreLandscape(psl,scoredf1, scoredf2)