This repository has been archived by the owner on May 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
131 lines (110 loc) · 3.35 KB
/
Makefile
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
all: scripts/readToSNVList \
envs/python2.done \
envs/python3.done \
TestCases/SDAtest/ref.fasta \
externalRepos/racon-v1.4.5/build/bin/racon \
externalRepos/canu-1.8/Linux-amd64/bin/canu \
SHELL := /bin/bash
CCOPTS=-g
DEBUG?=""
ifneq ($(DEBUG), "")
CCOPTS=$(CCOPTS_BASE) $(DEBUG)
else
CCOPTS=-O3 $(CCOPTS_BASE)
endif
STATIC=-static
ifeq ($(OPT), "1")
CCOPTS=-g $(CCOPTS_BASE) -lprofiler
STATIC=
endif
#
# Get readToSNVList
#
externalRepos/pbgreedyphase/readToSNVList:
source env_sda.sh && \
cd externalRepos/pbgreedyphase && \
make readToSNVList
scripts/readToSNVList: externalRepos/pbgreedyphase/readToSNVList
source env_sda.sh && \
cp externalRepos/pbgreedyphase/readToSNVList scripts/readToSNVList
#
# make conda envs
#
envs/python2.done:
source env_sda.sh && \
mkdir -p envs && \
mamba env create --force -f envs/python2.yml --prefix $(PWD)/envs/sda-python-2 && \
touch envs/python2.done
envs/python3.done:
source env_sda.sh && \
mkdir -p envs && \
mamba env create --force -f envs/python3.yml --prefix $(PWD)/envs/sda-python-3 && \
touch envs/python3.done
#
# make canu
#
externalRepos/canu-1.8/Linux-amd64/bin/canu:
source env_sda.sh && \
cd externalRepos && \
wget https://github.com/marbl/canu/releases/download/v1.8/canu-1.8.Linux-amd64.tar.xz && \
tar -xf canu-1.8.Linux-amd64.tar.xz && \
rm canu-1.8.Linux-amd64.tar.xz
#
# make racon, okay if this fails, the pipeline will run without polishing
#
externalRepos/racon-v1.4.5/build/bin/racon:
source env_sda.sh && \
cd externalRepos && \
wget https://github.com/lbcb-sci/racon/releases/download/1.4.5/racon-v1.4.5.tar.gz && \
tar -xvzf racon-v1.4.5.tar.gz && \
cd racon-v1.4.5 && mkdir -p build && cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && make && \
cd ../../ && rm racon-v1.4.5.tar.gz
#
# Make hstlib for bamtofreq
#
externalRepos/htslib-1.9/libhts.so:
source env_sda.sh && \
cd externalRepos && \
wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2 && \
tar xjf htslib-1.9.tar.bz2 && \
cd htslib-1.9/ && \
autoheader && autoconf && ./configure --prefix=$(PWD) && make && \
cd ../ && rm htslib-1.9.tar.bz2
#
#
#
bamToFreq: externalRepos/BamToFreq.cpp externalRepos/htslib-1.9/libhts.so
source env_sda.sh && \
g++ -I externalRepos/htslib-1.9 $(CCOPTS) $^ -o $@ -L externalRepos/htslib-1.9 -lhts -lpthread -lz -Wl,-rpath,$(PWD)/externalRepos/htslib-1.9
#
# only make the dependacies required for the collapse analysis.
#
collapse: envs/python3.done
#
# Make the test cases
#
TestCases/SDAtest/ref.fasta:
rm -rf TestCases/SDAtest*
cd TestCases/ && \
wget https://eichlerlab.gs.washington.edu/help/mvollger/SDA/SDAtest.tar.gz && \
wget https://eichlerlab.gs.washington.edu/help/mvollger/SDA/SDAtest2.tar.gz && \
tar -zxvf SDAtest.tar.gz && \
tar -zxvf SDAtest2.tar.gz
#
# Make the fake genome test case
#
TestCases/GenomeTest/ref.fasta:
rm -rf TestCases/GenomeTest*
cd TestCases/ && \
wget https://eichlerlab.gs.washington.edu/help/mvollger/SDA/GenomeTest.tar.gz && \
tar -zxvf GenomeTest.tar.gz
clean:
source env_sda.sh && \
conda remove -y --prefix $(PWD)/envs/sda-python-3 --all ; \
conda remove -y --prefix $(PWD)/envs/sda-python-2 --all ; \
rm -f envs/python2.done envs/python3.done ; \
rm -rf TestCases/SDAtest* ; \
rm -rf TestCases/GenomeTest* ; \
rm -f externalRepos/pbgreedyphase/readToSNVList ; \
rm -f scripts/readToSNVList