cnv.heatmap: Create a CNV heatmap.

Description Usage Arguments Details Value Author(s) Examples

Description

description

Usage

1
2
cnv.heatmap(cnv, samples = NA, minBP = 10^6, symbols = NULL,
  genes.gr = NULL, colour.map = default.cnv.heatmap.colour.map())

Arguments

cnv

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. See the Details section for further information.

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 parameter, and the symbols must correspond to the symbol column in the gene.gr instance. See the Details section for further information.

genes.gr

A GRanges instance containing the locations of genes. The chromosome names (seqnames) must match the chromosome names used in the CNV data. The GRanges instance must also contain a symbol column in its mcols attribute. See the Details section for further details and the examples section for a way to build this parameter using Bioconductor packages.

colour.map

Colour scheme to use for the heatmap. It should be a data.frame with the first column specifying the CNV categories and the second column specifying the colour to use.

Details

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.

Value

???

Author(s)

Lutz Krause <lutz.krause@qimrberghofer.edu.au>

Examples

 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)

jjellis/GenomicVis documentation built on May 19, 2019, 11:39 a.m.