I'm using the python API for the biom-format package. I read in two files in biom format and merged them, like so:
In [1]: import biom
In [2]: a = biom.load_table('./table-a.biom')
In [3]: b = biom.load_table('./table-b.biom')
In [4]: a
Out[4]: 51116 x 46 <class 'biom.table.Table'> with 185077 nonzero entries (7% dense)
In [5]: b
Out[5]: 37479 x 26 <class 'biom.table.Table'> with 100124 nonzero entries (10% dense)
In [6]: c = a.merge(b)
In [7]: c
Out[7]: 67022 x 47 <class 'biom.table.Table'> with 254555 nonzero entries (8% dense)
How do I now export this biom object (c) as a biom file? There are a few methods available, eg, .to_tsv(), but I don't see a way to save this object in biom format.