8000 Make biom fails to correctly format taxonomic data. · Issue #28 · joey711/biom · GitHub
[go: up one dir, main page]

Skip to content

Make biom fails to correctly format taxonomic data. #28

Open

Description

@cErikson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0