-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cf_append_cols HDF5-DIAG error #346
Comments
It seems I have to do a deep copy using realize_view: ` cf_append_cols(pop2Dat, mm) exprs(popDat) works. B |
Correct, |
@baj12 , your issue actually exposed an issue with read-only protection of cytoframes with on-disk backends, so thanks for that. That is fixed by RGLab/cytolib@5afbec8, so now your example will appropriately be blocked from modifying the data in
You are right that to append columns to a cytoframe, you will have to do one of two things:
Here is an example of how to use the second approach
|
This seems to work with a cytoset/cytoframe, but what about the GatingSet and GatingHierachy?
Maybe to understand better what I really want, here my two problems:
Thus, I believe I need to work with gatingSet/GatingHierachie and not with the cytoset/frame classes. Funny enough, when I use lapply, I don't get an error message, but when trying to access the data I get the following error:
(this is all with cytolib_2.1.18 (master, downloaded a few hours after your patch) |
Just pointing out that you can bypass the need for exporting to flowJo if you use CytoExploreR to do your manual gating: https://dillonhammill.github.io/CytoExploreR/ |
@baj12 , first, you are right about the
If you want to remove the read-only lock on the
If you want to avoid this entirely, you can pass the |
Regarding the lack of error when using |
Trying to bypass it with
|
Here is my min. example:
|
I see, so the error is not coming from appending columns to a |
@jacobpwagner, just wanted to confirm whether the following operations are equivalent (i.e.
Oh I see, looks like we should use |
Yes, they are equivalent. And |
Thanks @mikejiang, just wanted to make sure whether unlocking the |
gs tree structure is not controlled by cs lock. And since gs itself is not disk based, so it is safe to do any mutable operations to it unless you explicitly sync to disk by |
Thanks for the clarification @mikejiang. |
Thanks for the effort you put into this. My first problem of adding a new data column to a GatingSet can be "solved" like this:
Kind of defeats the purpose of the gating set, but I am not modifying the original data, I still get the plots I want to get. |
@baj12, just FYI, for the purposes of just getting indices for each row/event, there are already
For adding a column labeling by cluster assignment from FlowSOM, you'll probably just have to make sure every row in the underlying |
gh_pop_set_indices modifies an existing population. I am not allowed to create one. |
@baj12 . First, my apologies, I found and patched one other issue, so please re-install By pointing to
With output included:
This workaround is necessary because each
I should also mention that you could just make a copy of the
That way you can use the |
@baj12 , with b48c882 I added a guard to force the user to explicitly call
will need to change to this
|
problem:
`
library(flowWorkspace)
path <- system.file("extdata",package="flowWorkspaceData")
gs_path <- list.files(path, pattern = "gs_manual",full = TRUE)
gs <- load_gs(gs_path)
popDat = gh_pop_get_data(gs[[1]], "CD3+")
dat = exprs(popDat)
mm = matrix(ncol=1, 1:nrow(popDat), dimnames = list(NULL,"idx"))
cf_append_cols(popDat, mm)
dat2 = exprs(popDat)
`
=>
`
HDF5-DIAG: Error detected in HDF5 (1.10.6) thread 0:
#000: H5Dio.c line 185 in H5Dread(): could not get a validated dataspace from file_space_id
major: Invalid arguments to routine
minor: Bad value
#1: H5S.c line 255 in H5S_get_validated_dataspace(): selection + offset not within extent
major: Dataspace
minor: Out of range
Error in cf_getData(object@pointer) : c++ exception (unknown reason)
`
sessionInfo:
`
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggcyto_1.16.0 ncdfFlow_2.34.0 BH_1.72.0-3 RcppArmadillo_0.9.900.2.0 flowCore_2.1.2
[6] ggplot2_3.3.2 CytoML_2.1.11 flowWorkspace_4.1.9
loaded via a namespace (and not attached):
[1] tidyselect_1.1.0 xfun_0.16 purrr_0.3.4 lattice_0.20-41 colorspace_1.4-1 vctrs_0.3.4
[7] generics_0.0.2 stats4_4.0.2 yaml_2.2.1 base64enc_0.1-3 XML_3.99-0.5 RBGL_1.64.0
[13] rlang_0.4.7 hexbin_1.28.1 pillar_1.4.6 withr_2.2.0 glue_1.4.2 aws.s3_0.3.21
[19] Rgraphviz_2.32.0 BiocGenerics_0.34.0 RColorBrewer_1.1-2 matrixStats_0.56.0 jpeg_0.1-8.1 lifecycle_0.2.0
[25] plyr_1.8.6 zlibbioc_1.34.0 RProtoBufLib_2.1.0 munsell_0.5.0 gtable_0.3.0 cytolib_2.1.18
[31] latticeExtra_0.6-29 Biobase_2.48.0 knitr_1.29 parallel_4.0.2 curl_4.3 Rcpp_1.0.5
[37] scales_1.1.1 S4Vectors_0.26.1 jsonlite_1.7.0 RcppParallel_5.0.2 graph_1.66.0 gridExtra_2.3
[43] png_0.1-7 digest_0.6.25 dplyr_1.0.2 grid_4.0.2 tools_4.0.2 magrittr_1.5
[49] tibble_3.0.3 crayon_1.3.4 aws.signature_0.6.0 pkgconfig_2.0.3 ellipsis_0.3.1 data.table_1.13.0
[55] xml2_1.3.2 httr_1.4.2 rstudioapi_0.11 R6_2.4.1 compiler_4.0.2
`
Description:
I am in the process of my old R code around FlowSOM to work with flowWorkspace and the other packages that you guys are developing. So this is probably the first of many such messages.
The data I am looking at has a big gap in the time axis, which creates a "hole" in the plots. I would like to create a new column with simply the index of the rows (ordered by the time variable if possible). To do so I wanted to add a column using cf_append_cols but then I ran into the problem above. I.e. I am creating a simple matrix and would like to add it, pretty much the same way it is described in the Help example.
Any help is very much appreciated.
Best,
Bernd
The text was updated successfully, but these errors were encountered: