plot.biodata {tcgaViz} | R Documentation |
Distribution plot
Description
Distribution plot of cell subtypes according to the expression level (high or low) of a selected gene.
Usage
## S3 method for class 'biodata'
plot(
x,
type = "violin",
dots = FALSE,
title = NULL,
xlab = NULL,
ylab = NULL,
stats = NULL,
draw = TRUE,
axis.text.x = element_text(size = 10),
axis.text.y = element_text(size = 8),
cex.lab = 12,
cex.main = 16,
col = (scales::hue_pal())(length(unique(x$cell_type))),
axis.title.x = element_text(size = cex.lab, face = "bold.italic", vjust = -0.5),
axis.title.y = element_text(size = cex.lab, face = "bold.italic", vjust = -0.5),
plot.title = element_text(size = cex.main, face = "bold", vjust = 1, hjust = 0.5),
plot.margin = unit(c(0, 0, 0, -0.5), "cm"),
...
)
Arguments
x |
object from |
type |
character for the type of plot to be chosen among "violin" or "boxplot". |
dots |
boolean to add all points to the graph. |
title |
character for the title of the plot. |
xlab |
character for the name of the X axis label. |
ylab |
character for the name of the Y axis label. |
stats |
object from |
draw |
bolean to plot the graph. |
axis.text.x |
tick labels along axes ( |
axis.text.y |
tick labels along axes ( |
cex.lab |
numerical value giving the amount by which x and y plotting labels should be magnified relative to the default. |
cex.main |
numerical value giving the amount by which main plotting title should be magnified relative to the default. |
col |
character for the specification for the default plotting color.
See section 'Color Specification' in |
axis.title.x |
labels of axes ( |
axis.title.y |
labels of axes ( |
plot.title |
plot title (text appearance) ( |
plot.margin |
margin around entire plot ( |
... |
arguments to pass to |
Value
No return value, called for side effects
Examples
library("ggplot2")
data(tcga)
(df <- convert2biodata(
algorithm = "Cibersort_ABS",
disease = "breast invasive carcinoma",
tissue = "Primary Tumor",
gene_x = "ICOS"
))
plot(df)
stats <- calculate_pvalue(df)
plot(
df,
stats = stats,
type = "boxplot",
dots = TRUE,
xlab = "Expression level of the 'ICOS' gene by cell type",
ylab = "Percent of relative abundance\n(from the Cibersort_ABS algorithm)",
title = "Differential analysis of tumor tissue immune cell type abundance
based on RNASeq gene-level expression from The Cancer Genome Atlas
(TCGA) database",
axis.text.y = element_text(size = 8, hjust = 0.5),
plot.title = element_text(face = "bold", hjust = 0.5)
)