coOncoplot {maftools} | R Documentation

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

### Description

Draw two oncoplots side by side for cohort comparision.

### Usage

    coOncoplot(
      m1,
      m2,
      genes = NULL,
      m1Name = NULL,
      m2Name = NULL,
      clinicalFeatures1 = NULL,
      clinicalFeatures2 = NULL,
      annotationColor1 = NULL,
      annotationColor2 = NULL,
      annotationFontSize = 1.2,
      sortByAnnotation1 = FALSE,
      sortByAnnotation2 = FALSE,
      sampleOrder1 = NULL,
      sampleOrder2 = NULL,
      additionalFeature1 = NULL,
      additionalFeaturePch1 = 20,
      additionalFeatureCol1 = "white",
      additionalFeatureCex1 = 0.9,
      additionalFeature2 = NULL,
      additionalFeaturePch2 = 20,
      additionalFeatureCol2 = "white",
      additionalFeatureCex2 = 0.9,
      sepwd_genes1 = 0.5,
      sepwd_samples1 = 0.5,
      sepwd_genes2 = 0.5,
      sepwd_samples2 = 0.5,
      colors = NULL,
      removeNonMutated = TRUE,
      anno_height = 2,
      legend_height = 4,
      geneNamefont = 0.8,
      showSampleNames = FALSE,
      SampleNamefont = 0.5,
      barcode_mar = 1,
      outer_mar = 3,
      gene_mar = 1,
      legendFontSize = 1.2,
      titleFontSize = 1.5,
      keepGeneOrder = FALSE,
      bgCol = "#CCCCCC",
      borderCol = "white"
    )

### Arguments

`m1` | first `MAF` object
`m2` | second `MAF` object
`genes` | draw these genes. Default plots top 5 mutated genes from two cohorts.
`m1Name` | optional name for first cohort
`m2Name` | optional name for second cohort
`clinicalFeatures1` | columns names from 'clinical.data' slot of m1 `MAF` to be drawn in the plot. Dafault NULL.
`clinicalFeatures2` | columns names from 'clinical.data' slot of m2 `MAF` to be drawn in the plot. Dafault NULL.
`annotationColor1` | list of colors to use for 'clinicalFeatures1' Default NULL.
`annotationColor2` | list of colors to use for 'clinicalFeatures2' Default NULL.
`annotationFontSize` | font size for annotations Default 1.2
`sortByAnnotation1` | logical sort oncomatrix (samples) by provided 'clinicalFeatures1'. Sorts based on first 'clinicalFeatures1'. Defaults to FALSE. column-sort
`sortByAnnotation2` | same as above but for m2
`sampleOrder1` | Manually speify sample names in m1 for oncolplot ordering. Default NULL.
`sampleOrder2` | Manually speify sample names in m2 for oncolplot ordering. Default NULL.
`additionalFeature1` | a vector of length two indicating column name in the MAF and the factor level to be highlighted.
`additionalFeaturePch1` | Default 20
`additionalFeatureCol1` | Default "white"
`additionalFeatureCex1` | Default 0.9
`additionalFeature2` | a vector of length two indicating column name in the MAF and the factor level to be highlighted.
`additionalFeaturePch2` | Default 20
`additionalFeatureCol2` | Default "white"
`additionalFeatureCex2` | Default 0.9
`sepwd_genes1` | Default 0.5
`sepwd_samples1` | Default 0.5
`sepwd_genes2` | Default 0.5
`sepwd_samples2` | Default 0.5
`colors` | named vector of colors for each Variant_Classification.
`removeNonMutated` | Logical. If `TRUE` removes samples with no mutations in the oncoplot for better visualization. Default `TRUE`.
`anno_height` | Height of clinical margin. Default 2
`legend_height` | Height of legend margin. Default 4
`geneNamefont` | font size for gene names. Default 1
`showSampleNames` | whether to show sample names. Defult FALSE.
`SampleNamefont` | font size for sample names. Default 0.5
`barcode_mar` | Margin width for sample names. Default 1
`outer_mar` | Margin width for outer. Default 3
`gene_mar` | Margin width for gene names. Default 1
`legendFontSize` | font size for legend. Default 1.2
`titleFontSize` | font size for title. Default 1.5
`keepGeneOrder` | force the resulting plot to use the order of the genes as specified. Default FALSE
`bgCol` | Background grid color for wild-type (not-mutated) samples. Default gray - "#CCCCCC"
`borderCol` | border grid color for wild-type (not-mutated) samples. Default 'white'

### Details

Draws two oncoplots 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
    coOncoplot(m1 = primary.apl, m2 = relapse.apl, m1Name = 'Primary APL', m2Name = 'Relapse APL')
    dev.off()

[Package maftools version 2.6.05 Index]