Closed Phlya closed 6 years ago
Dear Phlya,
It is weird as I am using both pyGenomTracks and HiCExplorer in the same anaconda2 environment without any problem related to the pysam version.
Can you try the following?
conda install hicexplorer -c bioconda -c conda-forge
conda install -c bioconda pygenometracks
pysam should be updated and both pyGenomeTracks and HiCExplorer should work. I think we could change the dependency of pysam to 0.14 in HiCExplorer to avoid further conflicts.
Yeah, pygenometracks requires hicexplorer, so I don't understand how it works at all - and it was working for me until now (all installed with pip, not conda, though), but I started getting an error when running pyGenomeTracks eventually with one of the updates, when I cloned pygenometracks and was using a local developmental installation (pip install -e
).
The installation with these commands works fine - but again, I don't understand why, since the dependencies are incompatible...
I think it is because HiCExplorer does not strictly require pysam==0.11.*
while pyGenomeTracks requires pysam>=0.14
.
Maybe it has something to do with conda
vs pip install
A simple solution is to change the dependencies of HiCExplorer to pysam>=0.14
.
The reason why we are strictly set to a specific version is, that we do not trust the developers of any package to provide a stable API even if they just change the third digit in the version number. To guarantee that HiCExplorer is working as it is tested we have this restrictive policy.
If there is some incompatibility with pyGenomeTracks, than I am sorry, but this need to be fixed by pyGenomeTracks.
Most HiCExplorer installations in the world are using pysam >0.11, since you'll get the most recent version of pysam if you conda install hicexplorer
. Given that, the requirement needs to be changed.
I made the pysam-0.14 branch to test this out a bit more before merging with master. I use pysam 0.14 on my HiCExplorer conda environment and it works fine...
@Phlya Regarding pygenomeTracks, if you install it using conda, pyGenometracks would first install HiCEx 2.1.1 or higher (which would install pysam 0.11) then it would upgrade the pysam to 0.14 or higher. That's why it works. If you change the order it might produce error, which might be what you experiencing with your PIP installation.
I think HiCEx would safely work with pysam 0.14, so upgrading after installing hicEx could be one option for you.
Also I recommend creating a new conda env with HiCEx and pyGenometracks using environment.yml we provide in the pyGenomeTracks repo. This would also use the latest master branch of pyGT, but you can comment that line to get the branch from bioconda. Both of them should work.
Thanks! Basically, I figured out that the problem only exists when installing pyGenomeTracks in development mode, pip install -e
- normal installation works fine. And since I am currently preparing a PR for pyGenomeTracks it would be very nice to use developmental installation...
(I am not really using HiCExplorer itself, it's a dependency of pyGenomeTracks so this kind of inconsistency is very inconvenient)
Oh I never tried that. Don't know if the pip dependency resolution behavior is different w/ or w/o -e option.
If you think changing the dependency in HiCExplorer is not a problem, then I think this is the easiest and best solution, and will save me and probably others at some point, time and effort for troubleshooting or working around this.
@vivekbhr As I mentioned above, HiCExplorer will install the most recent version of pysam in conda. The recipe has never specified a particular pysam version.
I've changed the requirements in the develop
branch now, so this issue should be resolved in the next release.
Thank you!
Hi, any reason pysam dependency is set strictly to
pysam==0.11.*
? This is incompatible with pyGenomeTracks, which requirespysam>=0.14
.