import_sumstats {MungeSumstats} | R Documentation |
Requires internet access to run.
import_sumstats( ids, vcf_dir = tempdir(), vcf_download = TRUE, save_dir = tempdir(), write_vcf = FALSE, download_method = "download.file", quiet = TRUE, force_new_vcf = FALSE, nThread = 1, parallel_across_ids = FALSE, ... )
ids |
List of Open GWAS study IDs
(e.g. |
vcf_dir |
Where to download the original VCF from Open GWAS.
WARNING: This is set to |
vcf_download |
Download the original VCF from Open GWAS. |
save_dir |
Directory to save formatted summary statistics in. |
write_vcf |
Whether to write as VCF (TRUE) or tabular file (FALSE). |
download_method |
|
quiet |
Run quietly. |
force_new_vcf |
Overwrite a previously downloaded VCF with the same path name. |
nThread |
Number of threads to use for parallel processes. |
parallel_across_ids |
If |
... |
Additional arguments passed to format_sumstats. |
Either a named list of data objects or paths,
depending on the arguments passed to format_sumstats
.
#only run the examples if user has internet access: if(try(is.character(getURL("www.google.com")))==TRUE){ ### Search by criteria metagwas <- find_sumstats( traits = c("parkinson", "alzheimer"), min_sample_size = 5000 ) ### Only use a subset for testing purposes ids <- (dplyr::arrange(metagwas, nsnp))$id ### Default usage ## You can supply \code{import_sumstats()} ## with a list of as many OpenGWAS IDs as you want, ## but we'll just give one to save time. ## Call uses reference genome as default with more than 2GB of memory, ## which is more than what 32-bit Windows can handle so remove certain checks ## commented out down to runtime # datasets <- import_sumstats(ids = ids[1]) }