ukbkings

ukbkings: KCL R interface to UKB data on Rosalind/CREATE HPC

Query project data

Functions to inpsect the field finder (includes field, name, type), add fields to a one-per-line file for variables of interest, and check codes for categorical variables.

bio_field()

Reads project-specific UKB field codes

bio_field_add()

Adds field column entries from a dataframe to a file

Create a dataframe

Retrieve data for fields of interest and write as serialised dataframe.

bio_phen()

Reads and writes phenotype data for a subset of fields

bio_rename()

Updates column names

Retrieve record-level data

Functions to retrieve UKB record-level data.

bio_record()

Reads record-level data from on-disk disk.frames

bio_record_map()

Applies a function to each record-level disk.frame

Retrieve returned data

Functions to retrieve UKB returned data.

bio_return()

Reads returned data

Retrieve coding maps and lookups

Functions to retrieve UKB codings.

bio_code()

Reads the UKB showcase codings for categorical variables

bio_code_primary_care()

Reads UKB reference data: primary care maps and lookups

Query genetic data

Functions to inspect the genetic data available for a UKB project.

bio_gen_ls()

Lists project genetic directory contents

bio_gen_fam()

Read the project-specific fam file

bio_gen_related()

Read the project-specific relatedness file

bio_gen_related_remove()

Find relatives to remove

bio_gen_sqc()

Read the sample quality control file

bio_gen_ancestry()

Assigns 1000 Genomes super populations

bio_gen_write_plink_input()

Writes a two-column dataframe of IDs for PLINK input

Datasets

Reference data.

drug_dmd_antidep

Curated dm+d antidepressant names

drug_pharmgkb

PharmGKB curated drug list

drug_gwas

Active ingredients and ATC code of UKB self-reported medications

Deprecated functionality

Deprecated functions.

bio_gp()

Reads the primary care data

bio_covid()

Reads the COVID-19 data

bio_hesin()

Reads record-level HES in-patient data

bio_death()

Reads death records