GithubHelp home page GithubHelp logo

Comments (18)

rm1238 avatar rm1238 commented on June 13, 2024 1

Hi Zhijian,

I followed the last instructions and HINT is working perfectly fine on M1 Mac. Thanks again so much for your help.

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

Could you show how you install the package on M1 Mac and the version of RGT?

You can get the version information by rgt-hint --version

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Hi Zhijian

I tried to install using the generic approach here [https://github.com/CostaLab/reg-gen].
Screenshot 2023-07-03 at 14 23 46

I have also used the Mac-specific approach described in your website here: [https://reg-gen.readthedocs.io/en/latest/rgt/installation.html]:
Screenshot 2023-07-03 at 14 23 01

I have RGT installed in my Intel Mac and it runs fine. I would like to install on the M1 Macs in my lab for my postdocs and students to use it.

Thanks a lot again for your help,

Ricardo

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

This is the version of RGT:
Screenshot 2023-07-05 at 09 37 33

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

The latest version of develop branch is v1.0.1.
Can you try to install it from the source code?

To do so, you need to run the following commands:

[email protected]:CostaLab/reg-gen.git
git checkout develop
pip install ./

Please let me know if this fixes the issue on m1.

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

When I do this it just reinstalls the 1.0.0 version. I downloaded from the 'develop' branch here
Screenshot 2023-07-12 at 12 49 14

After I install and run i get the same error
Screenshot 2023-07-12 at 12 49 50

I think I am not down getting to the 1.0.1 version you mention. I cannot get to the repository with this command: [email protected]:CostaLab/reg-gen.git. I was able to clone through GitHub Desktop and with gh as above, with the same results, downloading version 1.0.0.

Can you indicate how to get to the 1.0.1 version?

Thanks!

Ricardo

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

Sorry, the command to download RGT should be:

git clone [email protected]:CostaLab/reg-gen.git

Anyway, since you already downloaded the package through GitHub Desktop, you can switch to develop branch by

git checkout develop

Alternatively, you can try to install rgt via conda, which is what I usually do when running rgt,

  1. Install miniconda by following https://docs.conda.io/en/latest/miniconda.html
  2. Once you successfully install conda, create a specific environment for rgt by: conda create -n rgt python=3.6
  3. Activate your conda environment: conda activate rgt
  4. Install RGT package: pip install rgt

This will automatically install rgt (v1.0.0) with all its dependencies.

Please let me know if this solves your issue.

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Hello there,

I successfully installed the develop version 1.0.1 (see attached)

Screenshot 2023-07-13 at 13 59 58

However, I keep getting the same error (see attached)

Screenshot 2023-07-13 at 14 00 36

I am suspecting the issue may be the python version installed by homebrew? In my case this is 3.11. I cannot really think of what else it can be. I will try to install through conda, but before doing so, should I be using an earlier version of Python to install RGT?

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

Thanks for the feedback.

I didn't test rgt on python 3.11, for me, python 3.9 works well.

Regarding the error, I think it is because you are running python directly on M1 chip which is an arm64 architecture, and librgt_mac.so was complied for x86_64 through ROSETTA translation.

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Hi,

Is there a way to compile librgt_mac.so for arm64?

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Let me give it a try.

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Sounds good, thanks!

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Please keep me posted when you have news.

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

I installed rgt on my Mac M1 pro, and it worked well.

This means I couldn't reproduce your issue.

Could you provide more information about your python and platform?

You can type python and then:

import platform
platform.uname()

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Hi Zhijian,

Here the requested information. Hope this helps pinpoint the issue.

Screenshot 2023-07-18 at 21 08 41

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Hi Zhijian,

I reinstalled cleanly with Python 3.9 but am still getting the same error (see attached). Platform info also attached.

Screenshot 2023-07-24 at 1 26 14 PM Screenshot 2023-07-24 at 1 27 08 PM

from reg-gen.

lzj1769 avatar lzj1769 commented on June 13, 2024

Hi,

Thanks for your feedback.

I finally can reproduce your error:

sh hint.sh 
**********************************************
Testing HINT
Running HINT using only DNase-seq data..
Downloading test data.
x HINT_DNaseTest/
x HINT_DNaseTest/DNase.bam
x HINT_DNaseTest/DNase.bam.bai
x HINT_DNaseTest/DNasePeaks.bed
Traceback (most recent call last):
  File "/opt/homebrew/bin/rgt-hint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/HINT/Main.py", line 95, in main
    args.func(args)
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/HINT/Footprinting.py", line 112, in footprinting_run
    dnase_seq(args)
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/HINT/Footprinting.py", line 529, in dnase_seq
    post_processing(footprints=footprints, original_regions=original_regions, fp_min_size=fp_min_size,
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/HINT/Footprinting.py", line 812, in post_processing
    footprints_overlap = footprints.intersect(original_regions, mode=OverlapType.ORIGINAL)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/GenomicRegionSet.py", line 732, in intersect
    return self.intersect_c(y, mode, rm_duplicates)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/rgt/GenomicRegionSet.py", line 871, in intersect_c
    lib = cdll.LoadLibrary(Lib.get_c_rgt())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/__init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/Users/zhijianli/rgtdata/lib/librgt_mac.so, 0x0006): tried: '/Users/zhijianli/rgtdata/lib/librgt_mac.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/zhijianli/rgtdata/lib/librgt_mac.so' (no such file), '/Users/zhijianli/rgtdata/lib/librgt_mac.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

I have modified the code to first check if it's being installed in arm64 or X86_64 platform, and now it works well with Arm64 platform.

To solve it, what you need to do is the following:

  1. Delete the rgtdata folder completely, otherise you might still have the x86_64 based library. You can find it in your home directory

  2. Pull the new version of RGT to your local machine. Since you already download the repo., you can first switch to develop branch by git checkout develop and then pull the code: git pull. If you think this is too complicated, you can wait until I release it on Pypi, then you just need to install it by pip install rgt

  3. After you installed it, please check if you a file called "librgt_mac_arm64.so" in your rgtdata/lib directory: ls ~/rgtdata/lib

The problem should be solved by following the above steps.

from reg-gen.

rm1238 avatar rm1238 commented on June 13, 2024

Thanks

from reg-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.