ld_clump(), ld_clump_local(),
ld_matrix() and ld_matrix_local() gain
threads and memory arguments, passed to plink
as --threads and --memory. Without
--memory plink reserves half of the system’s RAM, so
several local clumping or LD matrix jobs run at once could exhaust
memory. The default, NULL, keeps the previous behaviour
(thanks, @rmgpanw,
#41).ld_matrix_local() now reads the alleles in the
.bim file as character. Previously a column of all
T alleles was read as logical, so the row and column names
contained TRUE instead of T (#38).ld_clump_local(), and so ld_clump() with a
local bfile, no longer errors with “cannot open the
connection” when plink writes no .clumped file. If no
variants pass clumping it now returns no rows with a message, and if
plink fails it gives an informative error including the end of the plink
log (#30, #34, #44).ld_clump(), ld_clump_local(),
ld_matrix() and ld_matrix_local() gain a
tmpdir argument, the directory in which the temporary files
used by plink are written. The default, tempdir(), keeps
the previous behaviour (#37).ld_matrix_local() now removes its temporary plink files
when it exits.ld_clump() now warns if several variants share the
smallest p-value, e.g. because p-values smaller than R can represent
underflow to 0, or because other software has capped them. Plink then
chooses the lead variant among them arbitrarily. The warning suggests
lowering any cap, e.g. setting min_pval = 1e-300 in
TwoSampleMR::format_data() (#39).associations() now converts n to numeric
in each chunk of results before combining them. Previously, when
querying many ids or variants, it could fail with “Can’t combine
..1$n ..2$n n was missing for some datasets (#171).associations() now returns the processed tibble.
Previously its ... %>% return() inside a pipe did not
return from the function (since magrittr 2.0), so the raw server data
frame was returned instead, with n as character.beta for ukb-e
datasets in associations(), tophits() and
phewas(). The flip was never applied in
associations() (see above), and the OpenGWAS server is the
right place to correct these datasets.%>% return() with explicit
return() calls throughout.ld_clump()... to api_query() in
variants_chrpos()associations()NULL opengwas_jwt in
api_query()afl2_list() hapmap3 branchfill_n() against empty or multi-row
gwasinfo() resultsgetOption() instead of copying the full options
listassociations()seq_along()/seq_len() instead of
1:length() loop boundsld_clump_api() defaults with its
documentationget_query_content() error path robust to non-JSON
bodiestophits() (closes #76)origin to as.POSIXct() in allowance
reset handling (closes #103)ld_clump() (thanks @DarwinAwardWinner).ld_clump() and ld_matrix() now search for
the plink binary as documented (thanks @DarwinAwardWinner).gwasinfo_files() helpfile.api_query() (thanks @Gaoyan152)..gz files for each super-population and divided by
chromosomes.ieugwasr::tophits() and
ieugwasr::associations().Adding messaging about package version
Adding messaging about OpenGWAS # ieugwasr 0.1.5
Added options to perform LD functions on different super-populations
Catching 503 error codes and retrying up to 5 times. This should help avoid fails when the server is busy.
NEWS.md file to track changes to the
package.