object of class data frame with rows representing germline calls.
The data frame must contain columns with the following names "chromosome",
"position", "n_vaf", "t_vaf", "sample". required if path is set to NULL (see
details).
path
Character string specifying the path to a directory containing
germline calls for each sample. Germline calls are expected to be stored as
tab-seperated files which contain the following column names "chromosome",
"position", "n_vaf", "t_vaf", and "sample". required if x is set to null
(see details).
fileExt
Character string specifying the file extensions of files
within the path specified. Required if argument is supplied to path
(see details).
y
Object of class data frame with rows representing chromosome
boundaries for a genome assembly. The data frame must contain columns with
the following names "chromosome", "start", "end" (optional: see details).
genome
Character string specifying a valid UCSC genome (see details).
gender
Character vector of length equal to the number of samples,
consisting of elements from the set "M", "F". Used to suppress the plotting
of allosomes where appropriate.
step
Integer value specifying the step size (i.e. the number of base
pairs to move the window). required when method is set to slide
(see details).
window_size
Integer value specifying the size of the window in base
pairs in which to calculate the mean Loss of Heterozygosity (see details).
normal
Numeric value within the range 0-50 specifying the expected
normal variant allele frequency to be used in Loss of Heterozygosity
calculations. defaults to 50%
colourScheme
Character vector specifying the colour scale to use from
the viridis package. One of "viridis", "magma", "plasma", or "inferno".
plotLayer
Valid ggpot2 layer to be added to the plot.
method
character string specifying the approach to be used for
displaying Loss of Heterozygosity, one of "tile" or "slide" (see details).
out
Character vector specifying the the object to output, one of
"data", "grob", or "plot", defaults to "plot" (see returns).
Details
lohSpec is intended to plot the loss of heterozygosity (LOH) within
a sample. As such lohSpec expects input data to contain only LOH calls. Input
can be supplied as a single data frame given to the argument x with rows
containing germline calls and variables giving the chromosome, position,
normal variant allele frequency, tumor variant allele frequency, and the
sample. In lieu of this format a series of .tsv files can be supplied via the
path and fileExt arguments. If this method is choosen samples will be infered
from the file names. In both cases columns containing the variant allele
frequency for normal and tumor samples should range from 0-100.
Two methods exist to calculate and display LOH events. If the method is set
to "tile" mean LOH is calculated based on the window_size argument with
windows being placed next to each other. If the method is set to slide the
widnow will slide and calculate the LOH based on the step parameter.
In order to ensure the entire chromosome is plotted lohSpec requries the
location of chromosome boundaries for a given genome assembly. As a
convenience this information is available for the following genomes "hg19",
"hg38", "mm9", "mm10", "rn5" and can be tetrieved by supplying one of the
afore mentioned assemblies via the 'genome'paramter. If an argument is
supplied to the 'genome' parameter and is unrecognized a query to the UCSC
MySQL database will be attempted to obtain the required information. If
chromosome boundary locations are unavailable for a given assembly this
information can be supplied to the 'y' parameter which has priority over the
'genome' parameter.
Value
One of the following, a list of dataframes containing data to be
plotted, a grob object, or a plot.
Examples
# plot loh within the example dataset
lohSpec(x=HCC1395_Germline)
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/lohSpec.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lohSpec
> ### Title: Plot LOH data
> ### Aliases: lohSpec
>
> ### ** Examples
>
> # plot loh within the example dataset
> lohSpec(x=HCC1395_Germline)
Did not detect the prefix chr in the chromosome column of x... adding prefix
genome specified is preloaded, retrieving data...
>
>
>
>
>
> dev.off()
null device
1
>