Learn R Programming

TCGAbiolinks (version 1.2.5)

TCGAvisualize_profilePlot: Profile plot

Description

Displaty the association between cancer subtypes and any kind of clustering.

Usage

TCGAvisualize_profilePlot(data = NULL, groupCol = NULL, subtypeCol = NULL, colors = NULL, filename = NULL, na.rm.groups = FALSE, na.rm.subtypes = FALSE, plot.margin = c(-2.5, -2.5, -0.5, 2), axis.title.size = 1.5, axis.textsize = 1.3, legend.size = 1.5, legend.title.size = 1.5, geom.label.size = 6, geom.label.color = "black")

Arguments

data
A data frame with the cluters and subytpe of cancers
groupCol
Names of tre columns with the cluster information
subtypeCol
Name of the column with the subtype information
colors
Vector of colors to be used in the bars
filename
Name of the file to save the plot, can be pdf, png, svg etc..
na.rm.groups
Remove NA groups? Default = FALSE
na.rm.subtypes
Remove NA subtypes? Default = FALSE
plot.margin
Plot margin for cluster distribution. This can control the size of the bar if the output is not aligned
axis.title.size
axis.title.size
axis.textsize
axis.textsize
legend.size
Size of the legend
legend.title.size
Size of the legend title
geom.label.size
Size of percentage in the left barplot
geom.label.color
Color of percentage in the left barplot

Value

A plot

Examples

Run this code
while (!(is.null(dev.list()["RStudioGD"]))){dev.off()}
cluster <- c(rep("cluster1",30),
             rep("cluster2",30),
             rep("cluster3",30))
subtype <- rep(c(rep("subtype1",10),
           rep("subtype2",10),
           rep("subtype3",10)),3)
df <- data.frame(cluster,subtype)
TCGAvisualize_profilePlot(data = df, groupCol = "cluster", subtypeCol = "subtype",
                          plot.margin=c(-4.2,-2.5,-0.0,2))
while (!(is.null(dev.list()["RStudioGD"]))){dev.off()}
cluster <- c(rep("cluster1",10),
             rep("cluster2",20),
             rep("cluster3",30),
             rep("cluster4",40))
subtype <- rep(c(rep("subtype1",5),
           rep("subtype2",10),
           rep("subtype3",10)),4)
df <- data.frame(cluster,subtype)
plot <- TCGAvisualize_profilePlot(data = df, groupCol = "cluster", subtypeCol = "subtype",
                          plot.margin=c(-4.2,-2.5,-0.5,2))

Run the code above in your browser using DataLab