annotateVariants {R453Plus1Toolbox} | R Documentation

## Adds genomic information to variants

### Description

This method annotates given genomic variants (mutations). Annotation includes affected genes, exons and codons. Resulting amino acid changes are returned as well as dbSNP identifiers, if the mutation is already known. All information is fetched from the Ensembl GRCh37 server via biomaRt using the datasets `hsapiens_gene_ensembl` and `hsapiens_snp`.

### Usage

    annotateVariants(object, bsGenome)

### Arguments

`object` | A data frame storing variants or an instance of AVASet/MapperSet or a data frame (see details).
`bsGenome` | An object of class `BSGenome` giving the genome to be used as reference sequence to calculate amino acid changes. This argument is only applicable when `object` is of type `MapperSet`. Default is ‘BSgenome.Hsapiens.UCSC.hg19’. Note that the genome should fit to the Ensembl annotation.

### Details

If a data frame is given, the following columns must be present:

start | genomic start position in the current Ensembl genome
end | genomic end position in the current Ensembl genome
chromosome | chromosome in ensembl notation (i.e. "1", "2", ..., "Y")
strand | "+" or "-" relative to the nucleotide bases given below
seqRef | reference sequence
seqMut | sequence of the observed variant
seqSur | reference sequence extended for 3 bases in both directions

The rownames of the data frame are used as mutations' names (IDs). See examples for a properly defined data drame.

### Value

An object of class `AnnotatedVariants`. Affected genes, transcripts and exon as well as known SNPs are stored in a list-like structure. See the documentation of class `AnnotatedVariants-class` for details.

### Author(s)

Hans-Ulrich Klein

### See Also

`AnnotatedVariants-class`, `AVASet-class`, `MapperSet-class`, `htmlReport`

### Examples

    variants = data.frame(
        start=c(106157528, 106154991,106156184),
        end=c(106157528, 106154994,106156185),
        chromosome=c("4", "4", "4"),
        strand=c("+", "+", "+"),
        seqRef=c("A", "ATAG", "---"),
        seqMut=c("G", "----", "ATA"),
        seqSur=c("TACAGAA", "TTTATAGATA", "AGC---TCC"),
        stringsAsFactors=FALSE)
    rownames(variants) = c("snp", "del", "ins")
    ## Not run: annotateVariants(variants)

[Package R453Plus1Toolbox version 1.42.0 Index]