Fork me on GitHub

biom-format.org

biom.table.Table.data

«  biom.table.Table.copy   ::   Contents   ::   biom.table.Table.delimited_self  »

biom.table.Table.data

Table.data(id, axis='sample', dense=True)

Returns data associated with an id

Parameters:

id : str

ID of the samples or observations whose data will be returned.

axis : {‘sample’, ‘observation’}

Axis to search for id.

dense : bool, optional

If True, return data as dense

Returns:

np.ndarray or scipy.sparse.spmatrix

np.ndarray if dense, otherwise scipy.sparse.spmatrix

Raises:

UnknownAxisError

If provided an unrecognized axis.

Examples

>>> from biom import example_table
>>> example_table.data('S1', axis='sample')
array([ 0.,  3.])

«  biom.table.Table.copy   ::   Contents   ::   biom.table.Table.delimited_self  »