-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
73 lines (59 loc) · 2.25 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
PROJECT := "drprg"
EXTDIR := absolute_path("src/ext")
make_extdir:
mkdir -p {{ EXTDIR }}
MAKE_PRG_VERSION := "0.4.0"
MAKEPRG_URL := "https://github.com/iqbal-lab-org/make_prg/releases/download/" + MAKE_PRG_VERSION + "/make_prg_" + MAKE_PRG_VERSION
MAKEPRG := join(EXTDIR, "make_prg")
# download make_prg binary
makeprg: make_extdir
wget "{{ MAKEPRG_URL }}" -O "{{ MAKEPRG }}"
chmod +x "{{ MAKEPRG }}"
PANDORA_VERSION := "0.10.0-alpha.0.1"
PANDORA_URL := "https://github.com/mbhall88/pandora/releases/download/" + PANDORA_VERSION + "/pandora-linux-precompiled-v" + PANDORA_VERSION
PANDORA := join(EXTDIR, "pandora")
# download pandora binary
pandora: make_extdir
wget "{{ PANDORA_URL }}" -O "{{ PANDORA }}"
chmod +x "{{ PANDORA }}"
BCFTOOLS_VERSION := "1.15.1"
BCFTOOLS_URL := "https://github.com/samtools/bcftools/releases/download/" + BCFTOOLS_VERSION + "/bcftools-" + BCFTOOLS_VERSION + ".tar.bz2"
BCFTOOLS := join(EXTDIR, "bcftools")
# download and build bcftools binary
bcftools: make_extdir
#!/usr/bin/env bash
set -euxo pipefail
cd {{ EXTDIR }}
wget {{BCFTOOLS_URL}} -O - | tar -xjf -
cd bcftools-{{ BCFTOOLS_VERSION }}
./configure --prefix=$PWD
make
make install
cd {{ invocation_directory() }}
ln -sf bcftools-{{ BCFTOOLS_VERSION }}/bin/bcftools {{ BCFTOOLS }}
MAFFT_VERSION := "7.505"
MAFFT_URL := "https://mafft.cbrc.jp/alignment/software/mafft-" + MAFFT_VERSION + "-without-extensions-src.tgz"
MAFFT_SRC := join(EXTDIR, "mafft")
MAFFT_BIN := join(MAFFT_SRC, "bin/mafft")
# download and build mafft
mafft: make_extdir
#!/usr/bin/env bash
set -euxo pipefail
mkdir -p {{MAFFT_SRC}}
wget -O - {{MAFFT_URL}} | tar xzf - -C {{MAFFT_SRC}} --strip-components=1
sed -i "1s?/usr/local?{{MAFFT_SRC}}?" {{MAFFT_SRC}}/core/Makefile
make -C {{MAFFT_SRC}}/core install PREFIX={{MAFFT_SRC}}
# download and build all dependencies
deps: makeprg pandora bcftools mafft
# run clippy to check for linting issues
lint:
cargo clippy --all-features --all-targets -- -D warnings
# run all tests
test:
cargo test -v --all-targets --no-fail-fast
# get coverage with tarpaulin
coverage:
cargo tarpaulin -t 300 -- --test-threads 1
# serve and open the docs in a web browser
serve-docs:
mdbook serve --open docs/