modified: Makefile
[GalaxyCodeBases.git] / projects / radseq / make / bwa.mk
blob024604e782d6fd914744b03846e1b9b2b62818a6
1 FQPATH := out
3 ALNARG:=aln -l 17 -q 10
4 SAMPEARG:=sampe -a 800
5 REF:=cat62
7 FQEXTS:=.fq.gz
8 BWACMD:=bwa
10 FQS1 = $(foreach d,$(FQPATH),$(wildcard $(addprefix $(d)/*,.1$(FQEXTS))))
11 FQS2 = $(foreach d,$(FQPATH),$(wildcard $(addprefix $(d)/*,.2$(FQEXTS))))
12 ALLITEMS := $(FQS1:.1.fq.gz=.sam)
14 .PHONY: all clean
16 all: $(ALLITEMS)
17 @echo all [$@] [$<] [${MAKEOPTS}]
19 %.sai: %.fq.gz
20 @echo "1 $(BWACMD) $(ALNARG) $(REF) $< > $@ 2>$@.log"
21 $(BWACMD) $(ALNARG) $(REF) $< > $@ 2>$@.log
23 %.sam: %.1.sai %.2.sai
24 @echo "2 $(BWACMD) $(SAMPEARG) $(REF) $(@:.sam=).1.sai $(@:.sam=).2.sai $(@:.sam=).1.fq.gz $(@:.sam=).2.fq.gz 2>$@.log |gzip -9c >$@.gz"
25 $(BWACMD) $(SAMPEARG) $(REF) $(@:.sam=).1.sai $(@:.sam=).2.sai $(@:.sam=).1.fq.gz $(@:.sam=).2.fq.gz 2>$@.log |gzip -9c >$@.gz
26 touch $@