GithubHelp home page GithubHelp logo

Fix MacOS support about reg-gen HOT 8 CLOSED

costalab avatar costalab commented on June 1, 2024
Fix MacOS support

from reg-gen.

Comments (8)

fabio-t avatar fabio-t commented on June 1, 2024

Current issues: the following dependency formatting doesn't work for some (it worked for joseph, and in a clean virtual environment):

ngslib;platform_system=='Linux'

It either tries to compile it, and fails of course, or it crashes on pip setup.py egg_info. @jovesus can you paste the error message here?

from reg-gen.

fabio-t avatar fabio-t commented on June 1, 2024

Right now, if the user first installs python via Homebrew, there shouldn't be problems. Hopefully.

brew install python
pip install rgt --user

More testing needs to be done.

from reg-gen.

fabio-t avatar fabio-t commented on June 1, 2024

Pysam caused MacOS regressions in the last few versions. While waiting for the fix, we've had to block the pysam dependency to version 1.11.1.

For reference: pysam-developers/pysam#475

from reg-gen.

fabio-t avatar fabio-t commented on June 1, 2024

Triplexes is not compiled for Mac. @jovesus could you have a look at that (when you are back)?

from reg-gen.

zjin1126 avatar zjin1126 commented on June 1, 2024

SeqAn C++ template is not compatible with LLVM libc++, which used by clang in default settings.
Compile Triplexes with GNU libstdc++ can bypass this problem.

Build Triplexes without OpenMP:

SRC_ROOT=/path/to/triplexes

cmake $SRC_ROOT \
-DCMAKE_CXX_FLAGS="-stdlib=libstdc++" \
-DCMAKE_BUILD_TYPE=Release \
-DSHAREDLIBRARY=TRUE

make

Pre-installed clang on macOS doesn't support OpenMP, so install clang via Homebrew.
Build Triplexes with OpenMP:

brew install llvm # clang with openmp support

export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++

cmake $SRC_ROOT \
-DCMAKE_CXX_FLAGS="-I/usr/local/opt/llvm/include -stdlib=libstdc++" \
-DCMAKE_C_FLAGS="-I/usr/local/opt/llvm/include" \
-DCMAKE_SHARED_LINKER_FLAGS="-L/usr/local/opt/llvm/lib" \
-DOpenMP_C_FLAGS="-fopenmp" \
-DOpenMP_CXX_FLAGS="-fopenmp" \
-DCMAKE_BUILD_TYPE=Release \
-DSHAREDLIBRARY=TRUE

make

These cmake options can let rgt-TDF run on macOS.

After compile, copy libtriplexator.dylib to rgtdata/lib and modify path_triplexator in data.config to path_triplexator=$HOME/rgtdata/lib/libtriplexator.dylib.

from reg-gen.

fabio-t avatar fabio-t commented on June 1, 2024

@zjin1126 this is VERY helpful! Thanks. We will give this a try soon.

from reg-gen.

chaochungkuo avatar chaochungkuo commented on June 1, 2024

@zjin1126 Thank you for your contribution. Last week I tried to install openMP on mac and use llvm to compile, but because of not having sufficient understanding of cmake, I couldn't work it out. Your comment solves our problem exactly. Thank you.

Now if RGT is successfully installed on Mac, it works as nrmal as on Linux.

from reg-gen.

fabio-t avatar fabio-t commented on June 1, 2024

I'm fairly sure now RGT works fine on Mac. We'll open specific issues in the future, in case of need.

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.