Skip to content

Commit 077fca4

Browse files
authored
Remove sucpp and depend on unifrac-binaries, instead (#139)
* Remove files that were moved to unifrac-binaries * Get ssu binaries from conda * Change compile to use the unifrac-binaries from conda * Remove sucpp, now in unnifrac-binaries repo * Minor edits to make flake8 happy and update github tests * Fix MacOs path * Fix typo * Add additional python test * Remoove sucpp lines * Update docs * Add one more python test
1 parent 3f4f412 commit 077fca4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+38
-14997
lines changed

.github/workflows/main.yml

+15-36
Original file line numberDiff line numberDiff line change
@@ -54,78 +54,57 @@ jobs:
5454
conda config --add channels bioconda
5555
if [[ "$(uname -s)" == "Linux" ]];
5656
then
57-
conda install --yes -c conda-forge -c bioconda gxx_linux-64=7.5.0
57+
conda install --yes -c conda-forge -c bioconda gxx_linux-64
5858
else
59-
conda install --yes -c conda-forge -c bioconda clangxx_osx-64=10.0.0
59+
conda install --yes -c conda-forge -c bioconda clangxx_osx-64
6060
fi
61-
conda install --yes -c conda-forge -c bioconda cython "hdf5>=1.8.17" biom-format numpy "h5py>=2.7.0" "scikit-bio>=0.5.1" flake8 nose
62-
conda install --yes -c conda-forge -c bioconda mkl-include lz4 hdf5-static
61+
conda install --yes -c conda-forge -c bioconda cython "hdf5>=1.8.17" biom-format numpy "h5py>=2.7.0" "scikit-bio>=0.5.1" unifrac-binaries flake8 nose
6362
echo "$(uname -s)"
6463
if [[ "$(uname -s)" == "Linux" ]];
6564
then
6665
which x86_64-conda-linux-gnu-gcc
6766
x86_64-conda-linux-gnu-gcc -v
6867
x86_64-conda-linux-gnu-g++ -v
6968
else
70-
conda install --yes liblapacke
7169
which clang
7270
clang -v
7371
fi
7472
which h5c++
75-
if [[ "$(uname -s)" == "Linux" ]];
76-
then
77-
./scripts/install_hpc_sdk.sh
78-
source setup_nv_h5.sh
79-
fi
80-
pushd sucpp
81-
make test
82-
make main
83-
make api
84-
make capi_test
85-
if [[ "$(uname -s)" == "Linux" ]];
86-
then
87-
rm -f ~/.R/Makevars
88-
conda install -c conda-forge r-base
89-
# the r-base package has a broken dependency
90-
ln -s $CONDA_PREFIX/lib/libreadline.so $CONDA_PREFIX/lib/libreadline.so.6
91-
R -e 'install.packages("Rcpp", repos="http://lib.stat.cmu.edu/R/CRAN/")'
92-
make rapi_test
93-
fi
94-
popd
9573
pip install -e .
9674
9775
- name: Tests
9876
shell: bash -l {0}
9977
run: |
10078
conda activate unifrac
101-
pushd sucpp
102-
export UNIFRAC_GPU_INFO=Y
103-
./test_su
104-
./test_api
105-
./test_ska
106-
popd
10779
nosetests
10880
flake8 unifrac setup.py
10981
11082
- name: Sanity checks
11183
shell: bash -l {0}
11284
run: |
11385
conda activate unifrac
114-
./sucpp/ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm -m unweighted
86+
set -e
87+
ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm -m unweighted
11588
python -c "import skbio; dm = skbio.DistanceMatrix.read('ci/test.dm')"
89+
pushd unifrac/tests
90+
python -c "import unifrac; unifrac.unweighted_to_file('data/crawford.biom','data/crawford.tre','../../ci/test.dm.h5')"
91+
python -c "import unifrac,skbio; dm_u=unifrac.unweighted('data/crawford.biom','data/crawford.tre'); dm = skbio.DistanceMatrix.read('../../ci/test.dm'); t=abs(dm_u.data-dm.data).max(); print(t); assert t < 0.1"
92+
popd
93+
python -c "import h5py,skbio; f_u=h5py.File('ci/test.dm.h5','r'); dm_u=skbio.stats.distance.DistanceMatrix(f_u['matrix'][:,:],f_u['order'][:])"
94+
python -c "import h5py,skbio; dm = skbio.DistanceMatrix.read('ci/test.dm'); f_u=h5py.File('ci/test.dm.h5','r'); dm_u=skbio.stats.distance.DistanceMatrix(f_u['matrix'][:,:],f_u['order'][:]); t=abs(dm_u.data-dm.data).max(); print(t); assert t < 0.1"
11695
if [[ "$(uname -s)" == "Linux" ]];
11796
then
11897
MD5=md5sum
11998
else
12099
MD5='md5 -r'
121100
fi
122-
./sucpp/ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.start0.stop3 -m unweighted --mode partial --start 0 --stop 3
123-
./sucpp/ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.start3.stop5 -m unweighted --mode partial --start 3 --stop 5
124-
./sucpp/ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.partial --mode merge-partial --partial-pattern "ci/test.dm.start*"
101+
ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.start0.stop3 -m unweighted --mode partial --start 0 --stop 3
102+
ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.start3.stop5 -m unweighted --mode partial --start 3 --stop 5
103+
ssu -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.dm.partial --mode merge-partial --partial-pattern "ci/test.dm.start*"
125104
exp=$($MD5 ci/test.dm | awk '{ print $1 }')
126105
obs=$($MD5 ci/test.dm.partial | awk '{ print $1 }')
127106
python -c "assert '${obs}' == '${exp}'"
128-
./sucpp/faithpd -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.faith.obs
107+
faithpd -i unifrac/tests/data/crawford.biom -t unifrac/tests/data/crawford.tre -o ci/test.faith.obs
129108
tail -n +2 ci/test.faith.obs > ci/test.faith.header-removed.obs
130109
exp1=$($MD5 unifrac/tests/data/test.faith.exp | awk '{ print $1 }')
131110
obs1=$($MD5 ci/test.faith.header-removed.obs | awk '{ print $1 }')

MANIFEST.in

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
graft unifrac
22

3-
include sucpp/*.biom
4-
include sucpp/*.tre
5-
6-
include sucpp/*.hpp
7-
include sucpp/*.cpp
8-
include sucpp/*.sh
9-
include sucpp/Makefile
10-
113
global-exclude *.pyc
124
global-exclude *.pyo
135
global-exclude .git

README.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ This library can also be installed via a combination of `conda-forge` and `bioco
4848
conda create --name unifrac -c conda-forge -c bioconda unifrac
4949
```
5050

51-
Note: Only the CPU version of the binaries is currently available in conda.
52-
The GPU version must either be [locally compiled using freely-available NVIDIA HPC SDK](docs/compile_gpu.README.md)
53-
or obtained [from a github branch](https://github.com/sfiligoi/unifrac/blob/v0.20.2-docs/docs/install_gpu.README.md).
54-
55-
Note: If you desire a fully optimized the binaries for your CPU, you can [compile them locally](docs/compile_cpu.README.md).
56-
5751
## Install (pip)
5852

5953
```
@@ -62,18 +56,17 @@ pip install unifrac
6256

6357
## Install (native)
6458

65-
To install, first the binary needs to be compiled. This assumes that the HDF5
66-
toolchain and libraries are available. More information about how to setup the
67-
stack can be found [here](https://support.hdfgroup.org/HDF5/Tutor/compile.html).
59+
To install, first the cython wrappers must be compiled. It also needs
60+
the libssu library to be present.
6861

69-
Assuming `h5c++` is in your path, the following should work:
62+
Assuming the compiler is in your path, the following should work:
7063

7164
pip install -e .
7265

73-
**Note**: if you are using `conda` we recommend installing HDF5 using the
74-
`conda-forge` channel, for example:
66+
**Note**: if you are using `conda` we recommend installing the compiler and
67+
libssu using the `biooconda` channel, for example:
7568

76-
conda install -c conda-forge hdf5
69+
conda install -c conda-forge -c bioconda gxx_linux-64 unifrac-binaries
7770
7871
# Examples of use
7972

docs/compile_cpu.README.md

-96
This file was deleted.

docs/compile_gpu.README.md

-103
This file was deleted.

0 commit comments

Comments
 (0)