You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: sobolev_alignment/sobolev_alignment.py
+29-23
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
"""
2
-
<h2>Sobolev Alignment</h2>
2
+
Sobolev Alignment.
3
3
4
4
@author: Soufiane Mourragui
5
5
6
6
References
7
7
----------
8
-
Mourragui et al, Identifying commonalities between cell lines and tumors at the single cell level using Sobolev Alignment of deep generative models, Biorxiv, 2022.
8
+
Mourragui et al, Identifying commonalities between cell lines and tumors at the single cell level using
9
+
Sobolev Alignment of deep generative models, Biorxiv, 2022.
9
10
Lopez et al, Deep generative modeling for single-cell transcriptomics, Nature Methods, 2018.
10
11
Meanti et al, Kernel methods through the roof: handling billions of points efficiently, NeurIPS, 2020.
11
12
"""
@@ -45,7 +46,7 @@
45
46
46
47
classSobolevAlignment:
47
48
"""
48
-
Sobolev Alignment implementation
49
+
Sobolev Alignment implementation.
49
50
50
51
Main class for Sobolev Alignment, which wraps all the different operations presented in Sobolev Alignment procedure:
51
52
- Model selection (scVI and KRR)
@@ -66,8 +67,8 @@ def __init__(
66
67
target_scvi_params: dict=None,
67
68
source_krr_params: dict=None,
68
69
target_krr_params: dict=None,
69
-
n_artificial_samples: int=int(10e5),
70
-
n_samples_per_sample_batch: int=10**6,
70
+
n_artificial_samples: int=10**5,
71
+
n_samples_per_sample_batch: int=10**5,
71
72
frac_save_artificial: float=0.1,
72
73
save_mmap: str=None,
73
74
log_input: bool=True,
@@ -237,7 +238,7 @@ def fit(
237
238
sample_artificial: bool=True,
238
239
):
239
240
"""
240
-
Runs the complete Sobolev Alignment workflow between a source (e.g. cell line) and a target (e.g. tumor) dataset.
241
+
Run complete Sobolev Alignment workflow between a source (e.g. cell line) and a target (e.g. tumor) dataset.
241
242
242
243
Source and target data should be passed as AnnData and potential batch names
243
244
(source_batch_name, target_batch_name) should be part of the "obs" element
0 commit comments