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

Adding pysam to requirements #168

Open
cat-bro opened this issue Jan 28, 2021 · 2 comments
Open

Adding pysam to requirements #168

cat-bro opened this issue Jan 28, 2021 · 2 comments

Comments

@cat-bro
Copy link
Contributor

cat-bro commented Jan 28, 2021

Not sure if this is an ephemeris issue or a galaxy issue:

shed-tools tests will fail on many tools where the test output files are bam files, with the error Converting local (test-data) BAM to SAM failed: 'NoneType' object has no attribute 'view'. If pysam is installed along with ephemeris they pass. There are also some tool tests that will fail unless h5py is installed. galaxy-tool-util calls on pysam and h5py but does not require them. The import statements within the galaxy-tool-util code are in try-catch statements:

try:
    import pysam
except ImportError:
    pysam = None

Possible solutions/ideas:
(a) Add pysam and h5py to ephemeris requirements. This has already been considered and vetoed in #128
(b) These packages could be requirements of galaxy-tool-util (and I should raise this issue with galaxy). If that’s not possible, the error messages arising from these packages being missing could be more informative.
or
(c) Nobody requires these packages except the end user. In that case improving the error messages coming from galaxy and adding some documentation to ephemeris would be helpful to the end user.

This came up when we started running regular automated tests on Galaxy Australia. We were scratching our heads for a while about the fact that loads of tests were failing for bwa, bowtie2 etc. when the outputs were identical to the expected outputs. It has come up again recently trying to select an appropriate tool to demonstrate shed-tools test in the admin training course. I’d be in favour of adding pysam to the requirements of ephemeris or galaxy-tool-util so that there is no extra package installation required.

@rhpvorderman
Copy link
Contributor

Or maybe
(d). The requirements should be part of the test format (something like test_requires: pysam >= x.x.x) and this can be exposed to the user by some command which creates a list that can be fed into pip. or
(e). Same as d. But tests are executed in a separate virtualenv and the requirements for this virtualenv are installed automatically. This way ephemeris can depend on a few generic packages while accomodating an unlimited number testing dependencies.

@rhpvorderman
Copy link
Contributor

ping @jmchilton who implemented the test functionality in ephemeris.

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

2 participants