Teichlab / cellphonedb

MIT License
340 stars 105 forks source link

Building wheels for collected packages: pandas fails #231

Closed stela2502 closed 3 years ago

stela2502 commented 3 years ago

Hi!

I am trying to install CellPhoneDB in a singularity image based on ubutu. You standard pip install cellphonedb does fail with a compile error in the 'Building wheels for collected packages: pandas' step:

error.txt

I assume this error can be tracked back to your request in setup.py to get 'pandas>=0.23,<0.23.99'. Is that really necessary? I have forked the project and am trying with a relaxed requirement.

The singularity build script is here: CellPhone.txt

And after having singularity installed you can reproduce the error by

sudo singularity build --sandbox cellPhone CellPhone.txt

Thank you for your help!

stela2502 commented 3 years ago

Hi again - and while at it you have an error in your README.txt:

cellphonedb method statistical_analysis test_meta.txt test_counts.txt needs to be changed to cellphonedb method statistical-analysis test_meta.txt test_counts.txt

replacing 'statistical_analysis' with 'statistical-analysis'...

stela2502 commented 3 years ago

The test example did work. Unfortunately I do not know what the results should be. Could you be so kind to check the output?

Thank you!

out.zip

prete commented 3 years ago

This Singularity definition file seems to be working fine. Please give it a try.

Bootstrap: docker
From: ubuntu:18.04

%post
    export DEBIAN_FRONTEND=noninteractive
    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

    # install python
    apt-get update
    apt-get install -yq \
        python3 \
        python3-dev \
        python3-pip \
        build-essential \
        apt-transport-https \
        software-properties-common

    # install R
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
    add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
    apt-get update
    apt-get install -y r-base r-base-dev
    Rscript -e 'install.packages(c("ggplot2","pheatmap"))'

    # install CellphoneDB
    pip3 install --no-cache-dir \
        scikit-learn==0.22 \
        cellphonedb

    # cleanup
    apt-get clean
    apt-get autoremove
    rm -rf /var/lib/apt/lists/*

%test
    # smoke test
    cellphonedb --help 

%runscript
    # entrypoint
    exec cellphonedb "$@"

Build

sudo singularity build cellphonedb.sif Singularity

Run

singularity run -B /some/place/:/data cellphonedb.sif method statistical_analysis /data/test_meta.txt  /data/test_counts.txt --output-path /data
stela2502 commented 3 years ago

Thank you for the input. I have (by hand) also created a working Singularity image. But having this working script in the documentation here is just great! Thank you!