Reports the Python a Local Source uses and how it was chosen, the reticulate and ogquery
versions, the format series ogquery reads, and, for each path, the Store Release found there
(for a GWAS Store directory, the one it resolved to), its store_id, release_id and
format_version, and whether ogquery can read it. It reports problems instead
of raising them, so it is the place to start when og_local() refuses: only a path that
isn't a character vector of paths, or a Local Source, is an error.
Arguments
- path
The directory of each GWAS Store or Store Release, as for
og_local(), or a Local Source.
Value
An og_local_check: a list with
python(the Python's path) andchosen_by(how it was chosen, as forog_local()'s errors:"RETICULATE_PYTHON","use_python","automatic", ...);reticulateandogquery, their versions (ogqueryis the one found, even when opengwasr doesn't support it);ogquery_required, the ogquery versions opengwasr supports (">=0.1.0,<1"), andogquery_in_range, whether the ogquery found is one of them (NAwhen none is found);reads, the format series ogquery reads, such as"0.3"(any 0.3.x);releases, a data frame with one row per path:path(as given),release_path(the Store Release directory it resolved to: itself for a Store Release directory, the one a GWAS Store directory holds, orNAwhen it holds none or several, or the path doesn't exist or isn't a directory),store_id,release_id,format_version,readable,problem(NA,"not_release","several","format"or"unavailable") andreason;duplicates, the GWAS Stores given more than one Store Release;unavailable, theopengwasr_local_unavailableconditionog_local()would raise, orNULL;problems, all of that as sentences, for printing;ld, the Local Source's PLINK Reference (asog_ld_resource()gives it), orNULL(paths given, or none).
Missing values are NA. An LD-only Local Source (og_local(bfile = )) has no Store Releases,
so no Python is looked for: releases has no rows, python, ogquery and reads are NA, and
it reports its PLINK Reference (its fileset, and the PLINK binary and version).
Details
Like og_local(), it finds Python on first use, so it sets Python up automatically when you
haven't chosen one.
Examples
stores <- system.file("stores", package = "opengwasr")
og_local_check(file.path(stores, c("dense", "hyb")))
#> <og_local_check>
#> Python: /opt/hostedtoolcache/Python/3.13.18/x64/bin/python (chosen by RETICULATE_PYTHON)
#> reticulate: 1.47.0
#> ogquery: 0.4.0, reads format 0.3.x
#>
#> Store Releases:
#> /home/runner/work/_temp/Library/opengwasr/stores/dense
#> resolved to /home/runner/work/_temp/Library/opengwasr/stores/dense/r
#> s/r, format 0.3.0: readable
#> /home/runner/work/_temp/Library/opengwasr/stores/hyb
#> not readable: 2 Store Releases one level down (hyb/v1 in v1, hyb/v1-completed in v1c); a GWAS Store directory holds one