churchill-lab / gbrs

Genotype-free genome reconstruction and ASE quantification
MIT License
8 stars 3 forks source link

Version conflicts on install #3

Closed exsquire closed 4 years ago

exsquire commented 4 years ago

Hi KB,

Attempting to run gbrs, followed the installation instructions here: https://churchill-lab.github.io/gbrs/

Getting the following conflicts:


$ conda create -n gbrs python=2
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/esque/miniconda/envs/gbrs

  added / updated specs:
    - python=2

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2019.10.16-0
  certifi            pkgs/main/linux-64::certifi-2019.9.11-py27_0
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.1-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1d-h7b6447c_3
  pip                pkgs/main/linux-64::pip-19.3.1-py27_0
  python             pkgs/main/linux-64::python-2.7.17-h9bab390_0
  readline           pkgs/main/linux-64::readline-7.0-h7b6447c_5
  setuptools         pkgs/main/linux-64::setuptools-42.0.1-py27_0
  sqlite             pkgs/main/linux-64::sqlite-3.30.1-h7b6447c_0
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  wheel              pkgs/main/linux-64::wheel-0.33.6-py27_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate gbrs
#
# To deactivate an active environment, use
#
#     $ conda deactivate

$ conda activate gbrs
(gbrs) $ conda install -c kbchoi gbrs

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.                                                                               failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package ncurses conflicts for:
python=2 -> ncurses[version='6.0.*|>=6.0,<7.0a0|>=6.1,<7.0a0']
Package emase conflicts for:
gbrs -> emase
Package zlib conflicts for:
python=2 -> zlib[version='>=1.2.11,<1.3.0a0']
Package bx-python conflicts for:
gbrs -> bx-python[version='>=0.7.2']
Package openssl conflicts for:
python=2 -> openssl[version='1.0.*|1.0.*,>=1.0.2l,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a|>=1.0.2o,<1.0.3a|>=1.0.2p,<1.0.3a|>=1.1.1a,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1d,<1.1.2a']
Package matplotlib conflicts for:
gbrs -> matplotlib
Package sqlite conflicts for:
python=2 -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.25.2,<4.0a0|>=3.25.3,<4.0a0|>=3.27.2,<4.0a0|>=3.29.0,<4.0a0|>=3.30.0,<4.0a0']
Package pip conflicts for:
python=2 -> pip
Package libgcc-ng conflicts for:
python=2 -> libgcc-ng[version='>=7.2.0|>=7.3.0']
Package libstdcxx-ng conflicts for:
python=2 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
Package ca-certificates conflicts for:
python=2 -> ca-certificates
Package pysqlite conflicts for:
gbrs -> pysqlite[version='>=2.6.3']
Package libffi conflicts for:
python=2 -> libffi[version='3.2.*|>=3.2.1,<4.0a0']
Package pytables conflicts for:
gbrs -> pytables[version='>=3.1.0']
Package g2gtools conflicts for:
gbrs -> g2gtools
Package pysam conflicts for:
gbrs -> pysam[version='>=0.8.1']
Package readline conflicts for:
python=2 -> readline[version='7.*|>=7.0,<8.0a0']
Package tk conflicts for:
python=2 -> tk[version='8.6.*|>=8.6.7,<8.7.0a0|>=8.6.8,<8.7.0a0']
Package biopython conflicts for:
gbrs -> biopython[version='>=1.63']

Do you have any suggestions around this other than installing the dependencies manually?

kbchoi-jax commented 4 years ago

The installation used to be a one-liner but conda messed it up since at some point. Unfortunately I could not find a good time to sit down and fix it yet. Are you familiar with using docker image? If not, you will have to install all its dependency including emase by yourself.

  1. Go to gbrs source folder and activate gbrs conda environment
  2. Checkout release/0.1.6 branch
  3. Install dependency packages from PyPI like this
    $ pip install numpy==1.8.2
    $ pip install numexpr==2.3.1
    $ pip install scipy==0.13.3
    $ pip install pysam
    $ pip install cython
    $ pip install tables==3.1.0 (If this fails, try ‘conda install pytables==3.1.0’)
    $ pip install biopython
    $ pip install emase
    $ pip install matplotlib
    $ pip install bx-python
    $ conda install -c kbchoi pysqlite
  4. Open setup.py and comment out # requirements.append('g2gtools') line
  5. Install gbrs like this
    $ python setup.py install

Sorry about the complication. Hope this help.

exsquire commented 4 years ago

No worries, thanks for the input. I have 2 questions:

  1. I am running this from an Ubuntu allocation on a cluster and not quite sure what you mean by 'go to gbrs source folder'. I assumed this was the miniconda env I created for gbrs, but soon realized it probably wasn't.

  2. I am not familiar with docker image, but that may be the next thing I try since installation of individual dependencies snagged at tables. What would be my next move using docker?

(gbrs) $ pip install tables==3.1.0
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tables==3.1.0
  Using cached https://files.pythonhosted.org/packages/b3/31/d0d47c6187d6dd9594ef165f8dd7252670c9d3c00a546bd5e56f38061a71/tables-3.1.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/esque/miniconda/envs/gbrs/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6g6tu5/tables/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6g6tu5/tables/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-6g6tu5/tables/pip-egg-info
         cwd: /tmp/pip-install-6g6tu5/tables/
    Complete output (19 lines):
    /tmp/H5closefIm51B.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
     main (int argc, char **argv) {
     ^~~~
    /tmp/H5closefIm51B.c: In function ‘main’:
    /tmp/H5closefIm51B.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
         H5close();
         ^~~~~~~
    /usr/bin/ld: cannot find -lhdf5
    collect2: error: ld returned 1 exit status
    * Using Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55)
    * Found numpy 1.8.2 package installed.
    * Found numexpr 2.3.1 package installed.
    * Found Cython 0.29.14 package installed.
    /usr/bin/ld: cannot find -lhdf5
    collect2: error: ld returned 1 exit status
    .. ERROR:: Could not find a local HDF5 installation.
       You may need to explicitly state where your local HDF5 headers and
       library can be found by setting the ``HDF5_DIR`` environment
       variable or by using the ``--hdf5`` command-line option.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Quick google search showed this to be a popular problem, but many of the fixes requires sudo, which isn't an option on a cluster. I attempted the non-root fixes, like pip installing from the pytables github, but no luck.

kbchoi commented 4 years ago
  1. You need to git clone https://github.com/churchill-lab/gbrs.git wherever you want to put gbrs source folder.

  2. Try conda install hdf5 or conda install -c conda-forge hdf5 and then pip install tables==3.1.0

exsquire commented 4 years ago

I'll try that.

Will the bowtie command work as usual for paired end fastq? (Also, is there a preferred/more appropriate venue to post questions about this tool?)

kbchoi commented 4 years ago

I designed gbrs to run with only R1 reads because not all experiments are paired ended. But we can improve allele-specific expression and isoform quantity after genome reconstruction is all performed. For that matter, let's switch this thread to email as it is off topic. Find me from the Jackson Lab once you are done with R1.

exsquire commented 4 years ago

KB,

I've solved the issue on my end.

The following successfully installed hdf5 but threw an error on the tables v3.1.0 install.

$ conda install hdf5
$ conda install -c conda-forge hdf5
$ pip install tables==3.1.0

The problem seemed to be that tables could not find the library path to hdf5.

Once I tried:

$ apt-get build-dep python-tables
$ HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ && pip install tables==3.1.0

and uncommented g2gtools in the setup.py, it worked like a charm!