@@ -62,7 +62,7 @@ following command:
62
62
63
63
::
64
64
65
- pip install git+https://github.com/yoseflab/Hotspot.git
65
+ pip install hotspotsc
66
66
67
67
Usage
68
68
=====
@@ -96,15 +96,21 @@ For example:
96
96
::
97
97
98
98
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
+ )
100
106
101
107
In the example above:
102
108
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
108
114
109
115
Alternative choices for 'model'
110
116
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -126,14 +132,14 @@ autocorrelation and gene-gene local correlations. The choices are:
126
132
Choosing different metrics
127
133
~~~~~~~~~~~~~~~~~~~~~~~~~~
128
134
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
131
137
by computing euclidean distances in this space. Either the results of a
132
138
dimensionality reduction or modeling procedure can be input here, or
133
139
when working with spatial data, the per-cell coordinates.
134
140
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 ``.
137
143
138
144
``tree `` is used for a developmental lineage. In this form, ``tree ``
139
145
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
144
150
must have names that match the column labels in the ``counts `` input
145
151
(e.g., cell barcodes).
146
152
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 `` .
149
155
150
156
Compute the KNN graph
151
157
---------------------
0 commit comments