This code draws from the methods described in the following papers:
- TreeWas: "Bayesian analysis of genetic association across tree-structured routine healthcare data in the UK Biobank" (Nat Gen, 2017)
- what I'm calling TreeWas2: "Systematic classification of shared components of genetic risk for common human diseases" (biorxiv, 2018)
-
Disease classification comes from ICD10 codes
-
Phenotype matrix of all diseases here:
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/UKBIOBANK_DATA/
-
Genotypes can be selected using this script for SNP(s) of interest:
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/UKBIOBANK_DATA/scripts/generate_genotypes.sh
- Parameters for this script: SNPs of interest (one on each line, ex:
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/UKBIOBANK_DATA/snps.txt
) and an output prefix.
qsub generate_genotypes <file of SNPs of interest> <output prefix> # ex: qsub generate_genotypes snps.txt output_snps
- afterward, filter to people of interest using
scripts/select_people.py
qsub select_people.sh <ids> <output> # ex: qsub select_people.sh ../british_ancestry_ids.txt ../icd10_phenotype_british.txt
- Parameters for this script: SNPs of interest (one on each line, ex:
-
Age, sex, site of collection -
british_covariates.txt
-
Filtered matrix of just British Isles ancestry -
icd10_phenotype_british.txt
-
Filtered matrix of people who passed PLINK QC -
icd10_passed_qc.txt
-
Original treeWAS code
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/TreeWAS
-
Install treewas with R -
library(devtools) install_github("mcveanlab/TreeWAS/TreeWAS")
-
Example TreeWAS code -
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/treewas_example.R
-
TreeWas2.0 code -
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/TreeWas2.0
library(devtools) install_github("christacaggiano/TreeWASDir")
-
TreeWAS 2.0 Sample code-
-
/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/treewas2.0_example.R
-
To save dynamic Plotly tree, click on export in Rstudio image window, and save as html.