Varlocation: Annotates the variations with genomic location.

Description Usage Arguments Details Value Author(s) Examples

Description

For a given GRange object of variations, the Varlocation() function finds the genomic locations for each entry according to the given annotation. Seven labels are used to describe the location (intergenic, intro_nonProcoding, exon_nonProcoding, intron, 5utr, 3utr and coding). details of the definition can be found in the tutorial.

Usage

1
Varlocation(Vars, txdb, ids, ...)

Arguments

Vars

a GRange object of variations

txdb

a TxDb object.

ids

a dataframe containing gene/transcript/protein id mapping information

...

additional arguments

Details

see 'introduction' for more details

Value

a data frame of locations for each variation

Author(s)

Xiaojing Wang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
vcffile <- system.file("extdata/vcfs", "test1.vcf", package="customProDB")
vcf <- InputVcf(vcffile)

table(GenomicRanges::values(vcf[[1]])[['INDEL']])
index <- which(GenomicRanges::values(vcf[[1]])[['INDEL']] == TRUE)
indelvcf <- vcf[[1]][index]

index <- which(GenomicRanges::values(vcf[[1]])[['INDEL']] == FALSE)
SNVvcf <- vcf[[1]][index]
   
txdb <- AnnotationDbi::loadDb(system.file("extdata/refseq", "txdb.sqlite", package="customProDB"))
load(system.file("extdata/refseq", "ids.RData", package="customProDB"))
SNVloc <- Varlocation(SNVvcf,txdb,ids)
indelloc <- Varlocation(indelvcf,txdb,ids)
table(SNVloc$location)

## End(Not run)

chambm/customProDB documentation built on May 31, 2019, 12:08 p.m.