-
Notifications
You must be signed in to change notification settings - Fork 20
Description
READ THIS BEFORE YOU OPEN AN ISSUE
ASK YOURSELF THESE QUESTIONS
-
Do you understand your error message? Yes.
-
Have you read the documentation? Yes.
-
Have you searched existing closed issues? Yes.
-
Have you searched the Bioconductor support site? Yes.
-
Are your packages up to date? No. However, looking at the current source code and tracing back, I do not believe it is fixed.
Describe the bug
A pData<- assignment to a cytoset cannot take a data.frame with unnamed rows.
To Reproduce
I apologize: I do not currently have the bandwidth to reprex. I can provide an example, but there needs to be at least one FCS file for it to be reproduced:
METADATA <- tribble(
~filename, ~dummy,
"workspace/20250404-FCS-endocytosis-assay-2/Experiment 90_B1 3.fcs", "A") %>%
as.data.frame() %>%
AnnotatedDataFrame()
load_cytoset_from_fcs(
phenoData=METADATA, file_col_name="filename")This produces an error,
Error: Invalid input type, expected 'character' actual 'integer'
The traceback is,
> traceback()
4: set_pheno_data(object@pointer, value)
3: `pData<-`(`*tmp*`, value = pd)
2: `pData<-`(`*tmp*`, value = pd)
1: load_cytoset_from_fcs(phenoData = METADATA, file_col_name = "filename")
Expected behavior
Because load_cytoset_from_fcs does not specify that the phenoData must have named pData rows, I expect there to be no error.
Setting row names for the pData fixes this.
METADATA <- tribble(
~filename, ~sample,
"workspace/20250404-FCS-endocytosis-assay-2/Experiment 90_B1 3.fcs", "B1 3") %>%
as.data.frame() %>%
AnnotatedDataFrame()
row.names(pData(METADATA)) <- METADATA$sample
load_cytoset_from_fcs(
phenoData=METADATA, file_col_name="filename",
)Screenshots
If applicable, add screenshots to help explain your problem.
SessionInfo:
> sessionInfo()
R version 4.4.3 (2025-02-28)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Biobase_2.66.0 BiocGenerics_0.52.0 shiny_1.10.0
[4] lubridate_1.9.4 forcats_1.0.0 stringr_1.5.1
[7] dplyr_1.1.4 purrr_1.0.4 readr_2.1.5
[10] tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1
[13] tidyverse_2.0.0 CytoExploreR_1.1.0 openCyto_2.18.0
[16] flowWorkspace_4.18.1 flowCore_2.18.0
loaded via a namespace (and not attached):
[1] changepoint_2.3 tidyselect_1.2.1 fastmap_1.2.0
[4] EmbedSOM_2.2 promises_1.3.2 XML_3.99-0.18
[7] digest_0.6.37 rsvd_1.0.5 timechange_0.3.0
[10] mime_0.13 lifecycle_1.0.4 magrittr_2.0.3
[13] compiler_4.4.3 rlang_1.1.5 sass_0.4.9
[16] tools_4.4.3 yaml_2.3.10 data.table_1.17.0
[19] knitr_1.50 askpass_1.2.1 htmlwidgets_1.6.4
[22] reticulate_1.42.0 plyr_1.8.9 RColorBrewer_1.1-3
[25] Rtsne_0.17 withr_3.0.2 RProtoBufLib_2.18.0
[28] grid_4.4.3 stats4_4.4.3 xtable_1.8-4
[31] colorspace_2.1-1 flowAI_1.36.0 scales_1.3.0
[34] MASS_7.3-64 cli_3.6.4 rmarkdown_2.29
[37] ncdfFlow_2.52.1 generics_0.1.3 umap_0.2.10.0
[40] rstudioapi_0.17.1 robustbase_0.99-4-1 RSpectra_0.16-2
[43] tzdb_0.5.0 reshape2_1.4.4 visNetwork_2.1.2
[46] cachem_1.1.0 parallel_4.4.3 rhandsontable_0.3.8
[49] matrixStats_1.5.0 vctrs_0.6.5 Matrix_1.7-2
[52] jsonlite_2.0.0 cytolib_2.18.2 hms_1.1.3
[55] S4Vectors_0.44.0 RBGL_1.82.0 Rgraphviz_2.50.0
[58] jquerylib_0.1.4 glue_1.8.0 DEoptimR_1.1-3-1
[61] stringi_1.8.7 gtable_0.3.6 later_1.4.1
[64] munsell_0.5.1 pillar_1.10.1 htmltools_0.5.8.1
[67] openssl_2.3.2 graph_1.84.1 R6_2.6.1
[70] evaluate_1.0.3 lattice_0.22-6 png_0.1-8
[73] memoise_2.0.1 httpuv_1.6.15 bslib_0.9.0
[76] Rcpp_1.0.14 flowClust_3.44.0 xfun_0.52
Additional context
Apologies again that I did not fulfil all the requirements for the issue. I thought it best to report the issue in part, rather than give up saying anything about it.