1 CalculationFDR_Script
M.E. Ketelaar edited this page 2020-02-17 19:39:03 +00:00

#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)