Skip to content

Commit

Permalink
updated intershinx_mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
colganwi committed Feb 15, 2024
1 parent 4e86ffd commit b2e3cbd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
"python": ("https://docs.python.org/3", None),
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"networkx": ("https://networkx.org/documentation/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"h5py": ("https://docs.h5py.org/en/stable/", None),
}

# List of patterns, relative to source directory, that match files and
Expand Down
26 changes: 13 additions & 13 deletions src/treedata/_core/treedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
class TreeData(ad.AnnData):
"""AnnData with trees.
:class:`~treedata.TreeData` is a light-weight wrapper around :class:`~anndata.AnnData`
which adds two additional attributes, :attr:`obst` and :attr:`vart`, to
store trees for observations and variables A :class:`~treedata.TreeData`
`TreeData` is a light-weight wrapper around :class:`~anndata.AnnData`
which adds two additional attributes, `obst` and `vart`, to
store trees for observations and variables A `TreeData`
object can be used just like an :class:`~anndata.AnnData` object and stores a
data matrix :attr:`X` together with annotations
of observations :attr:`obs` (:attr:`obsm`, :attr:`obsp`, :attr:`obst`),
variables :attr:`var` (:attr:`varm`, :attr:`varp`, :attr:`vart`),
and unstructured annotations :attr:`uns`.
data matrix `X` together with annotations
of observations `obs` (`obsm`, `obsp`, `obst`),
variables `var` (`varm`, `varp`, `vart`),
and unstructured annotations `uns`.
Parameters
----------
Expand All @@ -50,12 +50,12 @@ class TreeData(ad.AnnData):
Key-indexed multi-dimensional observations annotation of length #observations.
If passing a :class:`~numpy.ndarray`, it needs to have a structured datatype.
obst
Key-indexed :class:`~nx.DiGraph` trees leaf nodes in the observations axis.
Key-indexed :class:`~networkx.DiGraph` trees leaf nodes in the observations axis.
varm
Key-indexed multi-dimensional variables annotation of length #variables.
If passing a :class:`~numpy.ndarray`, it needs to have a structured datatype.
vart
Key-indexed :class:`~nx.DiGraph` trees leaf nodes in the variables axis.
Key-indexed :class:`~networkx.DiGraph` trees leaf nodes in the variables axis.
layers
Key-indexed multi-dimensional arrays aligned to dimensions of `X`.
shape
Expand Down Expand Up @@ -121,18 +121,18 @@ def __init__(
self._vart = AxisTrees(self, 1, vals=vart)

def obst_keys(self) -> list[str]:
"""List keys of variable annotation :attr:`obst`."""
"""List keys of variable annotation `obst`."""
return list(self._obst.keys())

def vart_keys(self) -> list[str]:
"""List keys of variable annotation :attr:`vart`."""
"""List keys of variable annotation `vart`."""
return list(self._vart.keys())

@property
def obst(self) -> AxisTrees:
"""Tree annotation of observations
Stores for each key a :class:`~nx.DiGraph` with leaf nodes in
Stores for each key a :class:`~networkx.DiGraph` with leaf nodes in
`obs_names`. Is subset and pruned with `data` but behaves
otherwise like a :term:`mapping`.
"""
Expand All @@ -142,7 +142,7 @@ def obst(self) -> AxisTrees:
def vart(self):
"""Tree annotation of variables
Stores for each key a :class:`~nx.DiGraph` with leaf nodes in
Stores for each key a :class:`~networkx.DiGraph` with leaf nodes in
`var_names`. Is subset and pruned with `data` but behaves
otherwise like a :term:`mapping`.
"""
Expand Down

0 comments on commit b2e3cbd

Please sign in to comment.