snap-stanford / SATURN

MIT License
108 stars 17 forks source link

ValueError: b'Extrapolation not allowed with blending' #44

Closed cadyyuheng closed 7 months ago

cadyyuheng commented 7 months ago

Thanks for sharing this tool! It would be great if I can get some help to understand the following error:

Traceback (most recent call last):
  File "/path/Cross Species/SATURN-main/train-saturn.py", line 1064, in <module>
    trainer(args)
  File "/path/Cross Species/SATURN-main/train-saturn.py", line 528, in trainer
    sc.pp.highly_variable_genes(adata, flavor='seurat_v3', n_top_genes=args.hv_genes)  # Expects Count Data
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/env/pytorch_gpu_env_rcs/lib/python3.11/site-packages/legacy_api_wrap/__init__.py", line 80, in fn_compatible
    return fn(*args_all, **kw)
           ^^^^^^^^^^^^^^^^^^^
  File "/path/env/pytorch_gpu_env_rcs/lib/python3.11/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 626, in highly_variable_genes
    return _highly_variable_genes_seurat_v3(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/env/pytorch_gpu_env_rcs/lib/python3.11/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 95, in _highly_variable_genes_seurat_v3
    model.fit()
  File "_loess.pyx", line 899, in _loess.loess.fit
ValueError: b'Extrapolation not allowed with blending'

Attached is the list of my packages and their version:

Package                   Version
------------------------- ------------------
absl-py                   2.1.0
aiohttp                   3.9.3
aiosignal                 1.3.1
anndata                   0.10.6
annotated-types           0.6.0
anyio                     3.7.1
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
array_api_compat          1.5.1
arrow                     1.3.0
ase                       3.22.1
asttokens                 2.4.1
async-lru                 2.0.4
attrs                     23.2.0
Babel                     2.14.0
backoff                   2.2.1
beautifulsoup4            4.12.3
biopython                 1.83
biotite                   0.39.0
bleach                    6.1.0
blessed                   1.19.1
blinker                   1.7.0
boto3                     1.34.73
botocore                  1.34.73
Brotli                    1.1.0
build                     1.2.1
CacheControl              0.14.0
cached-property           1.5.2
captum                    0.6.0
certifi                   2024.2.2
cffi                      1.16.0
charset-normalizer        3.3.2
chex                      0.1.86
cleo                      2.1.0
click                     8.1.7
colorama                  0.4.6
comm                      0.2.2
contextlib2               21.6.0
contourpy                 1.2.0
crashtest                 0.4.1
croniter                  1.4.1
cryptography              42.0.5
cycler                    0.12.1
daal4py                   2024.1.0
dateutils                 0.6.12
debugpy                   1.8.1
decorator                 5.1.1
deepdiff                  6.7.1
defusedxml                0.7.1
distlib                   0.3.8
docrep                    0.3.2
docstring_parser          0.16
dulwich                   0.21.7
entrypoints               0.4
et-xmlfile                1.1.0
etils                     1.8.0
exceptiongroup            1.2.0
executing                 2.0.1
fair-esm                  2.0.0
faiss                     1.7.4
fastapi                   0.110.0
fastjsonschema            2.19.1
filelock                  3.13.3
Flask                     3.0.2
flax                      0.8.2
fonttools                 4.50.0
fqdn                      1.5.1
frozenlist                1.4.1
fsspec                    2024.3.1
get-annotations           0.1.2
gmpy2                     2.1.2
h11                       0.14.0
h2                        4.1.0
h5py                      3.10.0
hpack                     4.0.0
httpcore                  1.0.5
httpx                     0.27.0
hyperframe                6.0.1
idna                      3.6
igraph                    0.11.4
imagecodecs               2024.1.1
imageio                   2.34.0
importlib_metadata        7.1.0
importlib_resources       6.4.0
inquirer                  3.1.4
installer                 0.7.0
ipdb                      0.13.13
ipykernel                 6.29.3
ipython                   8.22.2
isodate                   0.6.1
isoduration               20.11.0
itsdangerous              2.1.2
jaraco.classes            3.3.1
jax                       0.4.25
jaxlib                    0.4.23.dev20240224
jedi                      0.19.1
jeepney                   0.8.0
Jinja2                    3.1.3
jmespath                  1.0.1
joblib                    1.3.2
json5                     0.9.24
jsonpointer               2.4
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.6.1
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.4
jupyter_server            2.13.0
jupyter_server_terminals  0.5.3
jupyterlab                4.1.5
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.4
keyring                   24.3.1
kiwisolver                1.4.5
lazy_loader               0.3
legacy-api-wrap           1.4
lightning                 2.0.9.post0
lightning_cloud           0.5.65
lightning-utilities       0.11.2
llvmlite                  0.42.0
louvain                   0.8.2
markdown-it-py            3.0.0
MarkupSafe                2.1.5
matplotlib                3.8.3
matplotlib-inline         0.1.6
mdurl                     0.1.2
mistune                   3.0.2
ml-collections            0.1.1
ml-dtypes                 0.3.2
more-itertools            10.2.0
mpmath                    1.3.0
msgpack                   1.0.7
mudata                    0.2.3
multidict                 6.0.5
multipledispatch          0.6.0
munkres                   1.1.4
mypy-extensions           1.0.0
natsort                   8.4.0
nbclient                  0.10.0
nbconvert                 7.16.3
nbformat                  5.10.3
nest_asyncio              1.6.0
networkx                  3.2.1
notebook                  7.1.2
notebook_shim             0.2.4
numba                     0.59.1
numpy                     1.26.4
numpyro                   0.14.0
openpyxl                  3.1.2
opt-einsum                3.3.0
optax                     0.2.2
orbax-checkpoint          0.4.4
ordered-set               4.1.0
orjson                    3.9.15
overrides                 7.7.0
packaging                 24.0
pandas                    2.2.1
pandocfilters             1.5.0
parso                     0.8.3
patsy                     0.5.6
pexpect                   4.9.0
pickleshare               0.7.5
pillow                    10.2.0
pip                       24.0
pkginfo                   1.10.0
pkgutil_resolve_name      1.3.10
platformdirs              4.2.0
plotly                    5.19.0
ply                       3.11
poetry                    1.8.2
poetry-core               1.9.0
poetry-plugin-export      1.7.1
prometheus_client         0.20.0
prompt-toolkit            3.0.42
protobuf                  4.25.1
psutil                    5.9.8
ptyprocess                0.7.0
pure-eval                 0.2.2
pycparser                 2.21
pydantic                  2.1.1
pydantic_core             2.4.0
Pygments                  2.17.2
PyJWT                     2.8.0
pynndescent               0.5.11
pyparsing                 3.1.2
pyproject_hooks           1.0.0
PyQt5                     5.15.9
PyQt5-sip                 12.12.2
pyro-api                  0.1.2
pyro-ppl                  1.9.0+f02dfb9
PySocks                   1.7.1
python-dateutil           2.9.0
python-editor             1.0.4
python-json-logger        2.0.7
python-multipart          0.0.9
pytorch-lightning         2.2.1
pytz                      2024.1
PyWavelets                1.4.1
PyYAML                    6.0.1
pyzmq                     25.1.2
rapidfuzz                 3.7.0
rdflib                    7.0.0
readchar                  4.0.5.dev0
record-keeper             0.9.32
referencing               0.34.0
requests                  2.31.0
requests-toolbelt         1.0.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rich                      13.7.1
rpds-py                   0.18.0
s3transfer                0.10.1
scanpy                    1.10.0
scikit-image              0.22.0
scikit-learn              1.4.1.post1
scikit-learn-intelex      20240125.174742
scikit-misc               0.1.4
scipy                     1.12.0
scvi-tools                1.1.2
seaborn                   0.13.2
SecretStorage             3.3.3
Send2Trash                1.8.2
session-info              1.0.0
setuptools                69.2.0
shellingham               1.5.4
sip                       6.7.12
six                       1.16.0
sniffio                   1.3.1
soupsieve                 2.5
sparse                    0.15.1
stack-data                0.6.2
starlette                 0.36.3
starsessions              1.3.0
statsmodels               0.14.1
stdlib-list               0.10.0
sympy                     1.12
tenacity                  8.2.3
tensorstore               0.1.51
terminado                 0.18.1
texttable                 1.7.0
threadpoolctl             3.4.0
tifffile                  2024.2.12
tinycss2                  1.2.1
toml                      0.10.2
tomli                     2.0.1
tomlkit                   0.12.4
toolz                     0.12.1
torch                     2.1.2.post301
torch_geometric           2.5.0
torch_scatter             2.1.1
torchmetrics              1.3.2
torchvision               0.16.1+b88453f
tornado                   6.4
tqdm                      4.66.2
traitlets                 5.14.2
trimesh                   4.2.2
trove-classifiers         2024.3.25
typed-argument-parser     1.9.0
types-python-dateutil     2.9.0.20240316
typing_extensions         4.10.0
typing-inspect            0.9.0
typing-utils              0.1.0
tzdata                    2024.1
umap-learn                0.5.5
uri-template              1.3.0
urllib3                   2.2.1
uvicorn                   0.29.0
virtualenv                20.25.1
wcwidth                   0.2.13
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.7.0
websockets                12.0
Werkzeug                  3.0.1
wheel                     0.43.0
xarray                    2024.2.0
xlrd                      1.2.0
yarl                      1.9.4
zipp                      3.17.0
Yanay1 commented 7 months ago

Please see this thread: https://discourse.scverse.org/t/error-in-highly-variable-gene-selection/276/5

It might be worth trying to filter the highly variable genes in each dataset individually before passing them into SATURN.