Skip to content

API

To install the latest release from CRAN:

# COMING SOON -- PACKAGE NOT YET ON CRAN
install.packages("bedrockbio");

Load the package (and dplyr for downstream data frame manipulation):

library(bedrockbio)
library(dplyr)

List available datasets:

list_datasets()

Load a dataset:

# all partition fields for a dataset must be specified, see docs for dataset-specific partition columns
df <- load_dataset('ukb_ppp.pqtls', ancestry="EAS", protein_id="A0FGR8", panel="Neurology_II")

Manipulate with dplyr verbs:

df |>
    select(
        chromosome, 
        position, 
        effect_allele, 
        other_allele, 
        beta, 
        neg_log_10_p_value
    ) |>
    slice_max(
        neg_log_10_p_value, n=10
    ) |>
    mutate(
        p_value=10^(-neg_log_10_p_value)
    )