annotateMDT: Annotate MDT Objects

Description Usage Arguments merge annotateStat annotateMAF annotateLocation annotateBioconductor annotateGOSim annotateRSID annotateCoding See Also

Description

Appends annotations for each FeatureID to annotations(mdt).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
annotateStat(x, function_list = list(FISHER = function(x, y) {    
  stats::fisher.test(table(factor(x, c(0L, 1L, 2L)), factor(y, c(0L,
  1L))))$p.value }, HW = function(x, y) {    
  HardyWeinberg::HWExact(table(factor(x, c(0L, 1L, 2L))), verbose = FALSE)$pval
  }), fill = NA, verbose = TRUE)

annotateLocation(x, txdb, region = VariantAnnotation::AllVariants(),
  columns = c("LOCATION", "ENTREZID"), verbose = TRUE)

annotateBioconductor(x, annotations_db, keys_colname, columns,
  keytype = keys_colname, verbose = TRUE)

annotateCoding(x, seqSource, txdb, columns = c("CONSEQUENCE"),
  verbose = TRUE)

annotateMAF(x)

annotateRSID(x, snp_loc, verbose = TRUE)

## S4 method for signature 'MDT'
annotateMAF(x)

## S4 method for signature 'MDT'
annotateStat(x, function_list = list(FISHER = function(x, y) {
      stats::fisher.test(table(factor(x, c(0L, 1L, 2L)), factor(y, c(0L,
  1L))))$p.value }, HW = function(x, y) {    
  HardyWeinberg::HWExact(table(factor(x, c(0L, 1L, 2L))), verbose = FALSE)$pval
  }), fill = NA, verbose = TRUE)

## S4 method for signature 'MDT'
annotateLocation(x, txdb,
  region = VariantAnnotation::AllVariants(), columns = c("LOCATION",
  "ENTREZID"), verbose = TRUE)

## S4 method for signature 'MDT'
annotateBioconductor(x, annotations_db, keys_colname, columns,
  keytype = keys_colname, verbose = TRUE)

## S4 method for signature 'MDT'
annotateCoding(x, seqSource, txdb, columns = c("CONSEQUENCE"),
  verbose = TRUE)

## S4 method for signature 'MDT'
annotateRSID(x, snp_loc, verbose = TRUE)

## S4 method for signature 'MDT,data.frame'
merge(x, y, by = "FeatureID", all = FALSE,
  all.x = TRUE, all.y = FALSE, sort = TRUE, allow.cartesian = TRUE)

Arguments

x

MDT object.

function_list

list of functions that take two arguments, a dropped column of mtable(mdt) and response(mdt), and returns one numeric value. list names are used as colnames in annotations(mdt).

fill

Value to replace missing values in mtable.

verbose

logical specifying if function should be run in verbose mode.

txdb

TxDb or GRangesList object that serves as the annotation. GFF files can be converted to TxDb objects with makeTxDbFromGF in the GenomicFeatures package.

region

An instance of one of the 8 VariantType classes : CodingVariants, IntronVariants, FiveUTRVariants, ThreeUTRVariants, IntergenicVariants, SpliceSiteVariants, PromoterVariants, AllVariants. All objects can be instantiated with no arguments, e.g., CodingVariants() will create an object of CodingVariants.

AllVariants, PromoterVariants and IntergenicVariants have upstream and downstream arguments. For PromoterVariants and IntergenicVariants these are single integer values >= 0. For AllVariants these are integer vectors of length 2 named ‘promoter’ and ‘intergenic’. See ?upstream for more details.

When using AllVariants, a range in query may fall in multiple regions (e.g., 'intergenic' and 'promoter'). In this case the result will have a row for each match. All data in the row will be equivalent except the LOCATION column.

columns

Column names to be appended to annotations(mdt). For annotateLocation, can me any column returned by locateVariants. For annotateCoding, can be any column returned by predictCoding.

annotations_db

AnnotationDb object. Can also be PolyPhenDb or SIFTDb.

keys_colname

Name of column to be used as key argument in select.

keytype

the keytype that matches the keys used. For the select methods, this is used to indicate the kind of ID being used with the keys argument. For the keys method this is used to indicate which kind of keys are desired from keys

seqSource

BSgenome-class instance or a FaFile to be used for sequence extraction.

snp_loc

SNPlocs object that contains known SNP locations for a given organism.

y

data.frame with a column named FeatureID.

by

A vector of shared column names in x and y to merge on. This defaults to the shared key columns between the two tables. If y has no key columns, this defaults to the key of x.

all

logical; all = TRUE is shorthand to save setting both all.x = TRUE and all.y = TRUE.

all.x

logical; if TRUE, then extra rows will be added to the output, one for each row in x that has no matching row in y. These rows will have 'NA's in those columns that are usually filled with values from y. The default is FALSE, so that only rows with data from both x and y are included in the output.

all.y

logical; analogous to all.x above.

sort

logical. If TRUE (default), the merged data.table is sorted by setting the key to the by / by.x columns. If FALSE, the result is not sorted.

allow.cartesian

See allow.cartesian in [.data.table.

name

Name of appended column to annotations(mdt).

target_go

Target GO list.

merge

Merges a data.frame to annotations using FeatureIDs.

annotateStat

Estimates association between mtable(mdt) feature and response(mdt). By default, appends Fisher's exact test p-value and Hardy-Weinberg equilibrium exact test p-values. Results can be visualized using manhattanPlot.

annotateMAF

Estimates minor allele frequency.

annotateLocation

Annotates genomic positions by locating variants with respect to gene function using locateVariants. Please note that GENEID is renamed as ENTREZID.

annotateBioconductor

Annotates variants with Bioconductor AnnotationDb objects using select.

annotateGOSim

Estimates GO semantic similarity scores between a gene vector and a target GO terms vector.

Uses mgoSim to estimate GO scores. annotation(mdt) must contain GO and ONTOLOGY columns before running function. Please call annotateBioconductor to do so.

annotateRSID

Annotates dbSNP RS identification numbers using findOverlaps.

annotateCoding

Predict coding changes (e.g. synonymous, frameshift) for variants by using predictCoding.

See Also

AnnotationDb locateVariants TxDb predictCoding BSgenome PolyPhenDb SIFTDb SNPlocs mgoSim


olivmrtn/MachineLearningGWAS documentation built on May 24, 2019, 12:52 p.m.