I would like to use the package Phyloseq in R in order to analyse my 16S data, and therefore need to import my .biom table in R.
As the taxonomic information is not included in my filtered .biom table, I converted the feature-table.biom and taxonomy.qza files obtained in QIIME2 into .txt files, and merged them by OTU ID. This was suggested in this forum: https://github.com/joey711/phyloseq/issues/821
Then, I tried to convert the merged file (“otu_table.txt”) back into a new .biom file with the following command:
biom convert -i otu_table.txt -o new_otu_table.biom --to-hdf5 --table-type=“OTU table” --process-obs-metadata taxonomy
However, I obtain many error messages, including:
“ValueError: could not convert string to float: ‘D_0__Bacteria;D_1__Proteobacteria’”
“TypeError: Invalid value on line 2, column 1, value D_0__Bacteria;D_1__Proteobacteria”
“otu_table.txt does not appear to be a BIOM file!”
May I please ask you to help me understand and solve this problem? I would be extremely grateful for some advice!
Ultimately, I would like to get a phyloseq object that would contain
the OTU table, the sample metadata, the taxonomic information and phylogenetic tree. If I understood correctly, I can achieve that by separately importing the -biom file (to which the taxonomy has been appended), the sample metadata and a tree.nwk generated in QIIME2. Then these objects could be merge in phyloseq.
Thank you very much!