RadPheWAS: RadPheWAS package - Just trying to make an example.

Usage Arguments Examples

Usage

1
RadPheWAS-package(x)

Arguments

x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#Load the PheWAS package
library(RadPheWAS)
#Set the random seed so it is replicable
set.seed(1)
#Generate some example data
ex=generate_example()
#Extract the two parts from the returned list
id.icd9.count=ex$id.icd9.count
genotypes=ex$genotypes
#Create the PheWAS code table- translates the icd9s, adds
#exclusions, and reshapes to a wide format
phenotypes=create_phewas_table(id.icd9.count)
#Run the PheWAS
results=phewas(phenotypes,genotypes,cores=1,
  significance.threshold=c("bonferroni"))
#Plot the results
phewasManhattan(results, annotate.angle=0,
  title="My Example PheWAS Manhattan Plot")
#Add PheWAS descriptions
results_d=addPhewasDescription(results)
#List the significant results
results_d[results_d$bonferroni&!is.na(results_d$p),]
#List the top 10 results
results_d[order(results_d$p)[1:10],]

ekawaler/RadPheWAS documentation built on May 16, 2019, 2:24 a.m.