coBarplot | R Documentation |
Draw two barplots side by side for cohort comparision.
coBarplot(
m1,
m2,
genes = NULL,
orderBy = NULL,
m1Name = NULL,
m2Name = NULL,
colors = NULL,
normalize = TRUE,
yLims = NULL,
borderCol = "gray",
titleSize = 1,
geneSize = 0.8,
showPct = TRUE,
pctSize = 0.7,
axisSize = 0.8,
showLegend = TRUE,
legendTxtSize = 1,
geneMar = 4
)
m1 |
first |
m2 |
second |
genes |
genes to be drawn. Default takes top 5 mutated genes. |
orderBy |
Order genes by mutation rate in 'm1' or 'm2'. Default 'NULL', keeps the same order of 'genes' |
m1Name |
optional name for first cohort |
m2Name |
optional name for second cohort |
colors |
named vector of colors for each Variant_Classification. |
normalize |
Default TRUE. |
yLims |
Default NULL. Auto estimates. Maximum values for 'm1' and 'm2' respectively |
borderCol |
Default gray |
titleSize |
Default 1 |
geneSize |
Default 0.8 |
showPct |
Default TRUE |
pctSize |
Default 0.7 |
axisSize |
Default 0.8 |
showLegend |
Default TRUE. |
legendTxtSize |
Default 0.8 |
geneMar |
Default 4 |
Draws two barplots side by side to display difference between two cohorts.
Returns nothing. Just draws plot.
#' ##Primary and Relapse APL
primary.apl <- system.file("extdata", "APL_primary.maf.gz", package = "maftools")
relapse.apl <- system.file("extdata", "APL_relapse.maf.gz", package = "maftools")
##Read mafs
primary.apl <- read.maf(maf = primary.apl)
relapse.apl <- read.maf(maf = relapse.apl)
##Plot
coBarplot(m1 = primary.apl, m2 = relapse.apl, m1Name = 'Primary APL', m2Name = 'Relapse APL')
dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.