Open biobee opened 11 months ago
I have got similar warning in Windows
biom1 <- import_biom("silva_feature-table-batch001.biom") Warning messages: 1: In strsplit(conditionMessage(e), "\n") : unable to translate 'lexical error: invalid char in json text.
<89>HDF (right here) ------^ ' to a wide string 2: In strsplit(conditionMessage(e), "\n") : input string 1 is invalid 3: In asMethod(object) : sparse->dense coercion: allocating vector of size 2.0 GiB Interestingly in another package library("biomformat"); Got exact same message above. R version 4.3.1 (2023-06-16 ucrt) phyloseq_1.44.0 biomformat_1.28.0I am having the same issue:
`> library(biomformat)
feature_table_path_biom <- "/usr2/people/macgregor/MTV/Amplicon/Analysis/2024-04-11/cluster-dn-97/table/feature-table.biom" x <- read_biom(feature_table_path_biom) Warning messages: 1: In strsplit(conditionMessage(e), "\n") : unable to translate 'lexical error: invalid char in json text.
<89>HDF (right here) ------^ ' to a wide string 2: In strsplit(conditionMessage(e), "\n") : input string 1 is invalid`
I was experiencing the same problem. What seemed to work was to convert the .biom from hdf5 to json in the command line using:
biom convert -i input_hdf5_file.biom -o output_json_file.biom --to-json
Later, I was able to load the resulting biom file into R using the read_biom2phyloseq function from the microbiome package and add the metadata as an argument in the same function.
Hope it helps.
Dear all,
In the past importing an HDF5 biom file would give a warning ("input string 1"...). This was not the case with a later phyloseq version (e.g. 1.42.0). However, now these warnings appear again (1.44.0). What exactly is causing this? Is it related to phyloseq itself or a R versions? The imported biom looks OK. To avoid the warnings, I converted to JSON in the past, but it would be great it these warnings were not thrown.
Using: R version 4.3.0 (2023-04-21 ucrt) Bioconductor 3.17 phyloseq_1.44.0
Warning messages: 1: In strsplit(conditionMessage(e), "\n") : unable to translate 'lexical error: invalid char in json text.
<89>HDF (right here) ------^ ' to a wide string 2: In strsplit(conditionMessage(e), "\n") : input string 1 is invalid Using: R version 4.2.2 (2022-10-31 ucrt) phyloseq_1.42.0 (Bioconductor 3.16) Import is successful and no warnings are given