annot: Annotate variant data frame.

Description Usage Arguments Details Author(s) Examples

View source: R/code.R

Description

annot can be used to annotate a data frame containing sequencing variants.

Usage

1
annot(x, y, type, nomatch, CLC)

Arguments

x

the data frame to be annotated.

y

the data frame containing the annotation.

type

specify whether y is a BED or GTF file.

nomatch

should variants located outside any of the regions found in the annotation data frame be removed (FALSE) or withheld (TRUE).

CLC

logical, origin of the data frame to be annotated is CLC genomics workbench?

Details

This function can be used to annotate data frames. For further processing by gDom, gRec and commonvar, annotation is necessary. For nDom and nRec, annotation is optional. Both variant files from CLC Genomics Workbench and VCF files (after VCFfile) can be processed. If a variant can be allocated to >1 group (a gene, exon or other), the variant information is spread over n rows (with n the number of groups).

If the file originates from the CLC genomics workbench (directly or after processing with nDom or nRec), always specify CLC is TRUE. This is important as CLC specifies chromosomal location for MNVs in a different way than VCF.

Author(s)

Bart Broeckx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(test)
 data(CLCfile1)
 data(genBED)
 # for VCF file
 # general remark: make sure the chromosome is a character, not a factor: e.g.:
 test$V1<-as.character(test$V1)
 # prepare the VCF file
 out <-VCFfile(test,"V10", TRUE, "PASS")
 # produce an annotated VCF file with all variants retained:
 AnnotCLCfile1 <- annot(out, genBED, type="BED", nomatch=TRUE, CLC=FALSE)
 # produce an annotated VCF file with all variants retained:
 AnnotCLCfile2 <- annot(out, genBED, type="BED", nomatch=FALSE, CLC=FALSE)
 # produces an annotated CLC file with all variants retained.
 AnnotCLCfile3 <- annot(CLCfile1, genBED, type="BED", nomatch=TRUE, CLC=TRUE)
 # produces an annotated CLC file with only the variants that were allocated
 # to a gene being retained.
 AnnotCLCfile4 <- annot(CLCfile1, genBED, type="BED", nomatch=FALSE, CLC=TRUE)

BartBroeckx/Mendelian documentation built on May 5, 2019, 10:27 a.m.