parent
2b14b008cf
commit
082c3868be
|
@ -0,0 +1,24 @@
|
||||||
|
#This script belongs to the paper of Ketelaar, Portelli, Dijk et al.
|
||||||
|
#Entitled 'Phenotypic and functional translation of IL33 genetics in asthma', submitted to JACI
|
||||||
|
|
||||||
|
#Below example scripts for calculation of FDR of the results of the association analyses using R statistics
|
||||||
|
#Core Team R. R: A language and environment for statistical computing. 2013; Available at: http://www.R-project.org/.
|
||||||
|
|
||||||
|
|
||||||
|
# make a list of the files containing association results
|
||||||
|
fdrfiles = list.files(pattern = "*.txt")
|
||||||
|
p="P"
|
||||||
|
names=fdrfiles
|
||||||
|
|
||||||
|
for(file in fdrfiles){
|
||||||
|
# read-in file
|
||||||
|
contents = read.csv(file, sep = "\t", stringsAsFactors = FALSE, header = TRUE)
|
||||||
|
|
||||||
|
|
||||||
|
# calculate fdr
|
||||||
|
contents[,11] = p.adjust(p, "fdr", n=length(p))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Write contents/results to a file:
|
||||||
|
write.table(contents, file = names)
|
Loading…
Reference in New Issue