dpeerlab / Palantir

Single cell trajectory detection
https://palantir.readthedocs.io
GNU General Public License v2.0
213 stars 50 forks source link

phenograph error during install #20

Closed sroyyors closed 5 years ago

sroyyors commented 5 years ago

hi, I am trying to install this via conda using pip install .

But I get the following error "Collecting phenograph (from palantir==0.2.1) ERROR: Could not find a version that satisfies the requirement phenograph (from palantir==0.2.1) (from versions: none) ERROR: No matching distribution found for phenograph (from palantir==0.2.1)

I tried to install this directly from git as mentioned in setup.py, but I am not sure if it worked because subsequently I got a segmentation fault while trying the test example in the _dm_res = palantir.utils.run_diffusion_maps(pca_projections, ncomponents=5) command

ManuSetty commented 5 years ago

Hello

Could you please try installing Phenograph from here: https://github.com/dpeerlab/PhenoGraph and see if it resolves the issue?

sroyyors commented 5 years ago

hi Manu, no I still get the issue. I installed phenograph from the above url, commented the "phonograph" package in the install file and installation went through fine (which it had previously), but it failed to again run the diffusion map. Here is what happens (I normalize counts and log transform, following the example in https://nbviewer.jupyter.org/github/dpeerlab/Palantir/blob/master/notebooks/Palantir_sample_notebook.ipynb#palantir).

_dm_res = palantir.utils.run_diffusion_maps(pca_projections, ncomponents=5) Determing nearest neighbor graph... Segmentation fault (core dumped)

Can I run palantir in more verbose mode?

ManuSetty commented 5 years ago

Unfortunately, there is no further verbose option.

This looks like an issue that is not related to Phenograph since that package is not used in the computation where this is failing. The nearest neighbor graph is computed using scanpy. Can you please let me know what version of python, scanpy, scipy, numpy and pandas you are using?

sroyyors commented 5 years ago

I am using python=3.7.4, scipy=1.3.1, numpy=1.16.5. I don't see pandas in my conda environment. For scanpy, it should have been what is in the setup.py. But I did not specify a specific version. If I check the version, it seems to be 1.4.4.post1.

Here is my conda env for palantir.

name: palantir4 channels:

ManuSetty commented 5 years ago

I have numpy version 1.71.1 but I do not think that should matter. However, I am surprised you do not have pandas in the environment since it is a key dependency for Palantir and is specified in the setup file. Perhaps, trying to install pandas manually will help?

sroyyors commented 5 years ago

actually I just manually installed scanpy and it added pandas. The error seems to be with scanpy, failing in line 41 of utils.py temp = sc.AnnData(data_df.values)

I'll see if I can figure this out

sroyyors commented 5 years ago

good news! I was able to get it to work. Turns out that scanpy was using an older (default package) of matplotlib. I had to manually set PYTHONUSERBASE to the site_packages path of the conda environment.

ManuSetty commented 5 years ago

Ok great - glad to hear it all worked out!