-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I would like to export/save the results of the dada2 demo workflow as biom file with the taxonomy as metadata.
I did that like this:
library(biomformat)
write_biom(make_biom(t(seqtab.nochim), observation_metadata=taxa), file.path("./", "dada2.biom"))
But get an error when loading it in phyloseq:
library(phyloseq)
import_biom("dada2.biom")
Error: $ operator is invalid for atomic vectors
Inspecting a biom file in json format generated with vsearch and the biom command line tool, I see some differences
A working biom file
"rows": [{"id": "OTU_934", "metadata": {"taxonomy": ["Eukaryota", "Opisthokonta", "Metazoa", "Nematoda", "Chromadorea", "Chromadorea_X", "*", "*"]}}
The exported biom file from dada2
rows":[{"id":"TACGGAGGATGCGAGCGTTATCCGGATTTATTGGGTTTAAAGGGTGCGCAGGCGGAAGATCAAGTCAGCGGTAAAATTGAGAGGCTCAACCTCTTCGAGCCGTTGAAACTGGTTTTCTTGAGTGAGCGAGAAGTATGCGGAATGCGTGGTGTAGCGGTGAAATGCATAGATATCACGCAGAACTCCGATTGCGAAGGCAGCATACCGGCGCTCAACTGACGCTCATGCACGAAAGTGTGGGTATCGAACAGG","metadata":["Bacteria","Bacteroidetes","Bacteroidia","Bacteroidales","Bacteroidales_S24-7_group",null]}
Would the differentce in formatting the metadata causes the above error? Is there somewhere an example on how to do this?
Metadata
Metadata
Assignees
Labels
No labels