Description Usage Arguments Details Value Author(s) Examples
description
1 2 | cnv.heatmap(cnv, samples = NA, minBP = 10^6, symbols = NULL,
genes.gr = NULL, colour.map = default.cnv.heatmap.colour.map())
|
cnv |
A |
samples |
A character vector specifying the samples to use in the heatmap. If no samples are provided the function will use all samples as determined by taking the column names after the third position (the first three columns should be chromosome, begin and end). |
minBP |
minBP |
symbols |
A character vector of gene symbols. If provided you must
also provide the |
genes.gr |
A |
colour.map |
Colour scheme to use for the heatmap. It should be a
|
The cnv
parameter should be a data.frame
describing the
CNVs for a cohort of samples. It must have Chr
, Begin
and
End
columns and additional columns for each sample. The sample
columns should contain character descriptions relating to the CNV
described by the Chr
, Begin
and End
. The package
provides an example data set, CNVData
, that classifies each CNV as
either Normal, Gain, Loss, Amplified, NLOH or HD. However, you are free
to use your own classifications, but be sure to set colour.map
accordingly.
The GRanges
object can be built by any means, but we have found it
convenient, particularly for human data, to build this parameter from
Bioconductor packages. Specifically, the
TxDb.Hsapiens.UCSC.hg19.knownGene and org.Hs.eg.db packages.
An example of how this can be done is given in the Examples section
below. If the TxDb.Hsapiens.UCSC.hg19.knownGene package does not
suit your needs and there is no other available TxDb
package, it
is very simple to build custom TxDb
packages, see the
documentation for the GenomicFeatures package for further details.
???
Lutz Krause <lutz.krause@qimrberghofer.edu.au>
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 | ## Not run:
# The genes.gr argument can easily be built from available Bioconductor
# packages. The following code shows how you could build the appropriate
# GRanges instance for human hg19 data.
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(org.Hs.eg.db)
genes.gr <- genes(TxDb.Hsapiens.UCSC.hg19.knownGene)
gene_ids <- unlist(genes.gr$gene_id)
symbol.map <- select(org.Hs.eg.db, gene_ids, 'SYMBOL')
genes.gr$symbol <- symbol.map$SYMBOL
## End(Not run)
# The data set hg19Genes contains human genes with the
#appropriate gene symbols.
data(hg19Genes)
data(CNVData)
set.seed(100)
g <- sample(hg19Genes$symbol, 20)
cnv.heatmap(CNVData, symbols = g, genes.gr = hg19Genes)
## Not run:
# To just use a subset of samples.
cnv.heatmap(CNVData, samples = c('LC3_A', 'LC3_B'),
genes.gr = hg19Genes)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.