mrvollger / StainedGlass

Make colorful identity heatmaps of genomic sequence
https://mrvollger.github.io/StainedGlass/
MIT License
98 stars 10 forks source link

higlass-manage error: mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) #14

Closed zeyak closed 2 years ago

zeyak commented 2 years ago

I successfully run StainedGlass but I'm having an error while running higlass-manage:

It was a bit tricky to install it in the beginning. The package cytoolz was incompatible with other packages but then I managed to install it by running the following commands in a clean conda environment:

python -m pip install --user cython
python -m pip install --user cytoolz
python -m pip install --user eth-brownie
python -m pip install --user pipx
python -m pipx ensurepath

# RESTARTED TERMINAL
pipx install eth-brownie

pip install higlass-manage

However, when I try to view the .cool file I get the following error:

higlass-manage view results/spiro.2000.10000.strand.cool

(h_glass) zeyku390@UUC-VFHJ104Q05P StainedGlass % higlass-manage view results/spiro.2000.10000.strand.cool 
Traceback (most recent call last):
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/bin/higlass-manage", line 5, in <module>
    from higlass_manage.cli import cli
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/higlass_manage/cli.py", line 3, in <module>
    from higlass_manage.ingest import ingest
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/higlass_manage/ingest.py", line 2, in <module>
    import clodius.cli.aggregate as cca
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/clodius/cli/__init__.py", line 18, in <module>
    from . import (  # noqa: F401
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/clodius/cli/convert.py", line 11, in <module>
    import bbi
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/__init__.py", line 1, in <module>
    from .cbbi import (
ImportError: dlopen(/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/cbbi.cpython-310-darwin.so, 0x0002): tried: '/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/cbbi.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
mrvollger commented 2 years ago

@pkerpedjiev do you think you could help us here?

pkerpedjiev commented 2 years ago

I suspect that you're on a new M1 mac?

I ran into this issue a while back. If I recall correctly, the solution was to switch to an x86 terminal. Mine is set up like that:

(base) toc3~/projects/higlass% uname -m
x86_64

How I got it set up like that... I don't remember. I would just be googling to try and help you.

If you want to quickly view that file you could also try throwing it on https://resgen.io

zeyak commented 2 years ago

I've changed the architecture by following this

env /usr/bin/arch -x86_64 /bin/zsh --login

Then I have the same arch as you:

(h_glass) zeyku390@UUC-VFHJ104Q05P StainedGlass % uname -m              
x86_64

However, I'm getting the same error:

(h_glass) zeyku390@UUC-VFHJ104Q05P StainedGlass % higlass-manage view results/spiro.2000.10000.strand.cool
Traceback (most recent call last):
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/bin/higlass-manage", line 5, in <module>
    from higlass_manage.cli import cli
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/higlass_manage/cli.py", line 3, in <module>
    from higlass_manage.ingest import ingest
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/higlass_manage/ingest.py", line 2, in <module>
    import clodius.cli.aggregate as cca
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/clodius/cli/__init__.py", line 18, in <module>
    from . import (  # noqa: F401
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/clodius/cli/convert.py", line 11, in <module>
    import bbi
  File "/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/__init__.py", line 1, in <module>
    from .cbbi import (
ImportError: dlopen(/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/cbbi.cpython-310-darwin.so, 0x0002): tried: '/Users/zeyku390/opt/miniconda3/envs/h_glass/lib/python3.10/site-packages/bbi/cbbi.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

I've also tried visualising it on resgen but it didn't open any of the files I've added. You can see the screenshots below. Screenshot 2022-07-26 at 15 23 21

pkerpedjiev commented 2 years ago

Did you try clicking on Zoom to data extent in resgen?

image

Not sure about the architecture thing. I tried reproducing it locally but don't get the same error.

zeyak commented 2 years ago

Now it works and this is really cool.Thank you!!

mrvollger commented 2 years ago

Thanks for using the tool @zeynepkurtw! And thanks for the help fixing this issue @pkerpedjiev!