项目介绍

kenhanscombe/ukbtools 是一个托管在 GitHub 上的开源项目,主要使用 HTML 编写,目前获得 112 个 Star、24 次 Fork。

仓库全名
kenhanscombe/ukbtools
Star 数
112
Fork 数
24
未关闭 Issue
2

README 摘要

ukbtools === NB. With the advent of the UKB RAP, this package is no longer supported or under active development. After downloading and decrypting your UK Biobank (UKB) data with the supplied [UKB programs] (http://biobank.ctsu.ox.ac.uk/crystal/docs/UsingUKBData.pdf), you have multiple files that need to be brought together to give you a dataset to explore. The data file has column names that are edited field-codes…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ukbtools 用什么语言开发?

主要使用 HTML 编写,目前有 112 个 Star。

如何获取 ukbtools 的源码?

可以直接克隆仓库:git clone https://github.com/kenhanscombe/ukbtools.git,默认分支为 master;安装与运行步骤见仓库 README。

ukbtools 最近还在维护吗?

仓库最近一次更新为 2023年2月22日,当前有 2 个未关闭 Issue;Star 数为 112,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

An R package to manipulate and explore UK Biobank data

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
168
价值分
75
活跃状态
活跃

语言占比

HTML
R

Release

README

ukbtools

CRAN_Status_Badge codecov R-CMD-check

NB. With the advent of the UKB RAP, this package is no longer supported or under active development.

After downloading and decrypting your UK Biobank (UKB) data with the supplied [UKB programs] (http://biobank.ctsu.ox.ac.uk/crystal/docs/UsingUKBData.pdf), you have multiple files that need to be brought together to give you a dataset to explore. The data file has column names that are edited field-codes from the UKB data showcase. ukbtools makes it easy to collapse the multiple UKB files into a single dataset for analysis, in the process giving meaningful names to the variables. The package also includes functionality to retrieve ICD diagnoses, explore a sample subset in the context of the UKB sample, and collect genetic metadata.

Installation

# Install from CRAN
install.packages("ukbtools")

# Install latest development version
devtools::install_github("kenhanscombe/ukbtools", dependencies = TRUE)

Prerequisite: Make a UKB fileset

Download§ then decrypt your data and create a “UKB fileset” (.tab, .r, .html):

ukb_unpack ukbxxxx.enc key
ukb_conv ukbxxxx.enc_ukb r
ukb_conv ukbxxxx.enc_ukb docs

ukb_unpack decrypts your downloaded ukbxxxx.enc file, outputting a ukbxxxx.enc_ukb file. ukb_conv with the r flag converts the decrypted data to a tab-delimited file ukbxxxx.tab and an R script ukbxxxx.r that reads the tab file. The docs flag creates an html file containing a field-code-to-description table (among others).

§ Full details of the data download and decrypt process are given in the Using UK Biobank Data documentation.

Make a UKB dataset

The function ukb_df() takes two arguments, the stem of your fileset and the path, and returns a dataframe with usable column names. This will take a few minutes. The rate-limiting step is reading and parsing the code in the UKB-generated .r file - not ukb_df per se.

library(ukbtools)
my_ukb_data <- ukb_df("ukbxxxx")

You can also specify the path to your fileset if it is not in the current directory. For example, if your fileset is in a subdirectory of the working directory called data

my_ukb_data <- ukb_df("ukbxxxx", path = "/full/path/to/my/data")

Note: You can move the three files in your fileset after creating them with ukb_conv, but they should be kept together. ukb_df() automatically updates the read call in the R source file to point to the correct directory (the current directory by default, or a directory specified by path).

Other tools

All tools are described on the ukbtools webpage and in the package vignette “Explore UK Biobank Data”

vignette("explore-ukb-data", package = "ukbtools")

For a list of all functions

help(package = "ukbtools")

评论

暂无评论