coBarplot: Draw two barplots side by side for cohort comparision.

Description Usage Arguments Details Value Examples

View source: R/coBarplot.R

Description

Draw two barplots side by side for cohort comparision.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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,
  legendTxtSize = 1
)

Arguments

m1

first MAF object

m2

second MAF object

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

legendTxtSize

Default 0.8

Details

Draws two barplots side by side to display difference between two cohorts.

Value

Returns nothing. Just draws plot.

Examples

1
2
3
4
5
6
7
8
9
#' ##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()

Example output

-Reading
-Validating
--Non MAF specific values in Variant_Classification column:
  ITD
-Silent variants: 45 
-Summarizing
-Processing clinical data
--Missing clinical data
-Finished in 0.380s elapsed (0.282s cpu) 
-Reading
-Validating
--Non MAF specific values in Variant_Classification column:
  ITD
-Silent variants: 19 
-Summarizing
-Processing clinical data
--Missing clinical data
-Finished in 0.176s elapsed (0.128s cpu) 
null device 
          1 

maftools documentation built on Feb. 6, 2021, 2 a.m.