View source: R/import_sumstats.R
import_sumstats | 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 = FALSE,
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 |
If a formatted file of the same names as |
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 |
... |
Arguments passed on to
|
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])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.