Skip to content

Commit 8d7ebe1

Browse files
authored
Update readme.md
1 parent 13efe4f commit 8d7ebe1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

readme.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Here we propose “**STMiner**”. The three key steps of analyzing ST data in S
3535
# 🚀 Quick start by example
3636
**Please visit [STMiner Documents](https://stminerdoc.readthedocs.io/en/latest/Introduction/Introduction.html) for installation and detail usage.**
3737

38+
We provide the step by step ipynb file to reproduce the result, please check [here](https://github.com/PSSUN/STMiner-test-data/blob/main/STARprotocols.ipynb).
39+
You can also run STMiner by yourself:
40+
3841
## import package
3942

4043
```python
@@ -53,7 +56,7 @@ sp.read_h5ad(file=file_path, bin_size=1)
5356
## Find spatial high variable genes
5457

5558
```python
56-
sp.get_genes_csr_array(min_cells=200, log1p=False, vmax=100)
59+
sp.get_genes_csr_array(min_cells=100, log1p=False, , normalize=False, vmax=100)
5760
sp.spatial_high_variable_genes()
5861
```
5962
- The parameter **min_cells** was used to filter genes that are too sparse to generate a reliable spatial distribution.
@@ -88,7 +91,7 @@ A larger difference indicates a more pronounced spatial pattern of the gene.
8891
## Preprocess and Fit GMM
8992

9093
```python
91-
sp.fit_pattern(n_comp=20, gene_list=list(sp.global_distance[:2000]['Gene']))
94+
sp.fit_pattern(n_comp=10, gene_list=list(sp.global_distance[:2000]['Gene']))
9295
```
9396

9497
**n_comp=20** means each GMM model has 20 components.
@@ -139,7 +142,7 @@ Get patterns of interested gene/gene set:
139142

140143
```python
141144
interested_genes = ["mbpa", "BX957331.1", "madd"]
142-
sp.get_pattern_of_given_genes(gene_list = interested_genes)
145+
sp.get_pattern_of_given_genes(gene_list = interested_genes, n_comp=10)
143146
```
144147
Compare the distance between all genes and the given gene set
145148

@@ -169,7 +172,7 @@ A lower distance indicates that the spatial expression pattern of the gene is mo
169172
**Note**: A image path for ***image_path*** is needed if you want to show background image. In this example, you can download the processed image [here](https://github.com/xjtu-omics/STMiner/blob/main/pic/demo_img.png). Anyway, ***image_path*** is **optional**, not providing background images has no impact on the calculation results.
170173

171174
```python
172-
sp.get_pattern_array(vote_rate=0.3)
175+
sp.get_pattern_array(vote_rate=0.2)
173176
img_path = 'path/to/downloaded/image'
174177
sp.plot.plot_pattern(vmax=99,
175178
heatmap=False,

0 commit comments

Comments
 (0)