Invalid UTF-8
1
0
Entering edit mode
@5de2f9c2
Last seen 10 months ago
India

Getting the following error in readNanoStringGeoMxSet(), Error in sub(re, "", x, perl = TRUE): input string 1 is invalid UTF-8 Traceback:

  1. readNanoStringGeoMxSet(dccFiles = dccfiles, pkcFiles = pkc, phenoDataFile = SampleAnnotationFile, . phenoDataSheet = "Template", phenoDataDccColName = "Sample_ID", . protocolDataColNames = c("aoi", "roi"), experimentDataColNames = c("panel"))
  2. readPKCFile(pkcFiles, default_pkc_vers = defaultPKCVersions)
  3. lapply(file, function(pkc_file) { . rjson::fromJSON(file = pkc_file) . })
  4. lapply(file, function(pkc_file) { . rjson::fromJSON(file = pkc_file) . })
  5. FUN(X[[i]], ...)
  6. rjson::fromJSON(file = pkc_file)
  7. trimws(json_str)
  8. mysub(paste0(whitespace, "+$"), mysub(paste0("^", whitespace, . "+"), x))
  9. sub(re, "", x, perl = TRUE)
  10. is.factor(x)
  11. mysub(paste0("^", whitespace, "+"), x)
  12. sub(re, "", x, perl = TRUE) Code should be placed in three backticks as shown below

My code is as follows : readNanoStringGeoMxSet(dccFiles = dccfiles, pkcFiles = pkc, phenoDataFile = SampleAnnotationFile, phenoDataSheet = 'Template', phenoDataDccColName = "Sample_ID", protocolDataColNames = c("aoi", "roi"), experimentDataColNames = c("panel"))

sessionInfo( ) R version 4.3.2 (2023-10-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /userdata/shakti/tools/mambaforge/envs/spatial_seq/lib/libopenblasp-r0.3.21.so; LAPACK version 3.9.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: Asia/Kolkata tzcode source: system (glibc)

attached base packages: [1] stats4 stats graphics grDevices utils datasets methods
[8] base

other attached packages: [1] readxl_1.4.3 GSEABase_1.64.0
[3] graph_1.80.0 annotate_1.80.0
[5] XML_3.99-0.16.1 AnnotationDbi_1.64.1
[7] msigdb_1.10.0 ggalluvial_0.12.5
[9] SpatialExperiment_1.12.0 SingleCellExperiment_1.24.0 [11] SummarizedExperiment_1.32.0 GenomicRanges_1.54.1
[13] GenomeInfoDb_1.38.6 IRanges_2.36.0
[15] MatrixGenerics_1.14.0 matrixStats_1.2.0
[17] standR_1.6.0 lubridate_1.9.3
[19] forcats_1.0.0 stringr_1.5.1
[21] dplyr_1.1.4 purrr_1.0.2
[23] readr_2.1.5 tidyr_1.3.1
[25] tibble_3.2.1 tidyverse_2.0.0
[27] GeoMxWorkflows_1.8.0 GeomxTools_3.6.2
[29] NanoStringNCTools_1.10.0 ggplot2_3.4.4
[31] S4Vectors_0.40.2 Biobase_2.62.0
[33] BiocGenerics_0.48.1

loaded via a namespace (and not attached): [1] splines_4.3.2 pbdZMQ_0.3-11 bitops_1.0-7
[4] cellranger_1.1.0 polyclip_1.10-6 lifecycle_1.0.4
[7] globals_0.16.2 lattice_0.22-5 MASS_7.3-60.0.1
[10] magrittr_2.0.3 rmarkdown_2.25 yaml_2.3.8
[13] spam_2.10-0 askpass_1.2.0 sp_2.1-3
[16] reticulate_1.35.0 cowplot_1.1.3 DBI_1.2.2
[19] minqa_1.2.6 RColorBrewer_1.1-3 abind_1.4-5
[22] zlibbioc_1.48.0 EnvStats_2.8.1 Rtsne_0.17
[25] RCurl_1.98-1.14 tweenr_2.0.2 GenomeInfoDbData_1.2.11 [28] ggrepel_0.9.5 listenv_0.9.1 pheatmap_1.0.12
[31] BiocStyle_2.30.0 umap_0.2.10.0 RSpectra_0.16-1
[34] parallelly_1.37.0 codetools_0.2-19 DelayedArray_0.28.0
[37] ggforce_0.4.1 tidyselect_1.2.0 outliers_0.15
[40] farver_2.1.1 lme4_1.1-35.1 base64enc_0.1-3
[43] jsonlite_1.8.8 progressr_0.14.0 systemfonts_1.0.5
[46] tools_4.3.2 Rcpp_1.0.12 glue_1.7.0
[49] SparseArray_1.2.4 xfun_0.42 ggthemes_5.1.0
[52] IRdisplay_1.1 withr_3.0.0 numDeriv_2016.8-1.1
[55] BiocManager_1.30.22 fastmap_1.1.1 GGally_2.2.1
[58] boot_1.3-28.1 fansi_1.0.6 openssl_2.1.1
[61] digest_0.6.34 timechange_0.3.0 R6_2.5.1
[64] colorspace_2.1-0 RSQLite_2.3.5 utf8_1.2.4
[67] generics_0.1.3 data.table_1.15.0 httr_1.4.7
[70] htmlwidgets_1.6.4 S4Arrays_1.2.0 ggstats_0.5.1
[73] pkgconfig_2.0.3 gtable_0.3.4 blob_1.2.4
[76] XVector_0.42.0 htmltools_0.5.7 dotCall64_1.1-1
[79] SeuratObject_5.0.1 scales_1.3.0 png_0.1-8
[82] knitr_1.45 tzdb_0.4.0 reshape2_1.4.4
[85] rjson_0.2.21 uuid_1.2-0 nlme_3.1-164
[88] nloptr_2.0.3 repr_1.1.6 cachem_1.0.8
[91] parallel_4.3.2 vipor_0.4.7 pillar_1.9.0
[94] grid_4.3.2 vctrs_0.6.5 xtable_1.8-4
[97] beeswarm_0.4.0 evaluate_0.23 magick_2.8.3
[100] cli_3.6.2 compiler_4.3.2 rlang_1.1.3
[103] crayon_1.5.2 future.apply_1.11.1 plyr_1.8.9
[106] ggbeeswarm_0.7.2 ggiraph_0.8.8 stringi_1.8.3
[109] lmerTest_3.1-3 munsell_0.5.0 Biostrings_2.70.2
[112] Matrix_1.6-5 IRkernel_1.3.2 hms_1.1.3
[115] patchwork_1.2.0 bit64_4.0.5 future_1.33.1
[118] KEGGREST_1.42.0 memoise_2.0.1 bit_4.0.5
```

GeoMxWorkflows • 897 views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 3 months ago
United States

You have a nice detailed traceback there. One of the files in pkc has characters that are not valid UTF-8. If you are working interactively you can pick element 7 of the traceback and look at the text that is being processed. Some functions in the utf8 package may help you to diagnose and reformat the offending text.

Login before adding your answer.

Traffic: 406 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6