Learn R Programming

saasCNV (version 0.3.4)

reannotate.CNV.res: 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.

Value

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

Details

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

See Also

joint.segmentation, cnv.call

Examples

Run this code

## 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)

Run the code above in your browser using DataLab