coBarplot {maftools} | R Documentation

## Draw two barplots side by side for cohort comparision.

### Description

Draw two barplots side by side for cohort comparision.

### Usage

    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

    #' ##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()

[Package maftools version 2.4.12 Index]