Skip to content

Error in mode.preprocess step #1

@BioinfoTongLI

Description

@BioinfoTongLI

Hello there!

I have an issue running the preprocess step in the tutorial and the error log is:

### pct_filter: percent of spots filtered out

### default: filter 10% spots out

pct_filter=0.1

model.preprocess(pct_filter)

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
/tmp/ipykernel_910/2359267236.py in <module>
      2 ### default: filter 10% spots out
      3 pct_filter=0.1
----> 4 model.preprocess(pct_filter)

/home/jovyan/Documents/ClusterMap/ClusterMap/clustermap.py in preprocess(self, dapi_grid_interval, LOF, contamination, pct_filter)
     85 
     86     def preprocess(self,dapi_grid_interval=5, LOF=False, contamination=0.1, pct_filter=0.1):
---> 87         preprocessing_data(self.spots, dapi_grid_interval, self.dapi_binary, LOF,contamination, self.xy_radius,pct_filter)
     88 
     89     def segmentation(self,cell_num_threshold=0.01, dapi_grid_interval=5, add_dapi=True,use_genedis=True):

/home/jovyan/Documents/ClusterMap/ClusterMap/preprocessing.py in preprocessing_data(spots, dapi_grid_interval, dapi_binary, LOF, contamination, xy_radius, pct_filter)
    156 
    157         #spots in DAPI as inliers
--> 158         test=dapi_binary[list(spots_array[:,0]-1),list(spots_array[:,1]-1)]
    159         spots.loc[test==True,'is_noise']=0
    160 

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Is it because no nculei were detected here?
If so, is there any possibility to send DAPI label image instead of the raw?

Thanks for your help!

Best,
Tong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions