Map a variant identifier to an EFO trait identifier. Variants are first
mapped to association identifiers, and then to EFO traits. Set the option
keep_association_id
to TRUE
to keep the intermediate mapping,
i.e., the association identifiers.
Arguments
- variant_id
A character vector of variant identifiers.
- keep_association_id
Whether to keep the association identifier in the final output (default is
FALSE
).- verbose
Whether the function should be verbose about the different queries or not.
- warnings
Whether to print warnings.
Value
A dataframe of two or three identifiers. If
keep_association_id
is set to FALSE
, the first column is the
variant identifier and the second column is the EFO trait identifier,
otherwise the variable association_id
is also included as the second
column.
Examples
if (FALSE) {
# Map GWAS variant identifiers to EFO trait identifiers
variant_to_trait(c('rs7904579', 'rs138331350'))
# Map GWAS variant identifiers to EFO trait identifiers
# but keep the intermediate association identifier
variant_to_trait(c('rs7904579', 'rs138331350'), keep_association_id = TRUE)
}