Closed jmanitz closed 8 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.
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.
read.big.matrix isn't used anymore.
write a dispatch for load(GWASdata) that includes attach(big.matrix) to make backedfile data available in the current workspace