This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Installing and running pyGenomeTracks

I successfully installed pyGenomeTracks via:

pip install pygenometracks --user

However when I run it I get the following error:

from hicmatrix import HiCMatrix ImportError: No module named hicmatrix

Wondering if installation of this lib separately is necessary? Thanks!

pygenometracks deeptools hicmatrix hicexplorer

The docs suggest if you aren't plotting a Hi-C matrix, you don't need this module. Are you plotting a Hi-C matrix? What is the command you used?

I used the central command in the package:

pyGenomeTracks
pyGenomeTracks -h
Traceback (most recent call last):
  File "bin/pyGenomeTracks", line 4, in <module>
    from pygenometracks.plotTracks import main
  File "lib/python2.7/site-packages/pygenometracks/plotTracks.py", line 152, in <module>
    import pygenometracks.tracksClass
  File "lib/python2.7/site-packages/pygenometracks/tracksClass.py", line 30, in <module>
    from pygenometracks.tracks import *
  File "lib/python2.7/site-packages/pygenometracks/tracks/__init__.py", line 7, in <module>
    mod = __import__('.'.join([__name__, py]), fromlist=[py])
  File "/lib/python2.7/site-packages/pygenometracks/tracks/HiCMatrixTrack.py", line 1, in <module>
    from hicmatrix import HiCMatrix
ImportError: No module named hicmatrix

I guess what confuses me is that pyGenomeTracks is entirely dependent on the HiCExplorer running and this happened when tried to install the HiCExplorer:

Failed to build hicexplorer
hicexplorer 2.1.1 has requirement pysam==0.11.*, but you'll have pysam 0.14 which is incompatible.
hicexplorer 2.1.1 has requirement six==1.10.*, but you'll have six 1.11.0 which is incompatible.

This is strange since you're supposed to be able to use this package to make genome tracks without any Hi-C data.

Use conda, there are packages for pyGenomeTracks, HiCMatrix and HiCExplorer. If you want to use pip, use virtualenv, and install the correct version of dependencies:

virtaulenv ~/pyGenomeTracks
source ~/pyGenomeTracks/bin/activate
pip install pysam==0.11
pip install six==1.10
pip install pygenometracks

And install HiCExplorer.

1 answer

Hi,

my apologies for your confusion. I forgot to make HiCMatrix available via pip, our main focus is conda. However, I uploaded HiCMatrix last week.

Since version 2.0 of pyGenomeTracks there is no more dependency to HiCExplorer, the dependency is now HiCMatrix.

Feel free to ask if you have more questions.

Best,

Joachim

Log in to answer this question.