RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
44 stars 21 forks source link

Issue with logtGml2_trans and custom transformations #370

Open yannabraham opened 2 years ago

yannabraham commented 2 years ago

When working with an experiment containing a channel transformed with logtGml2_trans, I can save the GatingSet with save_gs but using load_gs triggers the following error:

Error in .cpp_loadGatingSet(path, backend_readonly, select.sn, verbose,  : 
  unknown type of transformation archive!

Here is a reproducible example:

library(flowWorkspace)
data(GvHD,package = "flowCore")

gs <- GatingSet(GvHD[1:4])

transList <- transformerList(c("FL1-H","FL2-H"),
                              list(asinhtGml2_trans(),
                                   logtGml2_trans()))

gs <- transform(gs,transList

gh_get_transformations(gs[[1]])

temp.dir <- file.path(tempdir(),"gmlTrans")

save_gs(gs,temp.dir,backend_opt = "move")
## the following command triggers an error
res <- load_gs(temp.dir)
mikejiang commented 2 years ago

Thank you for reporting the error, I pushed the fix, it should work now. The fix is also merged into bioconductor the current release and development branch which will appear in one or two days