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

Wrong pysam version in Gemini 0.30.2 ('module' object has no attribute 'VariantRecord') #951

Open
jdelafon opened this issue Apr 14, 2021 · 1 comment

Comments

@jdelafon
Copy link

jdelafon commented Apr 14, 2021

I created a Docker image for Gemini 0.30.2, based on Python 2.7 - the source is here : https://gitlab.com/jdelafon/gemini

All the build script does is download the installer script and run it, as per manual instructions, in a controlled environment.
The problem is that Conda installs pysam==0.8.4, because the requirements say ">=0.6" (and 0.6 does not exist in Conda), which when running this command:

gemini load -t VEP -v <vcf> -p <ped> <db>

produces

  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/annotations.py", line 316, in _get_var_ref_and_alt
    if isinstance(var, pysam.VariantRecord):
AttributeError: 'module' object has no attribute 'VariantRecord'

and another one at line 422.
Here is a patch that fixed it, for illustration - obviously it loses functionality :
https://gitlab.com/jdelafon/gemini/-/blob/master/patch/annotations.patch

When replaced manually with pysam==0.16.0.1 it works. But Conda does not know about this version, so automating the installation is very tedious.

  1. The requirements file should be changed to fix versions, instead of using ">=", based on a pip freeze in a working environment.
  2. What command am I supposed to run to upgrade pysam to a newer version ? There is gemini_conda, conda, channels, pip, virtual environments, ... I don't understand how it works.
@jdelafon jdelafon changed the title Wrong pysam version Wrong pysam version in Gemini 0.30.2 ('module' object has no attribute 'VariantRecord') Apr 14, 2021
@Amanda2018genetics
Copy link

I have the same ERROR with you, have no idea how to fix

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