-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation of xfuse #75
Comments
I have tried on a HPC, in a new conda environment. I am still having a problem installing The command I then try to install with is: The error is similar to the above comment. Can this package be installed another way? The contents of the output are shown below: ` File "/tmp/pip-build-env-fbz3xb7k/overlay/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 958, in _get_configuration_from_setup_py note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
Thanks for reporting. I can reproduce this on my computer. It seems the scikit-learn version used in xfuse does not support Python 3.10 or 3.11. I would recommend using Python 3.8 instead, since that is the version xfuse was developed on. When creating your conda environment, you can specify the Python version to install like this: |
@ludvb Does this relate to one of the space ranger files? If so, which one? The error seems unclear. |
I think this error may happen when there is a mismatch between the files passed to the --image and --tissue-positions arguments, so that the spot coordinates are off. The image file should be the same as the one passed to Space Ranger (note that the image files produced by Space Ranger, tissue_hires_image.png and tissue_lowres_image.png, are not used by xfuse). |
@ludvb For the |
👍 This is fine and necessary. Newer versions of Space Ranger includes a header which xfuse doesn't expect.
This should also not be a problem.
The tissue_hires_image.png file is a downsampled version of the original brightfield image. The tissue_positions file specifies spot coordinates in the original image and not the hires image, so xfuse convert only works with the original image. If you don't have access to the original image, it is also possible to convert the positions to coordinates in the hires image by multiplying them by the hires scale factor "tissue_hires_scalef" in the scalefactors_json.json file. If you can get hold of the original brightfield image that is a better option however, since it would avoid resampling the downscaled image. |
Pointing to the brightfield image seemed to have worked, thanks! And also other messages such as Do I need to make any considerations for the remaining part of the |
The HPC that I use does not have a GPU. Approximately how long would a run for 1 of the samples take to process? My image is approx ~ |
This can sometimes be caused by passing the filtered_feature_bc_matrix.h5 instead of the raw_feature_bc_matrix.h5. The filtered matrix does not contain spots outside the tissue, which xfuse uses to initialize the inside/outside mask from.
xfuse runs best on images that have a height and width in the 1000 to 2000 px range. So if your brightfield image is, for example, 10000x10000, it's a good idea to specify
Running on the CPU - while possible - is not really suitable for anything besides testing on small toy datasets. You will see a time estimate when running, but it will probably take several days if not weeks to finish. What you can try is to reduce the |
So you are saying it is better to use |
In my experience, yes, something like that. It also depends on the patch_size that you specify in the config file; I think results are better usually when the training patches capture a quite large part of the tissue area. A theory would be that this makes it easier for the recognition network to know which part of the tissue it is looking at. |
I am trying to install
xfuse
on my laptop and on our HPC. I run the pip install command as listed on the GitHub but run into an error on both computers, as shown below. Does this package require some dependencies? Can xfuse be installed through conda? Does it matter if I try to install it withpip
orpip3
?`File "", line 188, in configuration
File "/tmp/pip-build-env-da5v2_l9/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1050, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
File "/tmp/pip-build-env-da5v2_l9/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1016, in get_subpackage
config = self.get_configuration_from_setup_py(
File "/tmp/pip-build-env-da5v2_l9/overlay/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 958, in get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "/tmp/pip-install-455o447/scikit-learn_ed3da863168d40b98d93dbf65283ce18/sklearn/setup.py", line 83, in configuration
cythonize_extensions(top_path, config)
File "/tmp/pip-install-455o447/scikit-learn_ed3da863168d40b98d93dbf65283ce18/sklearn/_build_utils/init.py", line 70, in cythonize_extensions
config.ext_modules = cythonize(
File "/tmp/pip-build-env-da5v2_l9/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1125, in cythonize
result.get(99999) # seconds
File "/homes/cathal.king/anaconda3/envs/xfuse/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
Cython.Compiler.Errors.CompileError: sklearn/ensemble/_hist_gradient_boosting/splitting.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`
The text was updated successfully, but these errors were encountered: