Skip to content

Commit

Permalink
Merge pull request #258 from CostaLab/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
lzj1769 authored Jul 26, 2023
2 parents 6616b6b + d914d10 commit a9ce5ca
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ ChIP-Seq differential peak caller

See https://reg-gen.readthedocs.io for documentation and tutorials.

# Installation
# Installation with conda

The quickest and easiest way to get RGT is to to use pip. First some dependencies:
We recommend using conda to manange the python environmont to avoid issues.

You can install conda from [here](https://docs.conda.io/en/latest/miniconda.html)

Once you successfully installed conda, first create a specific environment:

```shell
pip install cython numpy scipy
conda create -n rgt python=3.9
```

Then install the full RGT suite with all other dependencies:
Then activate your environment and install the full RGT suite with all other dependencies:
```shell
conda activate rgt
pip install RGT
```

Expand Down
File renamed without changes.
11 changes: 9 additions & 2 deletions docs/rgt/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ These instructions are only to be attempted if you know what you are doing and t
The recommended way of installing RGT is via [pip](https://pip.pypa.io/en/stable/), the main python package manager. After installing pip, type in this order:

```shell
pip install --user cython numpy scipy
pip install --user RGT --no-binary RGT
pip install cython numpy scipy
pip install RGT
```

This will install the full RGT suite with all python dependencies. A few more libraries will be needed, but should be installed via your own distribution’s package manager.
Expand Down Expand Up @@ -44,6 +44,13 @@ pip install cython numpy scipy
pip install RGT --no-binary RGT
```

<!-- ### Installation with Apple silicon
When you are using Mac with Apple Silicon chip (M1/2), the installation can be complicated, since they are based on arm64.
We have
there are two scenarios, -->

## Windows
Sorry. We don’t support windows environment this moment.

Expand Down
2 changes: 1 addition & 1 deletion rgt/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.1"
__version__ = "1.0.2"
21 changes: 14 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,28 @@ def find_version(*file_paths):
"pysam>=0.12.0",
"pyBigWig"]

def is_apple_m1():
chip = subprocess.check_output(['sysctl','-n','machdep.cpu.brand_string']).decode('utf-8')
if chip in ['Apple M1\n', 'Apple M1 Pro\n']:
def is_arm64():
import platform

if platform.uname()[4] == 'arm64':
return True
else:
return False

# chip = subprocess.check_output(['sysctl','-n','machdep.cpu.brand_string']).decode('utf-8')
# if chip in ['Apple M1\n', 'Apple M1 Pro\n']:
# return True
# else:
# return False

if platform.startswith("darwin"):
bin_dir = "mac"
# check if being installed on Apple M1 chip
if is_apple_m1():
#libRGT = "librgt_mac_m1.so"
libRGT = "librgt_mac.so"
# check if being installed on arm64 or x86_64
if is_arm64():
libRGT = "librgt_mac_arm64.so"
else:
libRGT = "librgt_mac.so"

triplexes_file = "lib/libtriplexator.dylib"
else:
bin_dir = "linux"
Expand Down

0 comments on commit a9ce5ca

Please sign in to comment.