An example results file after running finemap_loci
on all Parkinson's disease (PD)-associated loci.
(NOTE : Formerly merged_DT
)
get_Nalls2019_merged()
data.table
SNP RSID
Chromosome
Genomic position (in basepairs)
Optional: extra columns
Data originally comes from the PD GWAS by Nalls et al. (The Lancet Neurology).
if (FALSE) {
library(dplyr)
local_files <- echodata::portal_query(phenotypes = "parkinson",
file_types = "multi_finemap",
LD_panels = "UKB",
nThread = 10, overwrite=TRUE)
Nalls2019_merged <- lapply(local_files, function(x){
message(x)
if(file.exists(x) && file.size(x)>0){
dat <- data.table::fread(x)
dat <- update_cols(dat)
dat <- find_consensus_snps(dat=dat)
dat <- assign_lead_snp(dat)
return(dat)
}else {return(NULL)}
}) %>% data.table::rbindlist(fill = TRUE)
#### piggyback ####
tmp <- file.path(tempdir(),"Nalls2019_merged.tsv.gz")
data.table::fwrite(Nalls2019_merged,tmp,sep="\t")
piggyback::pb_upload(file = tmp,
repo = "RajLabMSSM/echodata")
}