reannotate.CNV.res {saasCNV}R Documentation

Gene Annotation

Description

An optional function to add gene annotation to each CNV segment.

Usage

reannotate.CNV.res(res, gene, only.CNV = FALSE)

Arguments

res

a data frame resultingfrom cnv.call.

gene

a data frame containing gene annotation information.

only.CNV

logical. If only segment assigned to gain/loss/LOH to be annotated and output. Default is FALSE.

Details

The RefSeq gene annotation file can be downloaded from UCSC Genome Browser.

Value

A gene annotation column have been add to the data frame resulting from cnv.call.

Author(s)

Zhongyang Zhang <zhongyang.zhang@mssm.edu>

See Also

joint.segmentation, cnv.call

Examples


## Not run: 
## An example of RefSeq gene annotation file,
## the original version of which can be downloaded from UCSC Genome Browser
url <- "https://zhangz05.u.hpc.mssm.edu/saasCNV/data/refGene_hg19.txt.gz"
tryCatch({download.file(url=url, destfile="refGene_hg19.txt.gz")
         }, error = function(e) {
          download.file(url=url, destfile="refGene_hg19.txt.gz", method="curl")
         })
## If download.file fails to download the data, please manually download it from the url.

gene.anno <- read.delim(file="refGene_hg19.txt.gz", as.is=TRUE, comment.char="")
data(seq.cnv)
seq.cnv.anno <- reannotate.CNV.res(res=seq.cnv, gene=gene.anno, only.CNV=TRUE)

## End(Not run)


[Package saasCNV version 0.3.4 Index]