Skip to content

Commit f587ebd

Browse files
authored
Update index.rst
1 parent cf58913 commit f587ebd

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

docs/source/index.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ following command:
6262

6363
::
6464

65-
pip install git+https://github.com/yoseflab/Hotspot.git
65+
pip install hotspotsc
6666

6767
Usage
6868
=====
@@ -96,15 +96,21 @@ For example:
9696
::
9797

9898
import hotspot
99-
hs = hotspot.Hotspot(counts, model='danb', latent=pca_results, umi_counts=umi_counts)
99+
hs = hotspot.Hotspot(
100+
adata,
101+
layer_key="counts",
102+
model='danb',
103+
latent_obsm_key="X_pca",
104+
umi_counts_obs_key="total_counts"
105+
)
100106

101107
In the example above:
102108

103-
- ``counts`` is a Genes X Cells pandas DataFrame of gene counts
104-
- ``model`` 'danb' selects the umi-adjusted negative binomial model
105-
- ``latent`` is a Cells x Components pandas DataFrame (the PCA-reduced
106-
space)
107-
- ``umi_counts`` is a pandas Series with UMI count for each cell
109+
- ``adata`` is a [AnnData](https://anndata.readthedocs.io/en/latest/) object of cells by genes
110+
- ``layer_key`` is the layer of `adata` containing count information
111+
- ``model`` 'danb' selects the umi-adjusted negative binomial model
112+
- ``latent_obsm_key`` is the `.obsm` key of `adata` containing Cells x Components matrix (the PCA-reduced space)
113+
- ``umi_counts_obs_key`` is the `.obs` key of `adata` with the UMI count for each cell
108114

109115
Alternative choices for 'model'
110116
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -126,14 +132,14 @@ autocorrelation and gene-gene local correlations. The choices are:
126132
Choosing different metrics
127133
~~~~~~~~~~~~~~~~~~~~~~~~~~
128134

129-
Above we used ``latent`` as the input option. This assumes that cells
130-
are in an N-dimensional space and similarity between cells is evaluated
135+
Above we used ``latent_obsm_key`` as the input option. This assumes that cells
136+
are in an K-dimensional space and similarity between cells is evaluated
131137
by computing euclidean distances in this space. Either the results of a
132138
dimensionality reduction or modeling procedure can be input here, or
133139
when working with spatial data, the per-cell coordinates.
134140

135-
Alternately, instead of ``latent``, you can specify either ``tree`` or
136-
``distances``.
141+
Alternately, instead of ``latent_obsm_key``, you can specify either ``tree`` or
142+
``distances_obsp_key``.
137143

138144
``tree`` is used for a developmental lineage. In this form, ``tree``
139145
should be an ``ete3.TreeNode`` object representing the root of a Tree
@@ -144,8 +150,8 @@ running ``ete3.Tree('my_newick.txt')``. Note: leaf nodes in the tree
144150
must have names that match the column labels in the ``counts`` input
145151
(e.g., cell barcodes).
146152

147-
``distances`` is used to specify cell-cell distances directly. The value
148-
entered should be a Cells x Cells pandas DataFrame.
153+
``distances_obsp_key`` is used to specify cell-cell distances directly. The value
154+
entered should be a Cells x Cells matrix in ``adata.obsp``.
149155

150156
Compute the KNN graph
151157
---------------------

0 commit comments

Comments
 (0)