def write_biom_table(biom_table, biom_table_fp, compress=True, write_hdf5=HAVE_H5PY, table_type='OTU table'):
 if biom_table.is_empty():
  raise EmptyBIOMTableError("Attempting to write an empty BIOM table to disk. QIIME doesn't support writing empty BIOM output files.")
 generated_by = get_generated_by_for_biom_tables()
 biom_table.type = table_type
 if write_hdf5:
  with biom_open(biom_table_fp, 'w') as biom_file:
   biom_table.to_hdf5(biom_file, generated_by, compress)
 else:
  with open(biom_table_fp, 'w') as biom_file:
   biom_table.to_json(generated_by, biom_file)

def write_biom_table ( biom_table , biom_table_fp , compress = True , write_hdf5 = HAVE_H5PY , table_type = 'OTU table' ) : if biom_table . is_empty ( ) : raise EmptyBIOMTableError ( "Attempting to write an empty BIOM table to disk. QIIME doesn't support writing empty BIOM output files." ) generated_by = get_generated_by_for_biom_tables ( ) biom_table . type = table_type if write_hdf5 : with biom_open ( biom_table_fp , 'w' ) as biom_file : biom_table . to_hdf5 ( biom_file , generated_by , compress ) else : with open ( biom_table_fp , 'w' ) as biom_file : biom_table . to_json ( generated_by , biom_file )
writes a biom table to the specified filepath parameters biom_table : biom .