Skip to content

Commit fba97cf

Browse files
committed
⬆️ Update package and benchmark pipeline
1 parent 8f0ef82 commit fba97cf

File tree

75 files changed

+23809
-2974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+23809
-2974
lines changed

.Rprofile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
library(tools)
22
source(file_path_as_absolute("renv/activate.R"))
3-
# options(renv.config.pak.enabled=TRUE)
3+
lib_path <- file_path_as_absolute("conda/lib")
4+
Sys.setenv(LD_LIBRARY_PATH = paste(lib_path, Sys.getenv("LD_LIBRARY_PATH"), sep = ":"))
45
library(reticulate)
56
use_python(paste0(getwd(),"/conda/bin/python"))
7+
print(.libPaths())
8+
print(py_config())
9+
print(Sys.getenv("LD_LIBRARY_PATH"))
10+
11+
import("scanpy")
12+
import("anndata")
613
options(bitmapType = "cairo")
714

815

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
*.pth
77
*.zip
88
*.csv
9+
*.txt
910
*.rds
1011
*.pickle
12+
*.pkl
1113
*.RData
1214
*.Rhistory
1315
*.pdf
@@ -22,6 +24,7 @@
2224
*.png
2325
*.gz
2426
*.whl
27+
*.html
2528

2629
# folder
2730
**/conda/

benchmark/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ split/
55
multi/
66
results_bak/
77
figures/
8-
hetero/
8+
hetero/
9+
perturb/

benchmark/analysis/2d_vis_align.ipynb

Lines changed: 1239 additions & 0 deletions
Large diffs are not rendered by default.

benchmark/analysis/aggr_datasets.ipynb

Lines changed: 581 additions & 0 deletions
Large diffs are not rendered by default.

benchmark/analysis/benchmark_analysis.ipynb

Lines changed: 1094 additions & 150 deletions
Large diffs are not rendered by default.

benchmark/analysis/celltype_region_analysis.ipynb

Lines changed: 320 additions & 212 deletions
Large diffs are not rendered by default.

benchmark/analysis/neighbor_celltype.ipynb

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 38,
5+
"execution_count": 1,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"cell_type": "code",
21-
"execution_count": 11,
21+
"execution_count": 2,
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
@@ -36,7 +36,7 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 2,
39+
"execution_count": 3,
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
@@ -54,7 +54,7 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 28,
57+
"execution_count": 4,
5858
"metadata": {},
5959
"outputs": [
6060
{
@@ -63,19 +63,19 @@
6363
"text": [
6464
"--------Visium---------\n",
6565
"contain 3635 cells\n",
66-
"{True: 2901, False: 734}\n",
67-
"0.7980742778541953\n",
66+
"{True: 2896, False: 739}\n",
67+
"0.7966987620357634\n",
6868
"\n",
6969
"\n",
7070
"contain 3566 cells\n",
71-
"{True: 2693, False: 873}\n",
72-
"0.7551878855860908\n",
71+
"{True: 2684, False: 882}\n",
72+
"0.7526640493550196\n",
7373
"\n",
7474
"\n",
7575
"--------MERFISH---------\n",
7676
"contain 6412 cells\n",
77-
"{False: 4251, True: 2161}\n",
78-
"0.337024329382408\n",
77+
"{False: 4252, True: 2160}\n",
78+
"0.3368683718028696\n",
7979
"\n",
8080
"\n",
8181
"contain 6507 cells\n",
@@ -85,13 +85,13 @@
8585
"\n",
8686
"--------Stereo-seq---------\n",
8787
"contain 101837 cells\n",
88-
"{True: 91285, False: 10552}\n",
89-
"0.8963834362756169\n",
88+
"{True: 91247, False: 10590}\n",
89+
"0.8960102909551538\n",
9090
"\n",
9191
"\n",
9292
"contain 96221 cells\n",
93-
"{True: 85333, False: 10888}\n",
94-
"0.886843828270336\n",
93+
"{True: 85279, False: 10942}\n",
94+
"0.8862826202180397\n",
9595
"\n",
9696
"\n"
9797
]
@@ -140,7 +140,7 @@
140140
},
141141
{
142142
"cell_type": "code",
143-
"execution_count": 29,
143+
"execution_count": 5,
144144
"metadata": {},
145145
"outputs": [
146146
{
@@ -174,19 +174,19 @@
174174
" <th>0</th>\n",
175175
" <td>slice_0</td>\n",
176176
" <td>Visium</td>\n",
177-
" <td>0.798074</td>\n",
177+
" <td>0.796699</td>\n",
178178
" </tr>\n",
179179
" <tr>\n",
180180
" <th>1</th>\n",
181181
" <td>slice_1</td>\n",
182182
" <td>Visium</td>\n",
183-
" <td>0.755188</td>\n",
183+
" <td>0.752664</td>\n",
184184
" </tr>\n",
185185
" <tr>\n",
186186
" <th>2</th>\n",
187187
" <td>slice_0</td>\n",
188188
" <td>MERFISH</td>\n",
189-
" <td>0.337024</td>\n",
189+
" <td>0.336868</td>\n",
190190
" </tr>\n",
191191
" <tr>\n",
192192
" <th>3</th>\n",
@@ -198,29 +198,29 @@
198198
" <th>4</th>\n",
199199
" <td>slice_0</td>\n",
200200
" <td>Stereo-seq</td>\n",
201-
" <td>0.896383</td>\n",
201+
" <td>0.896010</td>\n",
202202
" </tr>\n",
203203
" <tr>\n",
204204
" <th>5</th>\n",
205205
" <td>slice_1</td>\n",
206206
" <td>Stereo-seq</td>\n",
207-
" <td>0.886844</td>\n",
207+
" <td>0.886283</td>\n",
208208
" </tr>\n",
209209
" </tbody>\n",
210210
"</table>\n",
211211
"</div>"
212212
],
213213
"text/plain": [
214214
" index variable value\n",
215-
"0 slice_0 Visium 0.798074\n",
216-
"1 slice_1 Visium 0.755188\n",
217-
"2 slice_0 MERFISH 0.337024\n",
215+
"0 slice_0 Visium 0.796699\n",
216+
"1 slice_1 Visium 0.752664\n",
217+
"2 slice_0 MERFISH 0.336868\n",
218218
"3 slice_1 MERFISH 0.371907\n",
219-
"4 slice_0 Stereo-seq 0.896383\n",
220-
"5 slice_1 Stereo-seq 0.886844"
219+
"4 slice_0 Stereo-seq 0.896010\n",
220+
"5 slice_1 Stereo-seq 0.886283"
221221
]
222222
},
223-
"execution_count": 29,
223+
"execution_count": 5,
224224
"metadata": {},
225225
"output_type": "execute_result"
226226
}
@@ -231,6 +231,15 @@
231231
"result"
232232
]
233233
},
234+
{
235+
"cell_type": "code",
236+
"execution_count": 9,
237+
"metadata": {},
238+
"outputs": [],
239+
"source": [
240+
"result.to_csv('neighbor_celltype.csv')"
241+
]
242+
},
234243
{
235244
"cell_type": "code",
236245
"execution_count": 30,
@@ -447,7 +456,7 @@
447456
"name": "python",
448457
"nbconvert_exporter": "python",
449458
"pygments_lexer": "ipython3",
450-
"version": "3.8.13"
459+
"version": "3.8.17"
451460
},
452461
"vscode": {
453462
"interpreter": {

benchmark/analysis/plot_slices.ipynb

Lines changed: 9 additions & 19 deletions
Large diffs are not rendered by default.

benchmark/analysis/scalability_analysis.ipynb

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,70 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 7,
5+
"execution_count": 1,
66
"id": "a48d3846-e540-4cbd-8ac0-ae8efcccc645",
77
"metadata": {
88
"tags": [],
99
"vscode": {
1010
"languageId": "r"
1111
}
1212
},
13-
"outputs": [],
13+
"outputs": [
14+
{
15+
"name": "stdout",
16+
"output_type": "stream",
17+
"text": [
18+
"[1] \"/lustre/grp/gglab/xiacr/SLAT/renv/library/R-4.1/x86_64-pc-linux-gnu\" \n",
19+
"[2] \"/lustre/grp/gglab/xiacr/SLAT/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/90a76c8d\"\n"
20+
]
21+
},
22+
{
23+
"name": "stderr",
24+
"output_type": "stream",
25+
"text": [
26+
"Warning message in system2(\"poetry\", c(\"env\", \"info\", \"--path\"), stdout = TRUE):\n",
27+
"“running command ''poetry' env info --path' had status 1”\n"
28+
]
29+
},
30+
{
31+
"name": "stdout",
32+
"output_type": "stream",
33+
"text": [
34+
"python: /lustre/grp/gglab/xiacr/SLAT/conda/bin/python\n",
35+
"libpython: /lustre/grp/gglab/xiacr/SLAT/conda/lib/libpython3.8.so\n",
36+
"pythonhome: /lustre/grp/gglab/xiacr/SLAT/conda:/lustre/grp/gglab/xiacr/SLAT/conda\n",
37+
"version: 3.8.17 | packaged by conda-forge | (default, Jun 16 2023, 07:06:00) [GCC 11.4.0]\n",
38+
"numpy: /lustre/grp/gglab/xiacr/SLAT/conda/lib/python3.8/site-packages/numpy\n",
39+
"numpy_version: 1.24.4\n",
40+
"\n",
41+
"NOTE: Python version was forced by use_python function\n",
42+
"[1] \"/lustre/grp/gglab/xiacr/SLAT/conda/lib:/lustre/grp/gglab/xiacr/SLAT/resource/R/lib/R/lib:/usr/local/lib:/flash/grp/gglab/xiacr/SpatialLR-dev/resource/jdk1.8.0_361/jre/lib/i386/client:/opt/slurm-22.05.2/lib:/opt/slurm-22.05.2/lib/slurm:\"\n"
43+
]
44+
},
45+
{
46+
"name": "stderr",
47+
"output_type": "stream",
48+
"text": [
49+
"── \u001b[1mAttaching packages\u001b[22m ─────────────────────────────────────── tidyverse 1.3.2 ──\n",
50+
"\u001b[32m✔\u001b[39m \u001b[34mtibble \u001b[39m 3.1.8 \u001b[32m✔\u001b[39m \u001b[34mdplyr \u001b[39m 1.0.10\n",
51+
"\u001b[32m✔\u001b[39m \u001b[34mtidyr \u001b[39m 1.2.1 \u001b[32m✔\u001b[39m \u001b[34mstringr\u001b[39m 1.5.0 \n",
52+
"\u001b[32m✔\u001b[39m \u001b[34mreadr \u001b[39m 2.1.3 \u001b[32m✔\u001b[39m \u001b[34mforcats\u001b[39m 0.5.2 \n",
53+
"\u001b[32m✔\u001b[39m \u001b[34mpurrr \u001b[39m 1.0.0 \n",
54+
"── \u001b[1mConflicts\u001b[22m ────────────────────────────────────────── tidyverse_conflicts() ──\n",
55+
"\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mfilter()\u001b[39m masks \u001b[34mstats\u001b[39m::filter()\n",
56+
"\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mlag()\u001b[39m masks \u001b[34mstats\u001b[39m::lag()\n",
57+
"\n",
58+
"Attaching package: ‘reshape2’\n",
59+
"\n",
60+
"\n",
61+
"The following object is masked from ‘package:tidyr’:\n",
62+
"\n",
63+
" smiths\n",
64+
"\n",
65+
"\n"
66+
]
67+
}
68+
],
1469
"source": [
1570
"setwd('../../')\n",
1671
"source('.Rprofile')\n",

0 commit comments

Comments
 (0)