From bd99b51957c9a361388e542af6558a03ba91efb1 Mon Sep 17 00:00:00 2001 From: Warren Kretzschmar Date: Thu, 4 Jun 2020 23:04:29 +0200 Subject: [PATCH 1/2] Enable from source compilation through pipy --- README.md | 17 +++++++++++++++-- environment.yml | 8 ++++++++ pyproject.toml | 2 ++ setup.py | 10 ++++++++++ src/CMakeLists.txt | 2 +- 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 environment.yml create mode 100644 pyproject.toml create mode 100644 setup.py diff --git a/README.md b/README.md index 5312fc5..ea52720 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ sudo apt-get install build-essential cmake zlib1g-dev brew install brewsci/bio/bifrost ``` -* From [Bioconda](https://bioconda.github.io) (Bifrost v1.0.3, Linux only): +* From [Bioconda](https://bioconda.github.io) (Bifrost v1.0.3, Linux only, compiled to generic x86-64 architecture and does not include advanced SSE and AVX instructions): ``` conda -c bioconda bifrost @@ -97,6 +97,19 @@ sudo apt-get install build-essential cmake zlib1g-dev If you encounter any problem during the installation, see the [Troubleshooting](#troubleshooting) section. +* From source through pypi (Bifrost v1.0.4) + +``` +pip install bifrost-src +``` + +* From source through conda (Bifrost v1.0.4) + +``` +conda env create -n bifrost -f environment.yml +``` + + ### Large *k*-mers The default maximum *k*-mer size supported is 31. To work with larger *k* in the binary, you must install Bifrost from source and replace *MAX_KMER_SIZE* with a larger multiple of 32. This can be done in two ways: @@ -409,4 +422,4 @@ For any question, feedback or problem, please feel free to file an issue on this * The kseq library is copyrighted by Heng Li and released under the MIT license (http://lh3lh3.users.sourceforge.net/kseq.shtml) * The CRoaring library is Apache 2.0 licensed (https://github.com/RoaringBitmap/CRoaring) * The GetRSS library is Creative Commons Attribution 3.0 licensed -* Bifrost is BSD-2 licensed [LICENSE](https://github.com/pmelsted/bifrost/blob/master/LICENSE) \ No newline at end of file +* Bifrost is BSD-2 licensed [LICENSE](https://github.com/pmelsted/bifrost/blob/master/LICENSE) diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..07833c0 --- /dev/null +++ b/environment.yml @@ -0,0 +1,8 @@ +channels: + - conda-forge +dependencies: + - python=3.6 + - pip=20.1.1 + - zlib=1.2.11 + - pip: + - bifrost-src \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..629b191 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja"] \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0668426 --- /dev/null +++ b/setup.py @@ -0,0 +1,10 @@ +from skbuild import setup + +setup(name='bifrost-src', + description='', + version='1.0.4', + data_files=[ + ('.', ['setup.py']) + ], + ) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 10a4a91..7600b89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,7 @@ else() message(FATAL_ERROR "zlib not found. Required for to output files") endif(ZLIB_FOUND) -target_link_libraries(Bifrost bifrost_dynamic) +target_link_libraries(Bifrost bifrost_static) install(TARGETS Bifrost DESTINATION bin) install(TARGETS bifrost_dynamic DESTINATION lib) From 5be773b3ccc3d432cea4e12ef32a60f17cd3e129 Mon Sep 17 00:00:00 2001 From: Warren Kretzschmar Date: Fri, 5 Jun 2020 20:04:45 +0200 Subject: [PATCH 2/2] Update README and environment.yml --- README.md | 17 ++++++++++++++--- environment.yml => environment-linux.yml | 4 +++- 2 files changed, 17 insertions(+), 4 deletions(-) rename environment.yml => environment-linux.yml (62%) diff --git a/README.md b/README.md index ea52720..bef9fda 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,14 @@ sudo apt-get install build-essential cmake zlib1g-dev brew install brewsci/bio/bifrost ``` -* From [Bioconda](https://bioconda.github.io) (Bifrost v1.0.3, Linux only, compiled to generic x86-64 architecture and does not include advanced SSE and AVX instructions): +* From [Bioconda](https://bioconda.github.io) (Bifrost v1.0.3, Linux only): ``` conda -c bioconda bifrost ``` + + This binary is compiled to generic x86-64 architecture and does not include advanced SSE and AVX instructions. + See installing from source through conda for a natively compiled installation. * From source (Bifrost v1.0.4) @@ -100,15 +103,23 @@ sudo apt-get install build-essential cmake zlib1g-dev * From source through pypi (Bifrost v1.0.4) ``` -pip install bifrost-src +pip install bifrost-src --no-binary bifrost-src ``` +This installation method compiles the code natively with all SSE and AVX instructions +supported by your CPU architecture turned on. This installation method requires the compiler and build essentials to have +been installed as described in the Requirements section. + * From source through conda (Bifrost v1.0.4) ``` -conda env create -n bifrost -f environment.yml +conda env create -n bifrost -f environment-linux.yml +conda activate bifrost ``` +This installation method compiles the code natively with all SSE and AVX instructions +supported by your CPU architecture turned on. It does not require +the compiler and build essentials described in the Requirements section. ### Large *k*-mers diff --git a/environment.yml b/environment-linux.yml similarity index 62% rename from environment.yml rename to environment-linux.yml index 07833c0..3a5fcee 100644 --- a/environment.yml +++ b/environment-linux.yml @@ -1,8 +1,10 @@ channels: - conda-forge dependencies: - - python=3.6 + - python>=3.6 - pip=20.1.1 - zlib=1.2.11 + - binutils=2.32 + - gxx_linux-64=7.3.0 - pip: - bifrost-src \ No newline at end of file