Skip to content

Commit

Permalink
key bug in transfer annotation function (#77)
Browse files Browse the repository at this point in the history
Co-authored-by: Gary <sambray@stanford.edu>
  • Loading branch information
chewc and samuelbray32 committed Jun 11, 2022
1 parent 413d7c5 commit 279ab36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samap/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,8 +1531,8 @@ def transfer_annotations(sm,reference_id=None, keys=[],num_iters=5, inplace = Tr
samref = sm.sams[reference_id]
ANN = stitched.adata.obs
ANNr = samref.adata.obs
cl = ANN[key].values.astype('object').astype('str')
clr = reference_id+'_'+ANNr[key].values.astype('object')
cl = ANN[reference_id+'_'+key].values.astype('object').astype('str')
clr = ANNr[key].values.astype('object')
cl[np.invert(np.in1d(cl,clr))]=''
clu,clui = np.unique(cl,return_inverse=True)
P = np.zeros((NNM.shape[0],clu.size))
Expand Down

0 comments on commit 279ab36

Please sign in to comment.