Description Usage Arguments Details Value See Also Examples
takes output generated by read.maf and draws an oncoplot
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | oncoplot(
maf,
top = 20,
genes = NULL,
altered = FALSE,
drawRowBar = TRUE,
drawColBar = TRUE,
leftBarData = NULL,
leftBarLims = NULL,
rightBarData = NULL,
rightBarLims = NULL,
topBarData = NULL,
logColBar = FALSE,
includeColBarCN = TRUE,
clinicalFeatures = NULL,
annotationColor = NULL,
annotationDat = NULL,
pathways = NULL,
selectedPathways = NULL,
draw_titv = FALSE,
showTumorSampleBarcodes = FALSE,
barcode_mar = 4,
gene_mar = 5,
anno_height = 1,
legend_height = 4,
sortByAnnotation = FALSE,
groupAnnotationBySize = TRUE,
annotationOrder = NULL,
sortByMutation = FALSE,
keepGeneOrder = FALSE,
GeneOrderSort = TRUE,
sampleOrder = NULL,
additionalFeature = NULL,
additionalFeaturePch = 20,
additionalFeatureCol = "gray70",
additionalFeatureCex = 0.9,
genesToIgnore = NULL,
removeNonMutated = TRUE,
fill = TRUE,
cohortSize = NULL,
colors = NULL,
bgCol = "#CCCCCC",
borderCol = "white",
numericAnnoCol = NULL,
drawBox = FALSE,
fontSize = 0.8,
SampleNamefontSize = 1,
titleFontSize = 1.5,
legendFontSize = 1.2,
annotationFontSize = 1.2,
sepwd_genes = 0.5,
sepwd_samples = 0.25,
writeMatrix = FALSE,
colbar_pathway = FALSE,
showTitle = TRUE,
titleText = NULL
)
|
maf |
an |
top |
how many top genes to be drawn. defaults to 20. |
genes |
Just draw oncoplot for these genes. Default NULL. |
altered |
Default FALSE. Chooses top genes based on muatation status. If |
drawRowBar |
logical. Plots righ barplot for each gene. Default |
drawColBar |
logical plots top barplot for each sample. Default |
leftBarData |
Data for leftside barplot. Must be a data.frame with two columns containing gene names and values. Default 'NULL' |
leftBarLims |
limits for 'leftBarData'. Default 'NULL'. |
rightBarData |
Data for rightside barplot. Must be a data.frame with two columns containing to gene names and values. Default 'NULL' which draws distibution by variant classification. This option is applicable when only 'drawRowBar' is TRUE. |
rightBarLims |
limits for 'rightBarData'. Default 'NULL'. |
topBarData |
Default 'NULL' which draws absolute number of mutation load for each sample. Can be overridden by choosing one clinical indicator(Numeric) or by providing a two column data.frame contaning sample names and values for each sample. This option is applicable when only 'drawColBar' is TRUE. |
logColBar |
Plot top bar plot on log10 scale. Default |
includeColBarCN |
Whether to include CN in column bar plot. Default TRUE |
clinicalFeatures |
columns names from 'clinical.data' slot of |
annotationColor |
Custom colors to use for 'clinicalFeatures'. Must be a named list containing a named vector of colors. Default NULL. See example for more info. |
annotationDat |
If MAF file was read without clinical data, provide a custom |
pathways |
Default 'NULL'. Can be 'auto', or a two column data.frame/tsv-file with genes and correspoding pathway mappings.' |
selectedPathways |
Manually provide the subset of pathway names to be seletced from 'pathways'. Default NULL. In case 'pathways' is 'auto' draws top 3 altered pathways. |
draw_titv |
logical Includes TiTv plot. |
showTumorSampleBarcodes |
logical to include sample names. |
barcode_mar |
Margin width for sample names. Default 4 |
gene_mar |
Margin width for gene names. Default 5 |
anno_height |
Height of plotting area for sample annotations. Default 1 |
legend_height |
Height of plotting area for legend. Default 4 |
sortByAnnotation |
logical sort oncomatrix (samples) by provided 'clinicalFeatures'. Sorts based on first 'clinicalFeatures'. Defaults to FALSE. column-sort |
groupAnnotationBySize |
Further group 'sortByAnnotation' orders by their size. Defaults to TRUE. Largest groups comes first. |
annotationOrder |
Manually specify order for annotations. Works only for first 'clinicalFeatures'. Default NULL. |
sortByMutation |
Force sort matrix according mutations. Helpful in case of MAF was read along with copy number data. Default FALSE. |
keepGeneOrder |
logical whether to keep order of given genes. Default FALSE, order according to mutation frequency |
GeneOrderSort |
logical this is applicable when 'keepGeneOrder' is TRUE. Default TRUE |
sampleOrder |
Manually speify sample names for oncolplot ordering. Default NULL. |
additionalFeature |
a vector of length two indicating column name in the MAF and the factor level to be highlighted. Provide a list of values for highlighting more than one features |
additionalFeaturePch |
Default 20 |
additionalFeatureCol |
Default "gray70" |
additionalFeatureCex |
Default 0.9 |
genesToIgnore |
do not show these genes in Oncoplot. Default NULL. |
removeNonMutated |
Logical. If |
fill |
Logical. If |
cohortSize |
Number of sequenced samples in the cohort. Default all samples from Cohort. You can manually specify the cohort size. Default |
colors |
named vector of colors for each Variant_Classification. |
bgCol |
Background grid color for wild-type (not-mutated) samples. Default gray - "#CCCCCC" |
borderCol |
border grid color (not-mutated) samples. Default 'white'. |
numericAnnoCol |
color palette used for numeric annotations. Default 'YlOrBr' from RColorBrewer |
drawBox |
logical whether to draw a box around main matrix. Default FALSE |
fontSize |
font size for gene names. Default 0.8. |
SampleNamefontSize |
font size for sample names. Default 1 |
titleFontSize |
font size for title. Default 1.5 |
legendFontSize |
font size for legend. Default 1.2 |
annotationFontSize |
font size for annotations. Default 1.2 |
sepwd_genes |
size of lines seperating genes. Default 0.5 |
sepwd_samples |
size of lines seperating samples. Default 0.25 |
writeMatrix |
writes character coded matrix used to generate the plot to an output file. |
colbar_pathway |
Draw top column bar with respect to diplayed pathway. Default FALSE. |
showTitle |
Default TRUE |
titleText |
Custom title. Default 'NULL' |
Takes maf file as input and plots it as a matrix. Any desired clincal features can be added at the bottom of the oncoplot by providing clinicalFeatures
.
Oncoplot can be sorted either by mutations or by clinicalFeatures using arguments sortByMutation
and sortByAnnotation
respectively.
None.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | laml.maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
laml.clin = system.file('extdata', 'tcga_laml_annot.tsv', package = 'maftools')
laml <- read.maf(maf = laml.maf, clinicalData = laml.clin)
#Basic onocplot
oncoplot(maf = laml, top = 3)
#Changing colors for variant classifications (You can use any colors, here in this example we will use a color palette from RColorBrewer)
col = RColorBrewer::brewer.pal(n = 8, name = 'Paired')
names(col) = c('Frame_Shift_Del','Missense_Mutation', 'Nonsense_Mutation', 'Multi_Hit', 'Frame_Shift_Ins',
'In_Frame_Ins', 'Splice_Site', 'In_Frame_Del')
#Color coding for FAB classification; try getAnnotations(x = laml) to see available annotations.
fabcolors = RColorBrewer::brewer.pal(n = 8,name = 'Spectral')
names(fabcolors) = c("M0", "M1", "M2", "M3", "M4", "M5", "M6", "M7")
fabcolors = list(FAB_classification = fabcolors)
oncoplot(maf = laml, colors = col, clinicalFeatures = 'FAB_classification', sortByAnnotation = TRUE, annotationColor = fabcolors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.