Skip to content

Erro with T8_Batch.ipynb #2

Description

@uuup111

Hello, When I run the T8_Batch.ipynb, I found a problem as following:

`
After flitering: (20139, 11750)
adata = adata[:, adata.var[highly_variable]]: (20139, 3000)

STAGATE_slideseqv2mob_batch.py:73: ImplicitModificationWarning: Trying to modify attribute .obs of view, initializing view as actual.
adata.obs['X'] = adata.obsm['spatial'][:, 0]
------Calculating spatial graph...
Traceback (most recent call last):
File "STAGATE_slideseqv2mob_batch.py", line 84, in
STAGATE_pyG.Cal_Spatial_Net(temp_adata, rad_cutoff=50)
File "/hwfssz5/ST_BIOINTEL/P20Z10200N0039/06.groups/01.Bio_info_algorithm/renyating/software/python/lib/python3.8/site-packages/STAGATE_pyG-1.0.0-py3.8.egg/STAGATE_pyG/utils.py", line 82, in Cal_Spatial_Net
nbrs = sklearn.neighbors.NearestNeighbors(radius=rad_cutoff).fit(coor)
File "/hwfssz5/ST_BIOINTEL/P20Z10200N0039/06.groups/01.Bio_info_algorithm/renyating/software/python/lib/python3.8/site-packages/sklearn/neighbors/_unsupervised.py", line 175, in fit
return self._fit(X)
File "/hwfssz5/ST_BIOINTEL/P20Z10200N0039/06.groups/01.Bio_info_algorithm/renyating/software/python/lib/python3.8/site-packages/sklearn/neighbors/_base.py", line 444, in _fit
X = self._validate_data(X, accept_sparse="csr", order="C")
File "/hwfssz5/ST_BIOINTEL/P20Z10200N0039/06.groups/01.Bio_info_algorithm/renyating/software/python/lib/python3.8/site-packages/sklearn/base.py", line 577, in _validate_data
X = check_array(X, input_name="X", **check_params)
File "/hwfssz5/ST_BIOINTEL/P20Z10200N0039/06.groups/01.Bio_info_algorithm/renyating/software/python/lib/python3.8/site-packages/sklearn/utils/validation.py", line 909, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required by NearestNeighbors.
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions