Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make biom fails to correctly format taxonomic data. #28

Open
cErikson opened this issue Jul 26, 2018 · 0 comments
Open

Make biom fails to correctly format taxonomic data. #28

cErikson opened this issue Jul 26, 2018 · 0 comments

Comments

@cErikson
Copy link

cErikson commented Jul 26, 2018

I have a problem with make_biom failing to create the correct format in the json for the taxanomic data.

I want my observation metadata to have the following format in the json.
{"id":"GG_OTU_5", "metadata":{"taxonomy":["k__Bacteria", "p__Proteobacteria", "c__Gammaproteobacteria", "o__Enterobacteriales", "f__Enterobacteriaceae", "g__Escherichia", "s__"]}}

If I run the following code

rich_sparse_file = system.file("extdata", "rich_sparse_otu_table.biom", package = "biom")
biom_in=read_biom(rich_sparse_file)
counts=biom_data(biom_in)
taxa=observation_metadata(biom_in)
metadata=sample_metadata(biom_in)
biom_out=make_biom(counts,sample_metadata = metadata, observation_metadata = taxa)
write_biom(biom_out,'~/tmp/out.biom')

The result is not the same as the input.

{
 "id": "GG_OTU_5",
"metadata": {
 "taxonomy1": "k__Bacteria",
"taxonomy2": "p__Proteobacteria",
"taxonomy3": "c__Gammaproteobacteria",
"taxonomy4": "o__Enterobacteriales",
"taxonomy5": "f__Enterobacteriaceae",
"taxonomy6": "g__Escherichia",
"taxonomy7": "s__" 
} 

This is causing a number of programs such as phinch to fail to parse the biom file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant