umich-cphds / createUKBphenome

Create a PheWAS code based phenome using ICD9 and ICD10 data from baskets of the UK biobank
GNU General Public License v3.0
23 stars 2 forks source link

createUKBphenome

Basic concepts

  1. ICD code / PheWAS code mapping from phewascatalog (https://phewascatalog.org/phecodes and https://phewascatalog.org/phecodes_icd10)
  2. Collection of information about PheWAS codes and their inclusion / exclusion filters
  3. Collection and harmonization of ICD codes from UKB
  4. Extraction of all ICD codes from the available fields in your UKB baskets
  5. Generatation of a phenome: case control study for each phecode

Required R libraries

Step 1: Describe your data

Add the absolute paths (e.g. /driveA/UKB/ukb####.tab) of your TAB-delimited UKB baskets to a single text file ./data/baskets.txt Add the latest file with withdrawn samples 'w#####_########.csv' to './data/' folder

Step 2: Create Phenome

cd createUKBphenome
Rscript ./scripts/function.createUKBphenome.r

Output

  1. Full ICD / PheWAS code tables with descriptions (what's the underlying ICD code for each phecode)
  2. UKB phenome with exclusion criteria applied to controls
  3. UKB phenome without applying exclusion criteria to controls
  4. Overview of all phecodes, their categories and general descriptions
  5. Output of all ICD codes that were NOT mapped to phecodes (incl. sample sizes)
  6. Output of all individuals that had sex-specific diagnose codes that did not match their sex

Notes: