Skip to content

Commit e91ed91

Browse files
committed
Also apply filtering in pciseq on sdata transcripts
1 parent fe27535 commit e91ed91

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • src/methods_transcript_assignment/pciseq

src/methods_transcript_assignment/pciseq/script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ def eta_update_no_assert(self):
123123

124124
# There might be spots at the border of the image, pciseq runs into an error if this is the case
125125
transcripts_at_border = transcripts_dataframe['x'] > (label_image.shape[1]-0.5)
126+
transcripts_at_border = transcripts_at_border | (transcripts_dataframe['y'] > (label_image.shape[0]-0.5))
126127
transcripts_dataframe = transcripts_dataframe.loc[~transcripts_at_border]
127-
transcripts_at_border = transcripts_dataframe['y'] > (label_image.shape[0]-0.5)
128-
transcripts_dataframe = transcripts_dataframe.loc[~transcripts_at_border]
128+
transcripts_at_border_dask = transcripts.x > (label_image.shape[1]-0.5)
129+
transcripts_at_border_dask = transcripts_at_border_dask | (transcripts.y > (label_image.shape[0]-0.5))
130+
sdata[par['transcripts_key']] = sdata[par['transcripts_key']].loc[~transcripts_at_border_dask]
129131

130132
# Grab all the pciSeq parameters
131133
opts_keys = [#'exclude_genes',

0 commit comments

Comments
 (0)