Description Usage Arguments Details See Also Examples
View source: R/plot.landscape2.R
A function to plot mutational landscape of significantly mutated genes.
| 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 | plot.landscape2(upper.panel, middle.panel, left.panel, right.panel, legend.panel, subtype.panel=NULL, subtype.2.panel=NULL,
    output.fig.pdffile=NULL,
    left.panel.xlim=NULL,
    family.font="sans", 
    syn.nonsyn.legend.color=NULL,
    syn.nonsyn.legend.ncol=NULL,
    syn.nonsyn.legend.loc="top",
    image.color=NULL,
    subtype.labels=NULL,
    subtype.label.cex=1,
    subtype.panel.color=brewer.pal(7, "Dark2"),
    subtype.panel.identifier="",                        # subtype identifier, e.g. Lauren's subtype, Clonality status
    subtype.panel.identifier.cex=0.6,                   # cex for subtype identifier
    subtype.legend.text.width=NULL,                     # text.width passed to legend(...) to adjust distances between 2 adjacent legend strings
	subtype.2.labels=NULL,
    subtype.2.label.cex=1,
    subtype.2.panel.color=brewer.pal(7, "Set2"),
    subtype.2.panel.identifier="",                      # subtype identifier, e.g. Lauren's subtype, Clonality status
    subtype.2.panel.identifier.cex=0.6,                 # cex for subtype identifier
    subtype.2.legend.text.width=NULL,                   # text.width passed to legend(...) to adjust distances between 2 adjacent legend strings
    right.panel.color=brewer.pal(7, "Purples")[5],
    sort.by.qvalue=FALSE,
    group.by.subtype=FALSE,
    left.panel.cex.axis=1.5,
    right.panel.cex.axis=1.3,
    upper.panel.mar=c(0.2, 1.3, 0.5, 1.16),
    legend.panel.mar=c(0, 1, 2, 1),
    legend.panel.ncol=NULL,
    legend.panel.y=-0.05,
    left.panel.mar=c(5.5, 1.5, 0.2, 2.9),
    middle.panel.mar=c(5.5, 1.3, 0.2, 1.16),
    right.panel.mar=c(5.5, 3, 0.2, 1.5),
    left.panel.xlab="Individuals\nwith mutations",
    left.panel.xlab.cex=1,
    right.panel.xlab="-log10\n(q-value)",
    right.panel.xlab.cex=1,
    right.panel.qscore.cutoff=1,
    right.panel.qscore.lwd=0.5,
    right.panel.qscore.lty='dashed',
    right.panel.qscore.col='red')
 | 
| upper.panel | A data frame for upper panel barplot, see  | 
| middle.panel | A matrix for middle panel, attached with row and col names, see  | 
| left.panel | A data frame for the left panel, see  | 
| right.panel | A data frame for the left panel, see  | 
| legend.panel | A data frame contains information about mutation type mapping. | 
| subtype.panel | The main subtype panel, a data frame of sample sutbypes, 1st col is sample name, whereas 2nd col is subtype. | 
| subtype.2.panel | The 2nd subtype panel, a data frame of sample sutbypes, 1st col is sample name, whereas 2nd col is subtype. | 
| output.fig.pdffile | figure file name, ended with  | 
| subtype.labels | text labels for sample subtypes, e.g.  | 
| subtype.2.labels | text labels for sample subtypes, e.g.  | 
| group.by.subtype | if TRUE, group samples by subtypes. | 
| syn.nonsyn.legend.color | A vector of 2 elements indicating colors used for syn. and non-syn. mutations. | 
| syn.nonsyn.legend.ncol | 
 | 
| syn.nonsyn.legend.loc | Legend location, e.g.  | 
| image.color | A vector of elements representing different mutation types. | 
| subtype.panel.color | A vector representing colors used for subtypes. | 
| right.panel.color | Color for barplot on the right panel. | 
| sort.by.qvalue | Sort right panel data frame according to q-value. | 
| left.panel.xlim | xlim for left panel. | 
| family.font | font family used set in par(family=family.font). | 
| left.panel.cex.axis | cex.axis for the left panel at side=4, control the size of percentage. | 
| right.panel.cex.axis | cex.axis for right panel at side=1, control the size of gene names. | 
| upper.panel.mar | mar in par(mar=c(...)) for upper panel. | 
| legend.panel.mar | mar in par(mar=c(...)) for top right legend panel. | 
| legend.panel.ncol | 
 | 
| legend.panel.y | Y coordinate for legend.panel. | 
| left.panel.mar | mar in par(mar=c(...)) for left panel. | 
| middle.panel.mar | mar in par(mar=c(...)) for middle panel. | 
| right.panel.mar | mar in par(mar=c(...)) for right panel. | 
| legend.syn.nonsyn.x,legend.syn.nonsyn.y | set for top left legend via legend(x= | 
| left.panel.xlab | left panel  | 
| left.panel.xlab.cex | 
 | 
| right.panel.xlab | right panel  | 
| right.panel.xlab.cex | 
 | 
| right.panel.qscore.cutoff | Q-score cutoff. | 
| right.panel.qscore.lwd | lwd for qscore cutoff, set 0 to get rid of it. | 
| right.panel.qscore.lty | lty for qscore cutoff. | 
| right.panel.qscore.col | col for qscore cutoff. | 
upper.panel has 3 columns, the 1st is sample names, the 2nd and 3rd are the number of silent and non-silent mutations, e.g.
*Note:It's highly recommended NOT to include '-' in sample names
sample  silence nonsilence
GC03_T  167     551
GC10_T  179     471
GC04_T  160     388
GC05_T  156     391
middle.panel is a matrix, attached with row and columns, e.g.
GC118_T GC191_T GC178_T GC101_T
TP53 0 0 0 0
ARID1A 0 0 2 0
CDH1 6 0 0 3
PTK2B 0 0 0 0
RPL22 0 0 5 0
BAX 0 0 0 0
CYC1 0 0 0 0
KRAS 0 0 0 0
ITGAV 0 0 0 0
HIST1H2AD 0 0 3 0
left.panel is a data frame with 3 columns, e.g.
gene    nonsilence_sample_num   nonsilent_sample_percent
TP53    45      37.2%
ARID1A  28      23.1%
CDH1    21      17.4%
PTK2B   17      14.0%
RPL22   12      9.9%
BAX     11      9.1%
right.panel is a data frame with 2 columns, e.g.
gene    q
TP53    1.73999e-07
ARID1A  0.002062569
CDH1    2.875046e-06
PTK2B   0.001464807
RPL22   1.73999e-07
BAX     1.73999e-07
legend.panel is a data frame with 2 columns, e.g.
7	Nonsense
6	Splice site
5	Frame shift
4	Inframe indel
3	Missense
2	Syn.
You can also use the pre-specified image color as:
data("LandscapeColor")
ls()
| 1 2 3 4 5 6 7 8 9 10 11 | library(RColorBrewer)
data("SMG", package="lxctk")
data("LandscapeColor")
plot.landscape2(upper.panel, middle.panel, left.panel, right.panel, legend.panel, subtype.panel, subtype.labels=c('Intestinal','Diffuse'), image.color=image.color.lixc)
# Use different color scheme
plot.landscape2(upper.panel, middle.panel, left.panel, right.panel, legend.panel, subtype.panel, subtype.labels=c('Intestinal','Diffuse'), image.color=image.color.Set2)
plot.landscape2(upper.panel, middle.panel, left.panel, right.panel, legend.panel, subtype.panel, subtype.labels=c('Intestinal','Diffuse'),output.fig.pdffile="GastricCancer.SMG.Landscape.pdf")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.