Skip to content

Commit

Permalink
upgrade to v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mrland99 committed Apr 9, 2022
1 parent 34630cd commit 148e952
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/lib/paste/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .PASTE import pairwise_align, center_align
from .helper import match_spots_using_spatial_heuristic
from .helper import match_spots_using_spatial_heuristic, filter_for_common_genes
from .visualization import plot_slice, stack_slices_pairwise, stack_slices_center
19 changes: 19 additions & 0 deletions build/lib/paste/helper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
from typing import List
from anndata import AnnData
import numpy as np
import scipy
import ot

def filter_for_common_genes(
slices: List[AnnData]) -> None:
"""
Filters for the intersection of genes between all slices.
Args:
slices: List of slices.
"""
assert len(slices) > 0, "Cannot have empty list."

common_genes = slices[0].var.index
for s in slices:
common_genes = intersect(common_genes, s.var.index)
for i in range(len(slices)):
slices[i] = slices[i][:, common_genes]
print('Filtered all slices for common genes. There are ' + str(len(common_genes)) + ' common genes.')

def match_spots_using_spatial_heuristic(
X,
Y,
Expand Down
Binary file removed dist/paste-bio-1.2.1.tar.gz
Binary file not shown.
Binary file added dist/paste-bio-1.2.2.tar.gz
Binary file not shown.
Binary file removed dist/paste_bio-1.2.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/paste_bio-1.2.2-py3-none-any.whl
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = paste-bio
version = 1.2.1
version = 1.2.2
author = Max Land
author_email = max.ruikang.land@gmail.com
description = A computational method to align and integrate spatial transcriptomics experiments.
Expand Down
2 changes: 1 addition & 1 deletion src/paste_bio.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: paste-bio
Version: 1.2.1
Version: 1.2.2
Summary: A computational method to align and integrate spatial transcriptomics experiments.
Home-page: https://github.com/raphael-group/paste
Author: Max Land
Expand Down

0 comments on commit 148e952

Please sign in to comment.