Closed Quentin97433333 closed 1 year ago
Hi,
Are you sure that your file really exists? My guess is that you forgot the extension. The command dir(pattern = "\\.fcs$", ignore.case = TRUE)
will show all files ending with an FCS extension, that are typically FCS files.
Close this issue, if it does not hold anymore.
Samuel
Hi, Thanks for the answer , i tried the command "dir(pattern = "\.fcs$", ignore.case = TRUE)" and the answer was "character(0)". Can you tell me which package did I forget?
So there is no file that matches the pattern: no file ending with ".fcs" ($ materializes the end of string).
Try dir(pattern = "8peak500v", ignore.case = TRUE)
to check the file 8peak500v is present, and dir()
to show all the files in the current directory.
this is what i obtain
I don't think you need the system.file, as you are not using an example file from the flowcore package, just one of your own. So you can try myfile <- "8peak500v.fcs"
Then you want to use the variable, rather than a character string with your variable name, so in that line you need to leave out the quotes. fcsfile <- read.FCS(myfile)
OK. You have to learn a little bit of programming and file management, but I don't have a link for that. Sofie is faster and gave the perfect answer 🥇
Thanks, it's work now ! (i'm news in this field i will learn a little bit before )
Describe the bug When trying to read FCS file," '8peak500v' is not a valid file"
To Reproduce
setwd(dir = "C:/Users/quent/OneDrive/Bureau/CytoExplorerR")
load library
library(flowCore) library(flowViz) library(flowAI)
load file
sessionInfo()
isFCSfile("C:/Users/quent/OneDrive/Bureau/FCSfiles/FCSfiles/8peak500v")
myfile <- system.file("C:/FCSfiles/8peak500v.fcs",package = "flowCore")
fcsfile <- read.FCS("myfile",transformation = FALSE, emptyValue = TRUE, min.limit = NULL, truncate_max_range = FALSE)
fcsfile
read.FCS("8peak500v",transformation = FALSE) .
Your code here.
Expected behavior There should be no error.
Screenshots
sessionInfo(): R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621)
Matrix products: default
locale: [1] LC_COLLATE=French_France.utf8 LC_CTYPE=French_France.utf8
[3] LC_MONETARY=French_France.utf8 LC_NUMERIC=C
[5] LC_TIME=French_France.utf8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] flowAI_1.28.0 flowViz_1.62.0 lattice_0.20-45 flowCore_2.10.0
[5] SeuratObject_4.1.3 Seurat_4.3.0
loaded via a namespace (and not attached): [1] changepoint_2.2.4 plyr_1.8.8 igraph_1.3.5
[4] lazyeval_0.2.2 sp_1.6-0 splines_4.2.2
[7] listenv_0.9.0 scattermore_0.8 usethis_2.1.6
[10] ggplot2_3.4.0 digest_0.6.31 htmltools_0.5.4
[13] fansi_1.0.4 magrittr_2.0.3 memoise_2.0.1
[16] tensor_1.5 cluster_2.1.4 ROCR_1.0-11
[19] remotes_2.4.2 globals_0.16.2 matrixStats_0.63.0
[22] spatstat.sparse_3.0-0 cytolib_2.10.1 prettyunits_1.1.1
[25] jpeg_0.1-10 colorspace_2.1-0 ggrepel_0.9.2
[28] xfun_0.36 dplyr_1.0.10 callr_3.7.3
[31] crayon_1.5.2 jsonlite_1.8.4 hexbin_1.28.2
[34] progressr_0.13.0 spatstat.data_3.0-0 survival_3.4-0
[37] zoo_1.8-11 glue_1.6.2 polyclip_1.10-4
[40] gtable_0.3.1 leiden_0.4.3 pkgbuild_1.4.0
[43] IDPmisc_1.1.20 future.apply_1.10.0 BiocGenerics_0.44.0
[46] abind_1.4-5 scales_1.2.1 DBI_1.1.3
[49] spatstat.random_3.1-3 miniUI_0.1.1.1 Rcpp_1.0.10
[52] viridisLite_0.4.1 xtable_1.8-4 reticulate_1.28
[55] stats4_4.2.2 profvis_0.3.7 htmlwidgets_1.6.1
[58] httr_1.4.4 RColorBrewer_1.1-3 ellipsis_0.3.2
[61] ica_1.0-3 urlchecker_1.0.1 pkgconfig_2.0.3
[64] uwot_0.1.14 deldir_1.0-6 utf8_1.2.2
[67] tidyselect_1.2.0 rlang_1.0.6 reshape2_1.4.4
[70] later_1.3.0 munsell_0.5.0 tools_4.2.2
[73] cachem_1.0.6 cli_3.6.0 generics_0.1.3
[76] devtools_2.4.5 ggridges_0.5.4 evaluate_0.20
[79] stringr_1.5.0 fastmap_1.1.0 goftest_1.2-3
[82] knitr_1.42 processx_3.8.0 fs_1.6.0
[85] fitdistrplus_1.1-8 purrr_1.0.1 RANN_2.6.1
[88] pbapply_1.7-0 future_1.30.0 nlme_3.1-160
[91] mime_0.12 compiler_4.2.2 rstudioapi_0.14
[94] plotly_4.10.1 curl_5.0.0 png_0.1-8
[97] spatstat.utils_3.0-1 tibble_3.1.8 stringi_1.7.12
[100] ps_1.7.2 desc_1.4.2 Matrix_1.5-1
[103] vctrs_0.5.2 pillar_1.8.1 lifecycle_1.0.3
[106] BiocManager_1.30.19 spatstat.geom_3.0-5 lmtest_0.9-40
[109] RcppAnnoy_0.0.20 data.table_1.14.6 cowplot_1.1.1
[112] irlba_2.3.5.1 httpuv_1.6.8 patchwork_1.1.2
[115] R6_2.5.1 latticeExtra_0.6-30 promises_1.2.0.1
[118] KernSmooth_2.23-20 gridExtra_2.3 RProtoBufLib_2.10.0
[121] parallelly_1.34.0 sessioninfo_1.2.2 codetools_0.2-18
[124] MASS_7.3-58.1 assertthat_0.2.1 pkgload_1.3.2
[127] rprojroot_2.0.3 withr_2.5.0 sctransform_0.3.5
[130] S4Vectors_0.36.1 parallel_4.2.2 grid_4.2.2
[133] tidyr_1.3.0 rmarkdown_2.20 Rtsne_0.16
[136] spatstat.explore_3.0-6 Biobase_2.58.0 shiny_1.7.4
[139] interp_1.1-3
Additional context Add any other context about the problem here.