coOncoplot: Draw two oncoplots side by side for cohort comparision.

Description Usage Arguments Details Value Examples

View source: R/coOncoplot.R

Description

Draw two oncoplots 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
coOncoplot(
  m1,
  m2,
  genes = NULL,
  m1Name = NULL,
  m2Name = NULL,
  clinicalFeatures1 = NULL,
  clinicalFeatures2 = NULL,
  annotationColor1 = NULL,
  annotationColor2 = NULL,
  annotationFontSize = 1.2,
  sortByAnnotation1 = FALSE,
  sortByAnnotation2 = FALSE,
  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 = 4,
  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

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 4

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

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

thesushantpatil/maftools documentation built on May 18, 2020, 9:54 p.m.