View source: R/gds_annotation.R
gds_annotate | R Documentation |
Retrieve variant annotation stored in a GDS file with chromosome location or rs.id.
gds_annotate(
x,
gdsfile = NULL,
annot.method = "position",
chr = NULL,
pos = NULL,
ref = NULL,
alt = NULL,
rs.id = NULL,
concat_char = "/",
verbose = TRUE,
annotation_names = c("annotation/info/symbol", "annotation/info/consequence",
"annotation/info/LoF")
)
x |
a |
gdsfile |
a character for GDS filename. If |
annot.method |
a method for searching variants. "position" requires |
chr , pos , ref , alt , rs.id |
column names of |
concat_char |
a character used to separate multiple annotations returned from the gds file. |
verbose |
output messages. |
annotation_names |
a character vector of nodes of the |
A character vector the length of nrow(x)
if concat_char
is a character.
A data frame with nrow(x)
rows and length(annotation_names)
if concat_char
is null.
vardata <- data.frame(
chr = c(11,20,14),
pos = c(12261002, 10033792, 23875025),
ref = c("G", "G", "CG"),
alt = c("A", "A", "C")
)
annotations <- gds_annotate(
x = vardata, annot.method = "position",
chr = "chr", pos = "pos", ref = "ref", alt = "alt"
)
print(annotations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.