Object of class data frame with rows representing mutations. The
data frame must contain columns with the following names "transcript_name",
"gene", and "amino_acid_change". Values in the "transcript_name" column must
represent an ensembl transcript id and values in the "amino_acid_change"
column must be in p.notation (see details).
y
Object of class data frame with rows representing mutations. The
data frame must contain columns with the following names "transcript_name"
and "amino_acid_change". Values in the "transcript_name" column must
represent an ensembl transcript id and values in the "amino_acid_change"
column must be in p. notation (optional, see details).
z
Object of class data frame with rows representing regions of
interest. The data frame must contain columns with the following names
"description", "start", "stop" (optional see details).
fillCol
Character string specifying the column name of the argument
supplied to parameter x on which to colour the lollis representing mutations
(see details).
labelCol
Character string specifying the column name of the argument
supplied to parameter x from which to extract and display text corresponding
to mutations (see details).
txtAngle
Integer specifying the angle of label text to be plotted if
an argument is supplied to the labelCol parameter.
txtSize
Integer specifying the size of label text to be plotted if an
argument is supplied to the labelCol parameter.
pntSize
Integer specifying the size of lolli points representing
mutations.
proteinColour
Character string specifying the background colour of the
protein.
obsA.rep.fact
Numeric value representing the repulsive factor for the
lollis plotted, which were derived from the argument supplied to parameter x
(see details and vignette).
obsA.rep.dist.lmt
Numberic value representing the repulsive distance
limit for the lollis plotted, which were derived from the argument supplied
to parameter x (see details and vignette).
obsA.attr.fact
Numeric value representing the attraction factor for
the lollis plotted, which were derived from the argument supplied to
parameter x (see details and vignette).
obsA.adj.max
Numeric value representing the max position adjustment
for the lollis plotted, which were derived from the argument supplied to
parameter x (see details and vignette).
obsA.adj.lmt
Numeric value representing the adjustment limit for the
lollis plotted, which were derived from the argument supplied to parameter x
(see details and vignette).
obsA.iter.max
Integer representing the number of iterations of
position adjustments for the lollis plotted, which were derived from the
argument supplied to parameter x (see details and vignette).
obsB.rep.fact
Numeric value representing the repulsive factor for the
lollis plotted, which were derived from the argument supplied to parameter y
(see details and vignette).
obsB.rep.dist.lmt
Numberic value representing the repulsive distance
limit for the lollis plotted, which were derived from the argument supplied
to parameter y (see details and vignette).
obsB.attr.fact
Numeric value representing the attraction factor for
the lollis plotted, which were derived from the argument supplied to
parameter y (see details and vignette).
obsB.adj.max
Numeric value representing the max position adjustment
for the lollis plotted, which were derived from the argument supplied to
parameter y (see details and vignette).
obsB.adj.lmt
Numeric value representing the adjustment limit for the
lollis plotted, which were derived from the argument supplied to parameter y
(see details and vignette).
obsB.iter.max
Integer representing the number of iterations of
position adjustments for the lollis plotted, which were derived from the
argument supplied to parameter y (see details and vignette).
sideChain
Boolean specifying if amino acid sidechain data should be
plotted in lieu of protein domains (see details).
species
A valid species from which to retrieve protein domain and
sequence data for a given transcript (see details).
maxLolliStack
Integer specifying the cutoff for the maximum number of
lollis allowed to be stacked at a single position.
plotLayer
Valid ggplot2 layer to be added to the plot.
paletteA
Character vector specifying colours for protein domains,
valid only if sideChain==FALSE.
paletteB
Character vector specifying colours for lollis representing
mutations, valid only if argument is supplied to fillCol.
host
Host to connect to for biomaRt queries (see details).
out
Character vector specifying the the object to output, one of
"data", "grob", or "plot", defaults to "plot" (see returns).
Details
lolliplot is a function designed to display mutation information in
the context of a protien identified by an ensembl transcript id. The
lolliplot function will query ensembl via biomart to retrieve sequence and
domain information in order to construct a representation of a protein and
therefore requires an internet connection. A value must be supplied to the
species parameter (defaults to hsapiens) in order for a successful biomart
query. Valid arguments to this field are those species with datasts available
via ensembl. please specify species in lowercase without a period
(i.e. hsapiens instead of H.sapiens), lolliplot will inform the user of
available species if input to the species parameter is not recognized.
Further lolliplot will build a protein framework based on sequence data
obtained from biomaRt, by default this will default to the latest ensembl
version. In order for the most accurate representation the annotation version
of the mutations given to lolliplot should match the annotation version used
by biomaRt. The annotation version used by biomaRt can be changed via the
host paramter (see vignette for more details).
lolliplot is capable of plotting two seperate sets of data on the protein
representation specified by parameters 'x' and 'y', the data supplied to
these parameters will be plotted on the top and bottom of the protein
respectively. Note that input to these parameters is expected to correspond
to a single ensembl transcript and that values in the "amino_acid_change"
columns are required to be in p. notation (i.e. p.V600E). Further lolliplot
is able to plot custom domain annotation if supplied via the parameter 'z',
this will override domain information obtained from biomart.
lolliplot uses a forcefield model from the package FField to attract and
repulse lollis. The parameters for this force field model are set to
reasonable defaults however may be adjusted via the obsA... and obsB...
family of parameters. Please see the package FField available on cran for
a description of these parameters. Note that the time to construct the
lolliplot will in large part depend on the number of mutations and the values
supplied to the forcefield parameters.
Value
One of the following, a list of dataframes containing data to be
plotted, a grob object, or a plot.
Examples
# Create input data
data <- brcaMAF[brcaMAF$Hugo_Symbol == 'TP53',c('Hugo_Symbol', 'amino_acid_change_WU')]
data <- as.data.frame(cbind(data, 'ENST00000269305'))
colnames(data) <- c('gene', 'amino_acid_change', 'transcript_name')
# Call lolliplot
lolliplot(data)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GenVisR)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GenVisR/lolliplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lolliplot
> ### Title: Construct a lolliplot
> ### Aliases: lolliplot
>
> ### ** Examples
>
> # Create input data
> data <- brcaMAF[brcaMAF$Hugo_Symbol == 'TP53',c('Hugo_Symbol', 'amino_acid_change_WU')]
> data <- as.data.frame(cbind(data, 'ENST00000269305'))
> colnames(data) <- c('gene', 'amino_acid_change', 'transcript_name')
>
> # Call lolliplot
> lolliplot(data)
Using the following host: www.ensembl.org for biomaRt queries to change the ensembl annotation version alter this parameter!
Querying biomaRt for transcript sequence
Querying biomaRt for protein domains
Constructing gene track
Detected p. notation for amino_acid_change
applying force field to observed mutations for top track. This will take time if n is large, see vignette for tips
>
>
>
>
>
> dev.off()
null device
1
>