Skip to content

Commit 51c2cec

Browse files
committed
Update README.md
1 parent f7e899e commit 51c2cec

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ git clone https://github.com/Honchkrow/Space
5858
cd Space
5959

6060
# install environment using environment.yml
61-
conda env create -n Space -f environment.yml
61+
conda env create -n Space -f environment.yml # by conda
62+
mamba env create -n Space -f environment.yml # by mamba
6263
```
6364

6465
*<font color=red>Note:</font> The environment name can be changed by replacing "-n Space" to "-n environment_name".*
@@ -120,9 +121,11 @@ Space/
120121

121122
To reproduce the results of the Space article, users can run the scripts in the **Demo** folder. The scripts are organized into two folders: **Reference_Methods** and **Reproduce_Scripts**. The **Reference_Methods** folder contains scripts for reproducing the results of the ten SOTA algorithms. The **Reproduce_Scripts** folder contains scripts for reproducing the results of the Space.
122123

123-
#### How to integrate the results of different algorithms using Space
124+
#### 3.2.1 Key functions of the Space
124125

125-
Here, for quick illustration, we directly apply Space to the results obtained from 10 SOTA methods. These methods have already been executed. The scripts are asved in **Reference_Methods** folder. The results of these methods are saved in the **Data** folder.
126+
#### 3.2.2 How to integrate the results of different algorithms using Space
127+
128+
Here, for quick illustration, we directly apply Space to the results obtained from 10 SOTA methods. These methods have already been executed. The scripts are saved in **Reference_Methods** folder. The results of these methods are saved in the **Data** folder.
126129

127130
First, load the necessary packages and set R environment.
128131

@@ -138,7 +141,7 @@ from sklearn.cluster import SpectralClustering
138141
from Space.cons_func import get_results, get_domains
139142
from Space.utils import calculate_location_adj, plot_results_ari, get_bool_martix
140143

141-
# The mclust is used.
144+
# Some methods need mclust.
142145
# Please modify this path!
143146
os.environ["R_HOME"] = "/home/zw/software/miniforge-pypy3/envs/space/lib/R"
144147
```
@@ -169,6 +172,8 @@ im_re = pd.read_csv(
169172
index_col=0,
170173
sep=",",
171174
)
175+
176+
# set variables
172177
adata.obsm["im_re"] = im_re
173178
adata.obs["gt"] = Ann_df["fine_annot_type"]
174179
gt = adata.obs["gt"]
@@ -184,7 +189,7 @@ alpha = 1 # recommended value
184189
learning_rate = 0.0001 # learning rate in training
185190
```
186191

187-
Now, read the results from 10 SOTA methods.
192+
Now, read the results from 10 SOTA methods. To quickly reproduce the results, we directly read the outcomes from 10 SOTA methods. The code for these methods can be found in the "**/Demo/Reference_Methods/breast**" folder.
188193

189194
```python
190195
mul_reults = pd.read_csv(
@@ -193,7 +198,6 @@ mul_reults = pd.read_csv(
193198
index_col=0
194199
)
195200
mul_reults = mul_reults.iloc[:, 2:]
196-
197201
```
198202

199203

@@ -251,21 +255,22 @@ ari = adjusted_rand_score(labels, gt.values)
251255
print(ari)
252256
```
253257

254-
you will obtain a result from Space with an ARI of 0.648.
258+
you will obtain a result from Space with an ARI of **0.648**.
255259

256260
**<font color=red>In most cases, Space does not yield a fixed result. This is not due to an issue with Space, but because some methods exhibit randomness even when the random seed is fixed. Please refer to 'https://github.com/QIFEIDKN/STAGATE/issues/10' for more information. However, the variations in the results we obtain are minimal. The outcomes are stable across multiple runs.</font>**
257261

258262

259-
#### Visualization
263+
264+
#### 3.2.3 Visualization
260265

261266

262-
#### Domain-specific gene analysis
267+
#### 3.2.4 Domain-specific gene analysis
263268

264269

265-
#### Trajectory inference
270+
#### 3.2.5 Trajectory inference
266271

267272

268-
#### Use with Scanpy or Seurat
273+
#### 3.2.6 Use with Scanpy or Seurat
269274

270275

271276
### 3.3 How to choose and use different baseline algorithms

0 commit comments

Comments
 (0)