Skip to content

Commit

Permalink
Merge branch 'aristoteleo:main' into main
Browse files Browse the repository at this point in the history
chansigit authored Jul 6, 2024
2 parents d011485 + b5b2acf commit d693d7e
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spateo/alignment/methods/morpho.py
Original file line number Diff line number Diff line change
@@ -240,7 +240,7 @@ def BA_align(
batch_size: int = 1000,
partial_robust_level: float = 25,
) -> Tuple[Optional[Tuple[AnnData, AnnData]], np.ndarray, np.ndarray]:
"""_summary_
"""core function for spateo pairwise alignment
Args:
sampleA: Sample A that acts as reference.
1 change: 1 addition & 0 deletions spateo/alignment/methods/morpho_sparse_utils.py
Original file line number Diff line number Diff line change
@@ -112,6 +112,7 @@ def calc_P_related(
# metric = 'square_euc'
NA, NB = XnAHat.shape[0], XnB.shape[0]
D = XnAHat.shape[1]
G = X_A.shape[1]
batch_base = 1e9
split_size = min(int(batch_capacity * batch_base / (NA * G)), NB)
split_size = 1 if split_size == 0 else split_size
9 changes: 8 additions & 1 deletion spateo/alignment/methods/utils.py
Original file line number Diff line number Diff line change
@@ -140,7 +140,14 @@ def normalize_coords(

# normalize_scale now becomes to a list
normalize_scale_list = []
normalize_scale_list = nx.zeros((len(coords, )), type_as=coords[0])
normalize_scale_list = nx.zeros(
(
len(
coords,
)
),
type_as=coords[0],
)
normalize_mean_list = []
for i in range(len(coords)):
normalize_mean = nx.einsum("ij->j", coords[i]) / coords[i].shape[0]

0 comments on commit d693d7e

Please sign in to comment.