Skip to content

Commit

Permalink
make loadFraserDataSet compatible with really old versions of FRASER
Browse files Browse the repository at this point in the history
  • Loading branch information
AtaJadidAhari committed Jan 15, 2025
1 parent ee6f279 commit 6bff84e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions R/saveHDF5Objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,16 @@ loadFraserDataSet <- function(dir, name=NULL, file=NULL, upgrade=FALSE){
path(assay(fds, aname, withDimnames=FALSE)) <- afile
} else if("DelayedMatrix" ==
class(assay(fds, aname, withDimnames=FALSE))){
slot(slot(slot(assay(fds, aname, withDimnames=FALSE),
"seed"), "seed"), "filepath") <- afile
tryCatch(
{
slot(slot(slot(assay(fds, aname, withDimnames=FALSE),
"seed"), "seed"), "filepath") <- afile
},
error = function(e) {
slot(slot(slot(slot(assay(fds, aname, withDimnames = FALSE),
"seed"), "seed"), "seed"), "filepath") <- afile
}
)
# if its a HDF5 matrix we have one seed less
} else {
slot(slot(assay(fds, aname, withDimnames=FALSE),
Expand Down

0 comments on commit 6bff84e

Please sign in to comment.