jmanitz / kangar00

development of kangar00
https://cran.r-project.org/package=kangar00
2 stars 0 forks source link

write dispatch for save/load GWASdata object #6

Closed jmanitz closed 8 years ago

jmanitz commented 9 years ago

write a dispatch for load(GWASdata) that includes attach(big.matrix) to make backedfile data available in the current workspace

hofnerb commented 9 years ago

Just an idea:

To load GWASdata via load() we could consider to store the path of the bigmemory file as additional slot or attribute to the R object and use this path to load the data via attach.big.matrix(). Additionally, one could allow the user to give a user-specified path to some function (or similar) load(GWASdata = , path = ) which is defined for GWASdata objects.

jmanitz commented 9 years ago

Benjamin wrote (E-Mail 10/08/2015):

In ?read.big.matrix steht:

binarydescriptor: the flag to specify if the binary RDS format should be used for the backingfile description, for subsequent use with ‘attach.big.matrix’; if ‘NULL’ of ‘FALSE’, the ‘dput()’ file format is used.

Das ist der Trick.

a <- read_geno(file.path = "geno.null.txt")

hier kann man auch R neu starten:

library("bigmemory") geno <- attach.big.matrix("geno.null.txt.bin.desc")

Wir sollten also A) ein descriptor-file angeben (sonst kommt eine Warning) und B) wir können jetzt eine Funktion schreiben, die existierende big.matrix files läd.

patriciaburger commented 8 years ago

read.big.matrix isn't used anymore.