-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (33 loc) · 1.3 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
OUTGROUP := root
OUTDIR := out
.PRECIOUS: $(OUTDIR)/%.fasta $(OUTDIR)/%.newick
JSON := $(wildcard *.json)
PHY := $(patsubst %.json, $(OUTDIR)/%.phy, $(JSON))
FASTA := $(patsubst %.json, $(OUTDIR)/%.fasta, $(JSON))
PHYML_ASCII := $(patsubst %.json, $(OUTDIR)/%-phyml.ascii, $(JSON))
RAXML_ASCII := $(patsubst %.json, $(OUTDIR)/%-raxml.ascii, $(JSON))
PHYML_NEWICK := $(patsubst %.json, $(OUTDIR)/%-phyml.newick, $(JSON))
RAXML_NEWICK := $(patsubst %.json, $(OUTDIR)/%-raxml.newick, $(JSON))
ASCII := $(PHYML_ASCII) $(RAXML_ASCII)
NEWICK := $(PHYML_NEWICK) $(RAXML_NEWICK)
all: $(OUTDIR) $(ASCII) $(NEWICK)
out:
test -d $(OUTDIR) || mkdir $(OUTDIR)
$(OUTDIR)/%.fasta : %.json
seq-gen.py --specification $< > $@
$(OUTDIR)/%.phy: $(OUTDIR)/%.fasta
fasta-to-phylip.py < $< > $@
$(OUTDIR)/%-phyml.newick: $(OUTDIR)/%.phy
phyml -m GTR -q -i $< -o tlr -f m -v e --run_id xxxxx >/dev/null
mv $(OUTDIR)/*_tree_xxxxx.txt $@
rm -f $(OUTDIR)/*.phy_phyml_*_xxxxx*
$(OUTDIR)/%-raxml.newick: $(OUTDIR)/%.phy
raxml-ng --msa $< --model GTR+G --prefix xxxxx --seed $$RANDOM --threads 1 >/dev/null
mv xxxxx.raxml.bestTree $@
rm -f xxxxx.*
$(OUTDIR)/%.ascii: $(OUTDIR)/%.newick
newick-to-ascii.py --outgroup $(OUTGROUP) < $< > $@
clean:
rm -f $(ASCII) $(NEWICK) $(PHY) $(OUTDIR)/*xxxxx* xxxxx.*
clobber: clean
rm -fr $(OUTDIR)