read_biom
(Package: biomformat) :
Read a biom-format file, returning a code{biom-class
Import the data from a biom-format file into R, represented as an instance of the biom-class; essentially a list with special constraints that map to the biom-format definition.
This function is meant only to be used if the user knows the file is a particular version / hdf5 format. Otherwise, the 'read_biom' file should be used.
This class inherits from the list-class, with validity checks specific to the definition to the biom-format. Effectively this means the list must have certain index names, some elements of which must have a specific structure or value. For further details see the biom-format definition. Importantly, this means other special properties of lists, like operations with $ and single- or double-square-braces are also supported; as-is the apply-family function that can operate on lists. Note that some features of the biom-format can be essentially empty, represented by the string "null" in the file. These fields are returned as NULL when accessed by an accessor function.
biom
(Package: biomformat) :
Build and return an instance of the biom-class.
This is for instantiating a biom object within R (biom-class), and assumes relevant data is already available in R. This is different than reading a biom file into R. If you are instead interested in importing a biom file into R, you should use the read_biom function. This function is made available (exported) so that advanced-users/developers can easily represent analogous data in this structure if needed. However, most users are expected to instead rely on the read_biom function for data import, followed by accessor functions that extract R-friendly subsets of the data stored in the biom-format derived list.