diff --git a/LINE/line b/LINE/line index d11d16f..d54e401 100755 Binary files a/LINE/line and b/LINE/line differ diff --git a/README.md b/README.md index 9eaf558..0310fc8 100644 --- a/README.md +++ b/README.md @@ -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 * [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 ```sh -$ python setup.py +$ python setup.py install + +# clean +$ python setup.py clean + ``` ## Input format @@ -76,6 +107,9 @@ SCI output sub-compartments annotation into BED format with the following fields ## Test run + +`IS MISSING` + To preform test run for SCI please follow the following steps: 1. Go the Input_sample directory ```sh @@ -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/ \ No newline at end of file +[GSL]: http://www.gnu.org/software/gsl/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e82c566 --- /dev/null +++ b/requirements.txt @@ -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 diff --git a/requirments.txt b/requirments.txt deleted file mode 100644 index 193c663..0000000 --- a/requirments.txt +++ /dev/null @@ -1,3 +0,0 @@ -scikit-learn >= 0.18 -Numpy -tqdm diff --git a/setup.py b/setup.py index 7c03e50..432386c 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,15 @@ 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) + 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." @@ -18,6 +24,10 @@ def compile_line(): 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", @@ -26,8 +36,9 @@ def compile_line(): author_email='haitham.ashoor@jax.org', packages=find_packages(), install_requires=[ - 'numpy', - 'scikit-learn', + 'numpy<=1.16.0', + 'scipy<=1.2', + 'scikit-learn>=0.19,<=0.20', 'tqdm' ],