diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9950107a3edff3b77b71f9be4f1e8cf443d838b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,60 @@ +FROM alpine:3.11.5 +#FROM alpine:20190925 + +ENV CFLAGS="-fPIC -O3" + +RUN apk add wget git xz bzip2-static musl m4 autoconf tar xz-dev bzip2-dev build-base libpthread-stubs libzip-dev gfortran \ + openssl-libs-static openblas-static pcre-dev curl llvm-dev curl-static bash + +RUN mkdir -p /usr/local/include && \ + git clone --depth 1 https://github.com/ebiggers/libdeflate.git && \ + cd libdeflate && make -j4 CFLAGS="-fPIC -O3" install && \ + cd .. && rm -rf libdeflate && \ + git clone https://github.com/cloudflare/zlib cloudflare-zlib && \ + cd cloudflare-zlib && ./configure && make install && \ + cd .. && \ + rm -rf cloudflare-zlib + +RUN cd / && \ + git clone -b v1.2.6 git://github.com/nim-lang/nim nim && \ + cd nim && \ + sh ./build_all.sh && \ + rm -rf csources && \ + echo 'PATH=/nim/bin:$PATH' >> ~/.bashrc && \ + echo 'PATH=/nim/bin:$PATH' >> ~/.bash_profile && \ + echo 'PATH=/nim/bin:$PATH' >> /etc/environment + +RUN apk add cmake openssl-dev && \ + wget https://libzip.org/download/libzip-1.6.1.tar.gz && \ + tar xzvf libzip-1.6.1.tar.gz && \ + cd libzip-1.6.1 && \ + mkdir build && cd build && \ + cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/ ../ && \ + make -j4 CFLAGS="-fPIC -O3" install && \ + cd ../../ && rm -rf libzip-1.6.1* + + +ENV PATH=:/root/.nimble/bin:/nim/bin/:$PATH + +RUN \ + git clone https://github.com/samtools/htslib && \ + cd htslib && git checkout 1.11 && autoheader && autoconf && \ + ./configure --disable-s3 --disable-libcurl --with-libdeflate && \ + make -j4 CFLAGS="-fPIC -O3" install && \ + cd ../ && \ + git clone https://github.com/samtools/bcftools && \ + cd bcftools && git checkout 1.10.2 && autoheader && autoconf && \ + ./configure --disable-s3 --disable-libcurl --with-libdeflate && \ + make -j4 CFLAGS="-fPIC -O3" install && \ + cd ../ && rm -rf htslib bcftools + +ADD . /src/ + +RUN nimble install -y https://gitlab.svi.edu.au/biocellgen-public/sscocaller.git + +RUN ls ~/.nimble/lib/ +ENV LD_LIBRARY_PATH=:/root/.nimble/lib/:$LD_LIBRARY_PATH + +RUN cp /root/.nimble/bin/sscocaller /usr/bin/ + +RUN /usr/bin/sscocaller \ No newline at end of file diff --git a/README.md b/README.md index 5e84fe24798ebab4f53014e0957ec9970bd5a0c4..8fc84beaa588325c568170e11e2c37e3a8a46fa9 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,6 @@ docker run -it svirlyu/sscocaller ``` -### Static builds +### Static builds (WIP) -The static bianry can be simply downloaded which works for GNU/Linux type OS: \ No newline at end of file +The static bianry can be simply downloaded which works for GNU/Linux type OS: diff --git a/src/sscocaller b/src/sscocaller new file mode 100755 index 0000000000000000000000000000000000000000..d6da13dcf1fd6c428542421634d1e07d28f48507 Binary files /dev/null and b/src/sscocaller differ diff --git a/src/sscocaller.nim b/src/sscocaller.nim index 196f360bc2b0626934c1cd164a5c706ff61e597b..15b35b4afa64745e5f536b3c5f5ca70410fb45bf 100755 --- a/src/sscocaller.nim +++ b/src/sscocaller.nim @@ -13,7 +13,11 @@ import hts import tables import sequtils import math +<<<<<<< HEAD import distributions/rmath +======= +from distributions/rmath import dbinom +>>>>>>> 7c0fd54896b7218781289237b99b0cd26eec98a3 import streams #echo paramCount(), " ", paramStr(1) diff --git a/src/xx_exe_out b/src/xx_exe_out new file mode 100755 index 0000000000000000000000000000000000000000..e1777bc84cc7db96c6d43ea1c38716d81e5dedab Binary files /dev/null and b/src/xx_exe_out differ diff --git a/sscocaller.nimble b/sscocaller.nimble index 288932a10d4edd26958721eead16d89b688a6f59..856f0a5689ed2b7b1c677ae1cc25c1f50eb0b2fc 100644 --- a/sscocaller.nimble +++ b/sscocaller.nimble @@ -10,7 +10,7 @@ bin = @["sscocaller"] # Dependencies -requires "nim >= 1.2.0","docopt","hts >= 0.3.4" +requires "nim >= 1.0.0","docopt","hts >= 0.3.4" requires "https://github.com/ruqianl/distributions.git" # task test, "run the tests":