fill_gwas_unknown_rsids: Method to obtain rsids for records in a gwas where they are...

Description Usage Arguments Value Examples

View source: R/rsid_search.R

Description

The method looks at all the rows for which rsid is NA and gets their rsid by calling get_unknown_rsids_from_locus and merging the resulting rsids into the gwas using merge_rsids_into_gwas

Usage

1
fill_gwas_unknown_rsids(gwas, assembly = valid_references, validate = TRUE)

Arguments

gwas

a dataframe containing the gwas with CHR POS NEA and EA

assembly

one of "hg18", "hg19" (default), or "hg38".

validate

a boolean indicating whether to validate the resulting gwas (TRUE by default) use FALSE for debugging.

Value

original input gwas with available rsids replacing rsids where possible

Examples

1
2
3
4
any(is.na(demo_data$rsid)) # TRUE
fixed_gwas = fill_gwas_unknown_rsids(demo_data)
any(is.na(fixed_gwas$rsid)) # FALSE
nrow(fixed_gwas) == nrow(demo_data) # TRUE

richardslab/MRutils documentation built on Dec. 22, 2021, 4 p.m.