get_genome_builds {MungeSumstats} | R Documentation |
Infers the genome build of summary statistics files (GRCh37 or GRCh38) from the data. Uses SNP (RSID) & CHR & BP to get genome build.
get_genome_builds( sumstats_list, header_only = TRUE, sampled_snps = 10000, names_from_paths = FALSE, nThread = 1 )
sumstats_list |
A named list of paths to summary statistics,
or a named list of |
header_only |
Instead of reading in the entire |
sampled_snps |
Downsample the number of SNPs used when inferring genome build to save time. |
names_from_paths |
Infer the name of each item in |
nThread |
Number of threads to use for parallel processes. |
Iterative version of get_genome_build
.
ref_genome the genome build of the data
# Pass path to Educational Attainment Okbay sumstat file to a temp directory eduAttainOkbayPth <- system.file("extdata", "eduAttainOkbay.txt", package = "MungeSumstats" ) sumstats_list <- list(ss1 = eduAttainOkbayPth, ss2 = eduAttainOkbayPth) ## 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 is_32bit_windows <- .Platform$OS.type == "windows" && .Platform$r_arch == "i386" if (!is_32bit_windows) { #multiple sumstats can be passed at once to get all their genome builds: #ref_genomes <- get_genome_builds(sumstats_list = sumstats_list) #just passing first here for speed sumstats_list_quick <- list(ss1 = eduAttainOkbayPth) ref_genomes <- get_genome_builds(sumstats_list = sumstats_list_quick) }