Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tanliwei-coder committed Dec 4, 2024
1 parent b33a003 commit 78b14e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
3 changes: 2 additions & 1 deletion stereo/algorithm/spt/single_time/gene_regulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def __init__(
filter_genes(self.data2, min_cells=min_cells[1], inplace=True)

# get same genes
same_genes = list(self.data1.genes.var.index & self.data2.genes.var.index)
# same_genes = list(self.data1.genes.var.index & self.data2.genes.var.index)
same_genes = list(self.data1.genes.var.index.intersection(self.data2.genes.var.index))
self.data1 = self.data1.sub_by_name(cell_name=self.cell_mapping['slice1'], gene_name=same_genes, copy=False)
self.data2 = self.data2.sub_by_name(cell_name=self.cell_mapping['slice2'], gene_name=same_genes, copy=False)
self.genes = self.data1.genes.var.index
Expand Down
21 changes: 9 additions & 12 deletions stereo/core/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ def __init__(
self.batch = self._set_batch(batch)
self.cell_border = cell_border
self.cell_point = None

def __getattr__(self, key):
return getattr(self._obs, key)

def __contains__(self, item):
return item in self._obs.columns
Expand Down Expand Up @@ -94,17 +91,17 @@ def size(self):
def shape(self):
return self._obs.shape

# @property
# def loc(self):
# return self._obs.loc
@property
def loc(self):
return self._obs.loc

# @property
# def iloc(self):
# return self._obs.iloc
@property
def iloc(self):
return self._obs.iloc

# @property
# def to_csv(self):
# return self._obs.to_csv
@property
def to_csv(self):
return self._obs.to_csv

@property
def obs(self):
Expand Down

0 comments on commit 78b14e8

Please sign in to comment.