Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Dec 17, 2018
1 parent 67f198e commit 6584353
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ slivar \
Note that `slivar` does not give direct access to the genotypes, instead exposing `alts` where 0 is homozygous reference, 1 is heterozygous, 2 is
homozygous alternate and -1 when the genotype is unknown. It is recommended to **decompose** a VCF before sending to `slivar`


## Installation

get the latest binary from: https://github.com/brentp/slivar/releases/latest

or use via docker from: [brentp/slivar:latest](https://cloud.docker.com/repository/docker/brentp/slivar)

### Attributes

+ anything in the INFO is available as e.g. INFO.CSQ
Expand Down
20 changes: 12 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ RUN cd / && \
cd nim && \
chmod +x ./build_all.sh && \
scl enable devtoolset-2 ./build_all.sh && \
export PATH=/nim/bin:$PATH && \
echo 'PATH=/nim/bin:$PATH' >> ~/.bashrc && \
echo 'PATH=/nim/bin:$PATH' >> ~/.bash_profile && \
cd / && \
echo 'PATH=/nim/bin:/root/.nimble/bin:$PATH' >> ~/.bashrc && \
echo 'PATH=/nim/bin:/root/.nimble/bin:$PATH' >> ~/.bash_profile

RUN cd / && \
export PATH=/nim/bin:/root/.nimble/bin:$PATH && \
source scl_source enable devtoolset-2 && \
nimble install -y nimgen && \
cd / && git clone -b dev https://github.com/brentp/duktape-nim && \
cd duktape-nim && \
nimble install --verbose -y && \
git clone --depth 1 git://github.com/brentp/slivar.git && \
cd slivar && \
nimble install -y hts && \
source scl_source enable devtoolset-2 && \
nimble install --verbose -y && \
nim c -d:release -o:/usr/bin/slivar --passC:-flto src/slivar && \
rm -rf /slivar && slivar -h

rm -rf /slivar /duktape-nim && slivar -h
1 change: 1 addition & 0 deletions slivar.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import ospaths,strutils

task test, "run the tests":
exec "nim c --lineDir:on --debuginfo -r --threads:on src/slivarpkg/duko"
exec "bash tests/functional-tests.sh"

task docs, "Builds documentation":
mkDir("docs"/"slivar")
Expand Down
3 changes: 1 addition & 2 deletions src/slivar.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ proc newEvaluator*(kids: seq[Sample], expression: TableRef[string, string], info
quit $msg
)


result = TrioEvaluator(ctx:duk_create_heap(nil, nil, nil, nil, my_fatal))
result.ctx.duk_require_stack_top(500000)
var idx = result.ctx.duk_push_c_function(debug, -1.cint)
discard = result.ctx.duk_push_c_function(debug, -1.cint)
discard result.ctx.duk_put_global_string("debug")
for k, v in expression:
result.trio_expressions.add(result.ctx.compile(v))
Expand Down

0 comments on commit 6584353

Please sign in to comment.