Skip to content
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

Installing via environment.yml doesn't add command line entry points #68

Open
olgabot opened this issue Dec 29, 2016 · 2 comments
Open

Comments

@olgabot
Copy link
Collaborator

olgabot commented Dec 29, 2016

Description

I installed outrigger using the environment.yml file and didn't get the command line entry points, so I installed via pip and then got errors with the C libraries of pysam.

Steps to Reproduce

  1. conda env create --file environment.yml --name outrigger_v1.0.0rc1_v2
  2. source activate outrigger_v1.0.0rc1_v2
  3. which outrigger doesn't point to the environment (~/anaconda/envs/outrigger_v1.0.0rc1_v2/bin) but instead to the base environment (~/anaconda/bin)
  4. pip install .
  5. outrigger -h

Expected behavior: I expected to see the help message for how to use outrigger.

Actual behavior: Instead I saw this error message with pysam that I think has to do with how it was installed.

$ outrigger index -h
Traceback (most recent call last):
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/bin/outrigger", line 11, in <module>
    load_entry_point('outrigger==1.0.0rc1', 'console_scripts', 'outrigger')()
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/obotvinnik/workspace-git/outrigger/outrigger/commandline.py", line 19, in <module>
    from outrigger.io import star, gtf, bam
  File "/home/obotvinnik/workspace-git/outrigger/outrigger/io/bam.py", line 7, in <module>
    import pysam
  File "/home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pysam/__init__.py", line 6, in <module>
    from pysam.cutils import *
ImportError: /home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-packages/pysam/cutils.cpython-35m-x86_64-linux-gnu.so: undefined symbol: cram_container_get_landmarks

What actually works:

Installing the old way, i.e. via:

conda create -n outrigger_v1.0.0rc1_v3 --file conda_requirements.txt  --yes
source activate outrigger_v1.0.0rc1_v3
pip install -r requirements.txt 
pip install .

And this does properly install outrigger:

$ which outrigger
~/anaconda/envs/outrigger_v1.0.0rc1_v3/bin/outrigger
$ outrigger -h
usage: outrigger [-h] [--version] {index,validate,psi} ...

outrigger (1.0.0rc1). Calculate "percent-spliced in" (Psi) scores of
alternative splicing on a *de novo*, custom-built splicing index -- just for
you!

positional arguments:
  {index,validate,psi}  Sub-commands
    index               Build an index of splicing events using a graph
                        database on your junction reads and an annotation
    validate            Ensure that the splicing events found all have the
                        correct splice sites
    psi                 Calculate "percent spliced-in" (Psi) values using the
                        splicing event index built with "outrigger index"

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Versions

You can get this information from executing outrigger --version at the
command line. Please include the OS (Operating System) and what version of
the OS you're running.

$ outrigger --version
outrigger 1.0.0rc1
$ uname -a
Linux tscc-login2.sdsc.edu 2.6.32-642.6.1.el6.x86_64 #1 SMP Wed Oct 5 00:36:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
@olgabot
Copy link
Collaborator Author

olgabot commented Dec 29, 2016

This particular part of the stack trace:

  File "/home/obotvinnik/workspace-git/outrigger/outrigger/commandline.py", line 19, in <module>
    from outrigger.io import star, gtf, bam
  File "/home/obotvinnik/workspace-git/outrigger/outrigger/io/bam.py", line 7, in <module>
    import pysam

Shouldn't be happening because this should be calling the outrigger/commandline.py from /home/obotvinnik/anaconda/envs/outrigger_v1.0.0rc1_v2/lib/python3.5/site-package, not /home/obotvinnik/workspace-git/outrigger/outrigger/commandline.py

@ghost
Copy link

ghost commented Apr 18, 2017

Description

I encountered this issue but was eventually able to resolve it. I first tried environment creation from the environment.yml file and can confirm that outrigger was not by default installed to ~/anaconda2/envs/outrigger-env/bin, nor anywhere that I could easily find, including in /usr/lib/python* (system site packages). Consequently, outrigger -h was not recognized at the command line.

What worked

Changing directory into the cloned repo after activating the new environment, followed by pip install ./, which correctly installed outrigger to ~/anaconda2/envs/outrigger-env/bin and lead to expected output with outrigger -h, outrigger index -h, etc...

Steps to replicate successful environment install from source on Ubuntu 14.04

(as root)

  1. cd /var/git/
  2. git clone /~https://github.com/YeoLab/outrigger.git
  3. cd outrigger
  4. conda env create --file environment.yml
  5. source activate outrigger-env
  6. pip install ./
  7. outrigger -h (returns expected output)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant