We want to add support for reading crosses from LMDB. Currently, R/qtl2 (https://kbroman.org/qtl2/) only supports reading from CSV files.
You can find the `lmdb_matrix.py` script here:
guix shell python-click python-lmdb python-wrapper python-numpy -- \
python lmdb_matrix.py import-genotype \
<path-to-genotype-file> <path-to-lmdb-store>
The script can be found here:
You need to provide a cross file path. The currently supported formats are JSON and YAML.
Example:
guix shell python-click python-lmdb python-wrapper python-pyyaml -- \
python dump_metadata.py dump-cross [LMDB_PATH] [CROSS_FILE_PATH] --file-format yaml/json
# Example
python dump_metadata.py dump-cross "./test_lmdb_data" "./cross_file.json"
The script `rqtl_lmdb_adapter.r` can be found here:
guix shell r r-thor r-rjson r-qtl2 -- \
Rscript [PATH_TO_ADAPTER_SCRIPT] [LMDB_PATH]
# Example
Rscript https://github.com/genenetwork/genenetwork3/pull/235/files ./lmdb_path
cross <- read_lmdb_cross(LMDB_DB_PATH)
summary(cross)
cat("Is this cross okay", check_cross2(cross), "\n")
warnings() # enable warnings for the debug purposes only!
pr <- calc_genoprob(cross)
out <- scan1(pr, cross$pheno, cores=4)
par(mar=c(5.1, 4.1, 1.1, 1.1))
ymx <- maxlod(out)
plot(out, cross$gmap, lodcolumn=1, col="slateblue") # test generating of qtl plots