Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gtca committed May 26, 2021
1 parent 6a2b38a commit df5690e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
9 changes: 9 additions & 0 deletions docs/source/omics/multi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,12 @@ Weighted nearest neighbours (WNN) is a procedure to define a neighbourhood graph
>>> mu.pp.neighbors(mdata)
>>> mu.tl.umap(mdata)


Utility functions
-----------------

To manage the complexity of having to deal with multiple modalities, there is a handful of utility functions in `muon`. This includes in-place filtering: just as it works `for a single modality <uni.rst#in-place-filtering>`_, :func:`muon.pp.filter_obs` and :func:`muon.pp.filter_var` will filter observations or variables in each modality as well as in the attributes of the ``MuData`` object.

In order to keep observations present in all the modalities, there is :func:`muon.pp.intersect_obs`. Using the in-place filtering under the hood, it will modify the ``MuData`` object and the contained modalities to only have the common observations:

>>> mu.pp.intersect_obs(mdata)
9 changes: 0 additions & 9 deletions muon/_core/preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,6 @@ def intersect_obs(mdata: MuData):
Subset observations (samples or cells) in-place
taking observations present only in all modalities.
This function is currently a draft, and it can be removed
or its behaviour might be changed in future.
Parameters
----------
mdata: MuData
Expand Down Expand Up @@ -646,9 +643,6 @@ def filter_obs(
Filter observations (samples or cells) in-place
using any column in .obs or in .X.
This function is currently a draft, and it can be removed
or its behaviour might be changed in future.
Parameters
----------
data: AnnData or MuData
Expand Down Expand Up @@ -765,9 +759,6 @@ def filter_var(
Filter variables (features, e.g. genes) in-place
using any column in .var or row in .X.
This function is currently a draft, and it can be removed
or its behaviour might be changed in future.
Parameters
----------
data: AnnData or MuData
Expand Down
1 change: 1 addition & 0 deletions muon/rna.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ._rna import *
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ docs = [
Documentation = "https://muon.readthedocs.io/en/latest/"

[tool.flit.sdist]
exclude = [".github"]
exclude = [".github", "docs/build"]


[tool.black]
Expand Down

0 comments on commit df5690e

Please sign in to comment.