arq5x/gemini

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

jdelafon opened this issue · 1 comments

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.

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