Description Usage Arguments Value Examples
Method to merge back rsids from a subset of a gwas into a full gwas where they were missing
1 | merge_rsids_into_gwas(gwas, rsids, validate = TRUE)
|
gwas |
a dataframe containing the gwas with CHR POS NEA and EA |
rsids |
another gwas which contained a subset of the rows in gwas, presumably with some rsids updated. #' @param validate a boolean indicating whether to validate the resulting gwas (TRUE by default) use FALSE for debugging. |
original input gwas with available rsids replacing rsids where possible
1 2 3 4 5 6 7 8 9 | any(is.na(demo_data$rsid)) # TRUE
fixed_partial_gwas <- get_unknown_rsids_from_locus(demo_data)
any(is.na(fixed_partial_gwas$rsid)) # FALSE
nrow(fixed_partial_gwas) == nrow(demo_data) # FALSE
fixed_gwas <- merge_rsids_into_gwas(demo_data, fixed_partial_gwas)
nrow(fixed_gwas) == nrow(demo_data) # TRUE
still_demo_data <- merge_rsids_into_gwas(demo_data, subset(fixed_partial_gwas, FALSE)) # same as original
dplyr::all_equal(still_demo_data, demo_data) # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.