Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified LINE/line
Binary file not shown.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,48 @@ SCI is a program to identify sub-compartments from HiC data. SCI utilizes graph
* python 2.7

**Python Libraries**
* [scikit-learn] >=0.19.0
* [scikit-learn] >=0.19.0, <= 0.20
* [Numpy] >= 1.15
Copy link
Author

@jos4uke jos4uke Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to update the dependency version on numpy, the last numpy release to support Python 2.7: see https://docs.scipy.org/doc/numpy/release.html#numpy-1-16-0-release-notes

should be: [Numpy] <= 1.16

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update it to: [Numpy] <= 1.16

* [tqdm]>=4.24

`Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. Scikit-learn now requires Python 3.5 or newer.`

**C++ libraries**
* [GSL]

### using Conda

use conda-forge channel

```sh
conda config --add channels conda-forge

#
conda create -n sci_env python=2.7

# once created
conda activate sci_env

# install own compilers
conda install compilers

# install GSL
conda install gsl

# save your env
mkdir -p envs
conda env export >envs/sci_env.yml

```

## Installation
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to tell I updated the setup.py file to set 2 variables INCPATH and LIBPATH respectively to the include and lib path to gsl. And the user should edit them to make it work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you plz update the README and add these instructions so people are aware of this mandatory step


```sh
$ python setup.py
$ python setup.py install

# clean
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have mentioned this clean command is only after successful package install and optional

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you edit the README and add this comment plz

$ python setup.py clean

```
## Input format

Expand Down Expand Up @@ -76,6 +107,9 @@ SCI output sub-compartments annotation into BED format with the following fields


## Test run

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I was not able to run this test because of the missing input data.
If you can add a link where we can download them it would be great.
Thanks in advance

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The input data link has been added in the readme section. Could you please double check?

`IS MISSING`

To preform test run for SCI please follow the following steps:
1. Go the Input_sample directory
```sh
Expand All @@ -99,4 +133,4 @@ $ python sci.py -n test -f Input_sample/SCI_input.txt -r 100000 -g chromosome_si
[scikit-learn]: http://scikit-learn.org/stable/
[Numpy]: http://www.numpy.org/
[tqdm]: https://pypi.org/project/tqdm/
[GSL]: http://www.gnu.org/software/gsl/
[GSL]: http://www.gnu.org/software/gsl/
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. Scikit-learn now requires Python 3.5 or newer.
#scikit-learn >= 0.18
scikit-learn > 0.18, < 0.21
# last numpy release tosupport Python 2.7: see https://docs.scipy.org/doc/numpy/release.html#numpy-1-16-0-release-notes
Numpy <=1.16.0
# The last SciPy version to do so is SciPy 1.2.x: https://www.scipy.org/scipylib/faq.html#do-numpy-and-scipytill-support-python-2-7
scipy <=1.2
tqdm
3 changes: 0 additions & 3 deletions requirments.txt

This file was deleted.

19 changes: 15 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,26 @@
VERSION = '0.1.0'


CONDA_PATH = os.getenv("CONDA_PREFIX")
INCPATH = os.path.join(CONDA_PATH,"include")
LIBPATH=os.path.join(CONDA_PATH,"lib")


LIBS="-lgsl -lgslcblas -lpthread -L{}".format(LIBPATH)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a comment to tell people to edit these 2 variables INCPATH and LIBPATH to point to their include and lib path to gsl

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you plz add such a comment above these 2 variables

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe replace my paths by some placeholder strings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jos4uke I am trying to push some changes to the branch. May you give me permission to do so?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes for sure


def compile_line():
compile_command = ("g++ LINE/line.cpp -o LINE/line"
"-lgsl -lgslcblas -lpthread")
compile_command = ("g++ LINE/line.cpp -I{} -o LINE/line {}".format(INCPATH,LIBS))
return_code = call(compile_command.split())
if return_code != 0:
sys.exit(("LINE compilation has failed."
"Please make sure to install GSL library"))

compile_line()

## Important notes to requirements:
# 1. Last numpy release tosupport Python 2.7: see https://docs.scipy.org/doc/numpy/release.html#numpy-1-16-0-release-notes
# 2. The last SciPy version to do so is SciPy 1.2.x: https://www.scipy.org/scipylib/faq.html#do-numpy-and-scipytill-support-python-2-7
# 3. Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. Scikit-learn now requires Python 3.5 or newer.
setup(

name="sci",
Expand All @@ -26,8 +36,9 @@ def compile_line():
author_email='[email protected]',
packages=find_packages(),
install_requires=[
'numpy',
'scikit-learn',
'numpy<=1.16.0',
'scipy<=1.2',
'scikit-learn>=0.19,<=0.20',
'tqdm'
],

Expand Down