-
Notifications
You must be signed in to change notification settings - Fork 5
/
QCGWAS.R
executable file
·56 lines (52 loc) · 1.76 KB
/
QCGWAS.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 21-3-2019 JHZ
library(QCGWAS)
prot <- Sys.getenv("protein")
src <- "INTERVAL"
src_in <- paste(src, prot, "gz", sep=".")
src_out <- paste(src, prot, sep=".")
STANLEY <- paste0("STANLEY_",c("lah1.","swe6."),prot)
studies <- c("BioFinder", "EGCUT", "INTERVAL", "KORA", "MadCam", "NSPHS", "ORCADES", "RECOMBINE", "STABILITY", "VIS")
QC_in <- c(paste(studies, prot, "gz", sep="."), paste0(STANLEY,".gz"))
QC_out <- c(paste(studies, prot, sep="."), STANLEY)
header_translations <- read.delim("tryggve/header_translations.tsv",as.is=TRUE)
src_qc <- QC_GWAS(src_in,
filename_output = src_out,
dir_data = "sumstats/work",
dir_output = paste0("work/",prot),
dir_references = "/data/jinhua/data/1KG",
header_translations = header_translations,
save_final_dataset = FALSE,
HQfilter_FRQ = 0.01,
HQfilter_imp = 0.3,
QQfilter_FRQ = c(NA, 0.01, 0.03, 0.05, 3),
QQfilter_imp = c(NA, 0.3, 0.5, 0.7, 0.9),
NAfilter = TRUE,
allele_ref_std = "1KGp3v5.RData",
allele_name_std = "1000G",
remove_mismatches = TRUE,
allele_ref_alt = NULL,
allele_name_alt = "alternative",
update_alt = TRUE,
update_savename = "ref_alternative",
update_as_rdata = TRUE)
src_qc
QC_series(data_files = QC_in,
dir_data = "sumstats/work",
dir_output = paste0("work/",prot),
dir_references = "/data/jinhua/data/1KG",
output_filenames = QC_out,
header_translations = header_translations,
save_final_dataset = FALSE,
HQfilter_FRQ = 0.01,
HQfilter_imp = 0.3,
QQfilter_FRQ = c(NA, 0.01, 0.03, 0.05, 3),
QQfilter_imp = c(NA, 0.3, 0.5, 0.7, 0.9),
NAfilter = TRUE,
allele_ref_std = "1KGp3v5.RData",
allele_name_std = "1000G",
remove_mismatches = TRUE,
allele_ref_alt = "ref_alternative.RData",
allele_name_alt = "alternative",
update_alt = TRUE,
update_savename = "ref_alternative",
update_as_rdata = TRUE)