Open mdozmorov opened 1 month ago
Prof. Dozmorov,
Sincerely apologize for the troubles using scVI-3D and my very late reply due to a series of deadlines!!
Indeed, a lot of dependency packages have been updated dramatically and a lot of functions are depreciated. Upon a few attempts, I found updating scVI-3D to accommodate all the changes is not easily fixed. For a temporary solution, I found the following conda environment seems to work but I haven't tested it on all the data. I also found there is another user who recently successfully ran the demo data and hopefully, I can also learn his practice.
Please do let me know how it goes and I will also keep you posted when the updated version is released.
Thanks, Ye
name: schic-scvi-3d-202405
channels:
- conda-forge
- defaults
- bioconda
- anaconda
dependencies:
- python==3.8
- scvi-tools==0.14.5
- scanpy>=1.7.1
- anndata>=0.7.5
- matplotlib==3.6.0
- pytorch-lightning==1.3
- pytorch==1.8.0
- torchmetrics==0.6.0
You can also try adjusting the version of scikit-learn to 0.24.2 to see if that works
I have tried the new environment schic-scvi-3d-202405.yml in order below
micromamba create -f scVI-3D_environment.yml
pip install numpy==1.20.3
pip install scanpy==1.4.6
pip install pandas==1.2.4
pip install anndata==0.7.5
pip install scvi-tools==0.14.5
pip install joblib==1.1.0
pip install matplotlib==3.1.1
pip install umap==0.3.10
pip install --upgrade scanpy
pip install --upgrade "matplotlib>=3.4"
pip install scikit-learn==0.24.2
I gave me the result of 'cell_info_summary_sorted.txt' but no other files. I also receive some error:
/Users/mynguyen/micromamba/envs/schic-scvi-3d-202405/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning: ERROR: setuptools==59.5.0 is used in combination with setuptools_scm>=8.x
Your build configuration is incomplete and previously worked by accident! setuptools_scm requires setuptools>=61
Suggested workaround if applicable:
migrating from the deprecated setup_requires mechanism to pep517/518 and using a pyproject.toml to declare build dependencies which are reliably pre-installed before running the build tools
warnings.warn(
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 18, in
I also tried to fix the error of'setuptools_scm', then I got this error:
Global seed set to 0
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 22, in
I also tried to install scikit-learn 0.24.2 as suggestion above. I got this error:
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 22, in
I am not too sure what I should do next. Could you help me to have a look? I appreciate your assistance.
@hamy12398, pull the latest changes. The installation works, thank you all for helping.
conda env create -f scVI-3D_conda_environment.yml -y
conda activate schic-scvi-3d
But running the demo results in another error. I checked conda-installed python is used. It may be a separate issue or should be directed to the scanpy authors, but is there an easy fix?
python scripts/scVI-3D.py -b 10 -c "whole" -r 1000000 -i "demoData" -o "results" -cs "supplementaryData/demoData_summary.txt" -g "supplementaryData/hg19.chrom.sizes" -br -n 100 -gpu -p 10 -pca 50 -up -tp -v
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 18, in <module>
import scanpy as sc
File "/opt/miniconda3/envs/schic-scvi-3d/lib/python3.8/site-packages/scanpy/__init__.py", line 45, in <module>
from . import datasets, experimental, external, get, logging, metrics, queries
File "/opt/miniconda3/envs/schic-scvi-3d/lib/python3.8/site-packages/scanpy/datasets/__init__.py", line 5, in <module>
from ._datasets import (
File "/opt/miniconda3/envs/schic-scvi-3d/lib/python3.8/site-packages/scanpy/datasets/_datasets.py", line 15, in <module>
from ..readwrite import read, read_visium
File "/opt/miniconda3/envs/schic-scvi-3d/lib/python3.8/site-packages/scanpy/readwrite.py", line 1015
) as t,
^
SyntaxError: invalid syntax
Sorry for the continuing trouble. I guess I should fix the Scanpy and anndata versions as well.
- scanpy==1.9.8
- anndata==0.7.5
(On my side, scanpy installed version is 1.7.1 but more recent successful practice from another user used scanpy==1.9.8: https://github.com/yezhengSTAT/scVI-3D/issues/11#issuecomment-2106708518)
Please let me know if it still does not work.
We really try to make it work, but I'm running out of ideas. First, conda env create -f scVI-3D_conda_environment.yml -y
never finishes, I waited maybe 3-4 days. micromamba env create -f scVI-3D_conda_environment.yml -y
installs the environment on a GPU node, but running the example gives (after some progress):
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 743, in <module>
res = Parallel(n_jobs=coreN,backend='multiprocessing')(delayed(normalize)(bandM, cellInfo, chromSelect, bandDist, nLatent, batchFlag, gpuFlag) for bandM, chromSelect, bandDist in bandMiter)
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 2007, in __call__
return output if self.return_generator else list(output)
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 1650, in _get_outputs
yield from self._retrieve()
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 1754, in _retrieve
self._raise_error_fast()
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 1789, in _raise_error_fast
error_job.get_result(self.timeout)
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 745, in get_result
return self._return_or_raise()
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/joblib/parallel.py", line 763, in _return_or_raise
raise self._result
AssertionError: Torch not compiled with CUDA enabled
Removing the -gpu
option proceeds a bit further but gives another error:
UMAP visualization.
Traceback (most recent call last):
File "scripts/scVI-3D.py", line 813, in <module>
cbar.set_ticklabels(list(colorDict.keys()))
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/matplotlib/_api/deprecation.py", line 384, in wrapper
return func(*inner_args, **inner_kwargs)
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/matplotlib/colorbar.py", line 928, in set_ticklabels
self._long_axis().set_ticklabels(ticklabels, minor=minor, **kwargs)
File "/lustre/home/mdozmorov/micromamba/envs/schic-scvi-3d/lib/python3.8/site-packages/matplotlib/axis.py", line 1890, in set_ticklabels
raise ValueError(
ValueError: The number of FixedLocator locations (6), usually from a call to set_ticks, does not match the number of ticklabels (4).
Anything else we can try?
So sorry to hear that the installation is still not successful. Let me try on AWS tomorrow in case our institution's server is not generalizable.
Meanwhile, if your analysis target is to normalize scHi-C data for application study, I would recommend first running BandNorm (https://github.com/sshen82/BandNorm), which is usually faster and does a very decent job of removing noise and has a nice cell-type separation.
Otherwise, another user (https://github.com/yezhengSTAT/scVI-3D/issues/11#issuecomment-2106708518) who is successful in running scVI-3D also kindly shared the conda environment in use. Maybe that also worth trying.
Apologize for the trouble, again.
Ye
Prof. Dozmorov,
Sorry for the delay. I tried on a clean environment on AWS Ubuntu of 2 cpu and 8Gb RAM, which can run the demo data successfully using CPU parallel running. Attached are the server parameters (lscpu) and the job running log.
lscpu.txt scVI-3D_cpu_version.txt
Let me get back to you regarding the GPU setting.
Thanks, Ye
Thank you, Ye. I actually managed to install the environment as described in (https://github.com/yezhengSTAT/scVI-3D/issues/11#issuecomment-2106708518) and the demo command is still running. Probably stuck at Terminating: fork() called from a process already using GNU OpenMP, this is unsafe.
. We'll try on AWS.
I just realized the two txt files I attached yesterday contain many messy symbols due to file format transformation. I have cleaned them up for easy reading.
For the GPU usage, indeed, it is quite tricky as the software is built using relatively old pytorch modules. I requested the following machine on AWS, which comes with a PyTorch conda environment of version 1.10:
Deep Learning AMI GPU PyTorch 1.10.0 (Ubuntu 18.04) 20220927
The following script contains how I installed the other packages. The key is to use pip install --no-deps
to install scvi, pytorch-lighting and torchmetrics so that they won't upgrade each other's version.
Here is the full running log. scVI-3D_GPU_log.txt
Hi Ye,
hamy12398, my student, and I are trying to make scVI-3D working. We are encountering the same issue on different computers.
First, installation has torch version incompatibility. We got this error:
It is fixed by changing
torch>=1.8.0
inpython-requirements.txt
. Everything installs without errors. But running the actual demo command gives an error. I'm not sure what to do here, could you, please, help?