Skip to content

Commit 148e952

Browse files
committed
upgrade to v1.2.2
1 parent 34630cd commit 148e952

8 files changed

Lines changed: 22 additions & 3 deletions

File tree

build/lib/paste/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .PASTE import pairwise_align, center_align
2-
from .helper import match_spots_using_spatial_heuristic
2+
from .helper import match_spots_using_spatial_heuristic, filter_for_common_genes
33
from .visualization import plot_slice, stack_slices_pairwise, stack_slices_center

build/lib/paste/helper.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1+
from typing import List
2+
from anndata import AnnData
13
import numpy as np
24
import scipy
35
import ot
46

7+
def filter_for_common_genes(
8+
slices: List[AnnData]) -> None:
9+
"""
10+
Filters for the intersection of genes between all slices.
11+
12+
Args:
13+
slices: List of slices.
14+
"""
15+
assert len(slices) > 0, "Cannot have empty list."
16+
17+
common_genes = slices[0].var.index
18+
for s in slices:
19+
common_genes = intersect(common_genes, s.var.index)
20+
for i in range(len(slices)):
21+
slices[i] = slices[i][:, common_genes]
22+
print('Filtered all slices for common genes. There are ' + str(len(common_genes)) + ' common genes.')
23+
524
def match_spots_using_spatial_heuristic(
625
X,
726
Y,

dist/paste-bio-1.2.1.tar.gz

-14.5 KB
Binary file not shown.

dist/paste-bio-1.2.2.tar.gz

14.7 KB
Binary file not shown.
-12.4 KB
Binary file not shown.
12.7 KB
Binary file not shown.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = paste-bio
3-
version = 1.2.1
3+
version = 1.2.2
44
author = Max Land
55
author_email = max.ruikang.land@gmail.com
66
description = A computational method to align and integrate spatial transcriptomics experiments.

src/paste_bio.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: paste-bio
3-
Version: 1.2.1
3+
Version: 1.2.2
44
Summary: A computational method to align and integrate spatial transcriptomics experiments.
55
Home-page: https://github.com/raphael-group/paste
66
Author: Max Land

0 commit comments

Comments
 (0)