Skip to content

Commit 7599480

Browse files
final updates for now
1 parent e7e8a73 commit 7599480

8 files changed

+316
-20
lines changed

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,63 @@
44

55
---
66

7+
## Slides
8+
9+
* [slides from my 10/4/18 journal club](https://docs.google.com/presentation/d/1O21jx2Y-61TtRDSDuciMbnjrW_xX8ee7mUO63cmKAkY/edit?usp=sharing)
10+
711
## TreeWas papers
812
This code draws from the methods described in the following papers:
913

10-
* **TreeWas** ["Bayesian analysis of genetic association across tree-structured routine healthcare data in the UK Biobank"](https://www-ncbi-nlm-nih-gov.ucsf.idm.oclc.org/pmc/articles/PMC5580804/) (Nat Gen, 2017)
11-
* what I'm calling **TreeWas2** "[Systematic classification of shared components of genetic risk for common human diseases"](https://www.biorxiv.org/content/early/2018/07/23/374207) (biorxiv, 2018)
14+
* **TreeWas**: ["Bayesian analysis of genetic association across tree-structured routine healthcare data in the UK Biobank"](https://www-ncbi-nlm-nih-gov.ucsf.idm.oclc.org/pmc/articles/PMC5580804/) (Nat Gen, 2017)
15+
* what I'm calling **TreeWas2**: "[Systematic classification of shared components of genetic risk for common human diseases"](https://www.biorxiv.org/content/early/2018/07/23/374207) (biorxiv, 2018)
16+
17+
## Data
18+
19+
* Repository uses [UKBiobank](https://www.ukbiobank.ac.uk/) genotype and phenotype data. Phenotype data codes are [20002](http://biobank.ctsu.ox.ac.uk/crystal/field.cgi?id=20002) (self-reported illness, non-cancer) and [41142](http://biobank.ctsu.ox.ac.uk/crystal/field.cgi?id=41142) and [41078](http://biobank.ctsu.ox.ac.uk/crystal/field.cgi?id=41078) (hospital episode statistics) Paths to local Zaitlenlab data:
20+
-
21+
* Disease classification comes from [ICD10 codes](https://www.icd10data.com/)
22+
* Phenotype matrix of all diseases here: `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/UKBIOBANK_DATA/`
23+
* Genotypes can be selected using this script for SNP(s) of interest: `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/UKBIOBANK_DATA/scripts/generate_genotypes.sh`
24+
- 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.
25+
26+
```bash
27+
qsub generate_genotypes <file of SNPs of interest> <output prefix>
28+
29+
# ex: qsub generate_genotypes snps.txt output_snps
30+
```
31+
* afterward, filter to people of interest using `scripts/select_people.py`
32+
33+
```bash
34+
35+
qsub select_people.sh <ids> <output>
36+
37+
# ex: qsub select_people.sh ../british_ancestry_ids.txt ../icd10_phenotype_british.txt
38+
39+
```
40+
41+
42+
43+
* Age, sex, site of collection - `british_covariates.txt`
44+
* Filtered matrix of just British Isles ancestry - `icd10_phenotype_british.txt`
45+
* Filtered matrix of people who passed PLINK QC - `icd10_passed_qc.txt`
46+
47+
## TreeWAS Scripts
48+
49+
* Original [treeWAS code](https://github.com/mcveanlab/TreeWAS) `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/TreeWAS`
50+
* Install treewas with R -
51+
52+
```R
53+
library(devtools)
54+
install_github("mcveanlab/TreeWAS/TreeWAS")
55+
```
56+
57+
* Example TreeWAS code - `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/treewas_example.R`
58+
* TreeWas2.0 code - `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/TreeWas2.0`
59+
60+
```R
61+
library(devtools)
62+
install_github("christacaggiano/TreeWASDir")
63+
```
64+
* TreeWAS 2.0 Sample code-
65+
* `/ye/zaitlenlabstore/christacaggiano/treeWas-exploration/treewas2.0_example.R`
66+
* To save dynamic Plotly tree, click on export in Rstudio image window, and save as html.

rs12046287.html

Lines changed: 22 additions & 0 deletions
Large diffs are not rendered by default.

rs4420638.html

Lines changed: 22 additions & 0 deletions
Large diffs are not rendered by default.

rs58542926.html

Lines changed: 22 additions & 0 deletions
Large diffs are not rendered by default.

test_grs.res_TreeWAS_results.txt

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
ID Par coding meaning max_b b_ci_lhs b_ci_rhs POST_ACTIVE
2+
11 108 G309 G30.9 Alzheimer's disease, unspecified 1.53 1.285 1.775 1
3+
108 147 G30 G30 Alzheimer's disease 1.53 1.285 1.775 0.467516203820797
4+
147 155 Block G30-G32 G30-G32 Other degenerative diseases of the nervous system 1.53 1.265 1.795 0.0838700488253665
5+
88 139 G934 G93.4 Encephalopathy, unspecified -1.19 -1.935 -0.555 0.0159042875871196
6+
12 109 G312 G31.2 Degeneration of nervous system due to alcohol -0.95 -1.755 -0.385 0.00815987892186798
7+
34 115 G458 G45.8 Other transient cerebral ischaemic attacks and related syndromes 0.72 0.145 1.065 0.00749382289915268
8+
109 147 G31 G31 Other degenerative diseases of nervous system, not elsewhere classified 1.53 -1.445 1.835 0.00732629966800913
9+
60 124 G588 G58.8 Other specified mononeuropathies -0.86 -1.515 -0.305 0.00524367096300049
10+
13 109 G318 G31.8 Other specified degenerative diseases of nervous system -0.82 -1.445 -0.295 0.00346851372746471
11+
6 106 G245 G24.5 Blepharospasm 0.6 0.245 1.085 0.00278391215432527
12+
82 138 G911 G91.1 Obstructive hydrocephalus 0.75 0.295 1.215 0.0025881869333283
13+
29 114 G440 G44.0 Cluster headache syndrome -0.9 -1.675 -0.295 0.00244816331745135
14+
23 111 G407 G40.7 Petit mal, unspecified, without grand mal seizures -0.97 -1.795 -0.335 0.00208248357667051
15+
75 135 G821 G82.1 Spastic paraplegia -0.91 -1.715 -0.285 0.0020487741405073
16+
35 115 G459 G45.9 Transient cerebral ischaemic attack, unspecified 0.22 0.115 0.325 0.00203995474290053
17+
18 111 G401 G40.1 Localisation-related (focal) (partial) symptomatic epilepsy and epileptic syndromes with simple partial seizures -0.81 -1.465 -0.295 0.00203811530857922
18+
102 144 G03 G03 Meningitis due to other and unspecified causes 0.57 -2.005 2.005 0.0017394436850009
19+
104 145 G11 G11 Hereditary ataxia 0.7 -2.005 2.005 0.00168439025656131
20+
115 149 G45 G45 Transient cerebral ischaemic attacks and related syndromes 0.23 0.0849999999999999 0.765 0.00147395463935029
21+
89 139 G936 G93.6 Cerebral oedema -0.85 -1.645 -0.205 0.00141501902200891
22+
124 150 G58 G58 Other mononeuropathies -0.67 -1.935 1.735 0.00137489377495414
23+
103 144 G04 G04 Encephalitis, myelitis and encephalomyelitis 0.48 -2.005 2.005 0.0012976522555721
24+
119 150 G53 G53 Cranial nerve disorders in diseases classified elsewhere 0.6 -2.005 2.005 0.00129182413997775
25+
106 146 G24 G24 Dystonia 0.5 -1.845 1.855 0.00127225857939173
26+
1 102 G039 G03.9 Meningitis, unspecified 0.57 0.205 0.975 0.00125538883734322
27+
105 145 G12 G12 Spinal muscular atrophy and related syndromes 1.4 -2.005 2.005 0.00123821406181068
28+
3 104 G119 G11.9 Hereditary ataxia, unspecified 0.67 0.135 1.305 0.00118234685763408
29+
32 115 G453 G45.3 Amaurosis fugax 0.23 0.0849999999999999 0.585 0.00116812368263397
30+
45 119 G530 G53.0 Postzoster neuralgia 0.59 0.215 0.985 0.00116432571954317
31+
132 152 G72 G72 Other myopathies -0.79 -2.005 2.005 0.00110584463672869
32+
84 139 G930 G93.0 Cerebral cysts 0.65 0.215 1.125 0.00100955796161861
33+
130 152 G70 G70 Myasthenia gravis and other myoneural disorders -1.41 -2.005 2.005 0.000960388327181927
34+
126 151 G60 G60 Hereditary and idiopathic neuropathy -1.4 -2.005 2.005 0.000936236734549456
35+
144 155 Block G00-G09 G00-G09 Inflammatory diseases of the central nervous system 0.52 -2.005 2.005 0.000908447919370392
36+
85 139 G931 G93.1 Anoxic brain damage, not elsewhere classified -0.78 -1.585 -0.135 0.000903682093057578
37+
133 153 G80 G80 Infantile cerebral palsy -1.41 -2.005 2.005 0.000902312406786732
38+
112 149 G41 G41 Status epilepticus -1.41 -2.005 2.005 0.000893579523473353
39+
136 153 G83 G83 Other paralytic syndromes -1.41 -2.005 2.005 0.000881172359253557
40+
129 151 G63 G63 Polyneuropathy in diseases classified elsewhere 1.42 -2.005 2.005 0.000870382732150676
41+
145 155 Block G10-G14 G10-G14 Systemic atrophies primarily affecting the central nervous system 0.72 -2.005 2.005 0.00086445407539637
42+
134 153 G81 G81 Hemiplegia -1.41 -2.005 2.005 0.000854050733276268
43+
125 150 G59 G59 Mononeuropathy in diseases classified elsewhere -1.41 -2.005 2.005 0.000836362598940377
44+
7 106 G249 G24.9 Dystonia, unspecified 0.47 0.185 0.765 0.000834494893839244
45+
81 137 G909 G90.9 Disorder of autonomic nervous system, unspecified 0.67 0.165 1.225 0.000822702899519134
46+
117 150 G50 G50 Disorders of trigeminal nerve -1.41 -2.005 2.005 0.000816976737238351
47+
138 154 G91 G91 Hydrocephalus 0.75 -1.825 1.825 0.000746170640519961
48+
36 116 G470 G47.0 Disorders of initiating and maintaining sleep [insomnias] -0.73 -1.475 -0.135 0.000674683660289666
49+
95 140 G959 G95.9 Disease of spinal cord, unspecified -0.5 -1.005 -0.135 0.000658890848241445
50+
54 122 G561 G56.1 Other lesions of median nerve -0.76 -1.645 0.405 0.000575713011717438
51+
66 128 G628 G62.8 Other specified polyneuropathies -0.59 -1.135 -0.125 0.000570474962763634
52+
24 111 G408 G40.8 Other epilepsy -0.76 -1.655 0.465 0.000559654096043638
53+
46 120 G540 G54.0 Brachial plexus disorders -0.71 -1.505 0.485 0.000556171793712701
54+
33 115 G454 G45.4 Transient global amnesia 0.21 -0.575 0.345 0.000513770569295469
55+
92 140 G951 G95.1 Vascular myelopathies -0.46 -1.455 0.585 0.000494513146748532
56+
39 116 G478 G47.8 Other sleep disorders 0.65 -0.495 1.235 0.000465564383440253
57+
31 114 G448 G44.8 Other specified headache syndromes -0.65 -1.395 0.515 0.000447955915259701
58+
72 132 G729 G72.9 Myopathy, unspecified -0.6 -1.305 0.595 0.000429193994891386
59+
131 152 G71 G71 Primary disorders of muscles 0.46 -2.005 2.005 0.000426807487682757
60+
61 124 G589 G58.9 Mononeuropathy, unspecified -0.48 -0.915 -0.0949999999999999 0.000412944027873063
61+
48 121 G550 G55.0 Nerve root and plexus compressions in neoplastic disease 0.61 -0.355 1.185 0.000409502546303453
62+
8 107 G250 G25.0 Essential tremor 0.55 -0.395 1.085 0.00038999180077437
63+
128 151 G62 G62 Other polyneuropathies -0.27 -2.005 2.005 0.000384057713654129
64+
83 138 G919 G91.9 Hydrocephalus, unspecified -0.46 -0.855 -0.115 0.000378519114198395
65+
52 121 G558 G55.8 Nerve root and plexus compressions in other diseases classified elsewhere 0.62 -0.595 1.195 0.000367762671368954
66+
120 150 G54 G54 Nerve root and plexus disorders -0.81 -1.995 1.985 0.000367333725346364
67+
71 131 G711 G71.1 Myotonic disorders 0.51 -0.605 1.065 0.000363083009915055
68+
114 149 G44 G44 Other headache syndromes -0.73 -2.005 1.795 0.000343300560141313
69+
110 148 G37 G37 Other demyelinating diseases of central nervous system 1.42 -2.005 2.005 0.000340501653101954
70+
94 140 G958 G95.8 Other specified diseases of spinal cord -0.42 -1.215 0.555 0.000338073704703512
71+
142 154 G97 G97 Postprocedural disorders of nervous system, not elsewhere classified -0.52 -2.005 2.005 0.00033047652709095
72+
99 142 G978 G97.8 Other postprocedural disorders of nervous system -0.59 -1.305 0.605 0.000323031506899496
73+
9 107 G253 G25.3 Myoclonus -0.6 -1.315 0.575 0.000318732200671135
74+
141 154 G96 G96 Other disorders of central nervous system -1.15 -2.005 2.005 0.000310609185634969
75+
127 151 G61 G61 Inflammatory polyneuropathy 1.42 -2.005 2.005 0.000299935545805097
76+
97 141 G961 G96.1 Disorders of meninges, not elsewhere classified -0.6 -1.295 0.885 0.000295835693993385
77+
91 139 G939 G93.9 Disorder of brain, unspecified -0.52 -1.105 -0.055 0.00029579304048255
78+
148 155 Block G35-G37 G35-G37 Demyelinating diseases of the central nervous system 1.45 -2.005 2.005 0.000291021410194547
79+
152 155 Block G70-G73 G70-G73 Diseases of myoneural junction and muscle -1.34 -2.005 2.005 0.000290161510990372
80+
143 154 G99 G99 Other disorders of nervous system in diseases classified elsewhere -0.19 -2.005 2.005 0.000269951100776877
81+
40 116 G479 G47.9 Sleep disorder, unspecified -0.29 -0.485 -0.115 0.000261572306294644
82+
135 153 G82 G82 Paraplegia and tetraplegia -0.87 -2.005 1.765 0.000259169751043231
83+
113 149 G43 G43 Migraine -1.41 -2.005 2.005 0.000249432773397285
84+
2 103 G049 G04.9 Encephalitis, myelitis and encephalomyelitis, unspecified 0.42 -0.515 0.825 0.000248739049412583
85+
16 110 G373 G37.3 Acute transverse myelitis in demyelinating disease of central nervous system 0.52 -0.745 1.015 0.000242427840888682
86+
70 131 G710 G71.0 Muscular dystrophy 0.43 -0.805 0.885 0.000226294718824849
87+
37 116 G471 G47.1 Disorders of excessive somnolence [hypersomnias] -0.33 -1.165 0.475 0.000223924822222665
88+
93 140 G952 G95.2 Cord compression, unspecified -0.39 -0.915 0.305 0.000220309226897308
89+
140 154 G95 G95 Other diseases of spinal cord -0.39 -1.665 1.535 0.000218203600245048
90+
44 118 G519 G51.9 Disorder of facial nerve, unspecified -0.55 -1.215 0.815 0.00021481403647361
91+
63 126 G600 G60.0 Hereditary motor and sensory neuropathy -0.46 -0.995 0.795 0.000213404890367586
92+
79 137 G900 G90.0 Idiopathic peripheral autonomic neuropathy -0.51 -1.135 0.665 0.000207602199099322
93+
76 135 G822 G82.2 Paraplegia, unspecified 0.44 -0.415 0.865 0.00019582280143049
94+
21 111 G405 G40.5 Special epileptic syndromes 0.53 -0.775 1.035 0.000194574087092336
95+
26 112 G419 G41.9 Status epilepticus, unspecified 0.43 -0.775 0.845 0.000190931888131685
96+
77 135 G825 G82.5 Tetraplegia, unspecified 0.41 -0.905 0.855 0.000180419745149707
97+
47 120 G549 G54.9 Nerve root and plexus disorder, unspecified 0.43 -0.445 0.845 0.000178243270965051
98+
65 127 G618 G61.8 Other inflammatory polyneuropathies 0.46 -0.735 0.905 0.000177774065333591
99+
137 154 G90 G90 Disorders of autonomic nervous system 0.43 -1.815 1.805 0.000175236742529394
100+
146 155 Block G20-G26 G20-G26 Extrapyramidal and movement disorders 0.46 -2.005 2.005 0.000173861535291864
101+
107 146 G25 G25 Other extrapyramidal and movement disorders 0.38 -1.825 1.825 0.000171860428007764
102+
4 105 G122 G12.2 Motor neuron disease 0.38 -0.495 0.745 0.000165747359920587
103+
80 137 G902 G90.2 Horner's syndrome -0.46 -1.015 0.605 0.000162086503121217
104+
57 123 G571 G57.1 Meralgia paraesthetica 0.47 -0.565 0.915 0.000158205772825104
105+
14 109 G319 G31.9 Degenerative disease of nervous system, unspecified 0.37 -0.365 0.685 0.000150335013167746
106+
86 139 G932 G93.2 Benign intracranial hypertension -0.39 -0.935 0.575 0.00013964403328337
107+
98 142 G971 G97.1 Other reaction to spinal and lumbar puncture 0.37 -0.825 0.735 0.000136102659707316
108+
43 118 G513 G51.3 Clonic hemifacial spasm 0.4 -0.935 0.775 0.000131116911223139
109+
10 107 G258 G25.8 Other specified extrapyramidal and movement disorders -0.41 -0.895 0.495 0.000127169539491878
110+
153 155 Block G80-G83 G80-G83 Cerebral palsy and other paralytic syndromes -0.0700000000000001 -2.005 2.005 0.00012414968005281
111+
100 143 G990 G99.0 Autonomic neuropathy in endocrine and metabolic diseases 0.41 -0.695 0.795 0.000119017952901368
112+
73 133 G809 G80.9 Infantile cerebral palsy, unspecified 0.37 -0.485 0.725 0.000118466054245592
113+
151 155 Block G60-G64 G60-G64 Polyneuropathies and other disorders of the peripheral nervous system -0.0700000000000001 -2.005 2.005 0.000108248285658141
114+
118 150 G51 G51 Facial nerve disorders -0.0700000000000001 -1.975 1.975 0.000104802314170982
115+
139 154 G93 G93 Other disorders of brain -0.22 -1.155 -0.035 0.000104785121701645
116+
56 122 G568 G56.8 Other mononeuropathies of upper limb 0.41 -0.815 0.805 0.000100471873156205
117+
90 139 G938 G93.8 Other specified disorders of brain -0.24 -0.735 0.655 9.9575366963589e-05
118+
51 121 G553 G55.3 Nerve root and plexus compressions in other dorsopathies -0.14 -0.825 0.345 9.00106290445679e-05
119+
123 150 G57 G57 Mononeuropathies of lower limb -0.0700000000000001 -2.005 2.005 8.98348561571005e-05
120+
69 130 G700 G70.0 Myasthenia gravis -0.34 -0.735 0.475 8.89701299234824e-05
121+
20 111 G403 G40.3 Generalised idiopathic epilepsy and epileptic syndromes 0.31 0.0750000000000001 0.545 8.74395116287063e-05
122+
96 141 G960 G96.0 Cerebrospinal fluid leak 0.33 -0.485 0.655 8.24221438960882e-05
123+
27 113 G431 G43.1 Migraine with aura [classical migraine] -0.38 -0.815 0.405 8.00199848286498e-05
124+
67 128 G629 G62.9 Polyneuropathy, unspecified -0.25 -0.455 -0.055 7.62166112989737e-05
125+
62 125 G590 G59.0 Diabetic mononeuropathy -0.34 -0.725 0.415 7.48523022672254e-05
126+
78 136 G834 G83.4 Cauda equina syndrome 0.29 -0.615 0.575 6.85993600468837e-05
127+
64 127 G610 G61.0 Guillain-Barre syndrome -0.28 -0.675 0.495 6.64309235895999e-05
128+
49 121 G551 G55.1 Nerve root and plexus compressions in intervertebral disk disorders -0.15 -0.245 -0.045 6.24200945659181e-05
129+
116 149 G47 G47 Sleep disorders -0.27 -1.405 1.065 6.14012552019316e-05
130+
68 129 G632 G63.2 Diabetic polyneuropathy 0.29 -0.395 0.565 5.85233726082546e-05
131+
59 123 G578 G57.8 Other mononeuropathies of lower limb -0.0800000000000001 -0.635 0.575 5.45820212368708e-05
132+
17 110 G379 G37.9 Demyelinating disease of central nervous system, unspecified 0.26 -0.585 0.505 5.24131638048875e-05
133+
101 143 G992 G99.2 Myelopathy in diseases classified elsewhere -0.21 -0.425 -0.045 4.85738451150297e-05
134+
121 150 G55 G55 Nerve root and plexus compressions in diseases classified elsewhere -0.13 -1.705 1.705 3.87263062819887e-05
135+
122 150 G56 G56 Mononeuropathies of upper limb -0.0700000000000001 -2.005 2.005 3.73346558036891e-05
136+
19 111 G402 G40.2 Localisation-related (focal) (partial) symptomatic epilepsy and epileptic syndromes with complex partial seizures 0.19 -0.605 0.495 3.61863731317413e-05
137+
42 118 G510 G51.0 Bell's palsy -0.23 -0.485 0.135 3.46023574649967e-05
138+
30 114 G442 G44.2 Tension-type headache 0.19 -0.455 0.425 3.41413542279678e-05
139+
50 121 G552 G55.2 Nerve root and plexus compressions in spondylosis -0.13 -0.475 0.305 3.32952727255531e-05
140+
87 139 G933 G93.3 Postviral fatigue syndrome -0.19 -0.445 0.215 3.24123488367745e-05
141+
22 111 G406 G40.6 Grand mal seizures, unspecified (with or without petit mal) 0.2 -0.415 0.525 3.01798103196083e-05
142+
149 155 Block G40-G47 G40-G47 Episodic and paroxysmal disorders 0.2 -1.635 1.515 2.92719366370431e-05
143+
41 117 G500 G50.0 Trigeminal neuralgia 0.23 -0.375 0.445 2.89778372735139e-05
144+
154 155 Block G90-G99 G90-G99 Other disorders of the nervous system -0.17 -0.645 0.655 2.45477474891675e-05
145+
58 123 G576 G57.6 Lesion of plantar nerve -0.15 -0.335 -0.025 2.36474336007264e-05
146+
111 149 G40 G40 Epilepsy 0.17 -1.095 0.305 1.57467605051975e-05
147+
15 148 G35 G35 Multiple sclerosis -0.14 -0.295 -0.025 1.52420807739695e-05
148+
5 146 G20 G20 Parkinson's disease 0.16 -0.285 0.315 1.25378485279493e-05
149+
150 155 Block G50-G59 G50-G59 Nerve, nerve root and plexus disorders -0.0700000000000001 -0.695 0.325 1.13686538936175e-05
150+
155 0 Chapter VI Chapter VI Diseases of the nervous system -0.0700000000000001 -0.195 1.765 1.0329171903134e-05
151+
55 122 G562 G56.2 Lesion of ulnar nerve -0.0700000000000001 -0.255 0.185 7.14410656565967e-06
152+
28 113 G439 G43.9 Migraine, unspecified -0.0800000000000001 -0.245 0.105 6.83019184055667e-06
153+
74 134 G819 G81.9 Hemiplegia, unspecified 0.12 -0.165 0.235 5.67873984846923e-06
154+
53 122 G560 G56.0 Carpal tunnel syndrome -0.0600000000000001 -0.105 -0.025 4.20722235827675e-06
155+
38 116 G473 G47.3 Sleep apnoea -0.0700000000000001 -0.165 0.0650000000000001 3.27730185001318e-06
156+
25 111 G409 G40.9 Epilepsy, unspecified 0.0899999999999999 -0.105 0.155 2.19959216374299e-06

test_grs.res_TreeWAS_results_BF.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
27.078835091622

treewas2.0_example.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ library(TreeWASStruct)
66
# load data
77
HES.data <- load.HES.lk.data()
88
pars <- load.pars()
9-
9+
t = pars$tree
1010
data <- HES.data$d
1111
res <- HES.data$res
1212

13-
snp <- "rs4420638"
13+
HES.data$d[1]
14+
15+
snp <- "rs58542926"
1416
SNP.IDX <- which(res$SNP %in% snp)
1517

1618
## Calculate the evidence that the SNP is
@@ -20,6 +22,8 @@ lBF <- calc.lBF(
2022
pars = pars,
2123
data.sub = data[SNP.IDX,,]
2224
)
25+
26+
2327
cat("The Tree BF is ",round(lBF,2), "\n")
2428

2529
## Calculate the risk profile across the
@@ -29,6 +33,7 @@ pp <- marginal.posterior.profile(
2933
data.sub = data[SNP.IDX,,]
3034
)
3135

36+
3237
## visualise the results. Return a plotly
3338
treePlot <- drawTree(
3439
tree = pars$tree,

0 commit comments

Comments
 (0)