plotDispersion.Rd
This function takes the output from the simpleScore() function
and generates scatter plots of score vs. dispersion for the total
score, the up score and the down score of samples. If you wish to use the
plotting function but with some customized inputs (instead of outputs from
simpleScore
function), you need to make sure the formats are the same.
To be specific, you need to have columns names "TotalScore"
"TotalDispersion" "UpScore" "UpDispersion" "DownScore" "DownDispersion"
and rows names as samples.
plotDispersion(scoredf, annot = NULL, annot_name = "", alpha = 1, size = 1, textSize = 1.2, isInteractive = FALSE)
scoredf | data.frame, generated using the |
---|---|
annot | any numeric, character or factor annotation provided by the user that needs to be plot. Alternatively, this can be a character specifying the column of scoredf holding the annotation. Annotations must be ordered in the same way as the scores |
annot_name | character, legend title for the annotation |
alpha | numeric, set the transparency of points |
size | numeric, set the size of each point |
textSize | numeric, relative text sizes for title, labels, and axis values |
isInteractive | Boolean, determine whether the plot is interactive |
A ggplot object
ranked <- rankGenes(toy_expr_se) scoredf <- simpleScore(ranked, upSet = toy_gs_up, downSet = toy_gs_dn) plotDispersion(scoredf)plotDispersion(scoredf, isInteractive = TRUE)