modified: tasks/common.wdl
[GalaxyCodeBases.git] / makefiles / cutadapter.mk
blob8d0f5baa8892066b206a3d041ccf31e32220d34e
1 RADSEQFQPATH := fqrad
2 WGSFQPATH := fqwgs
4 ADAPTER13:=AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATC
5 ADAPTER15:=AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
6 ADAPTER23:=AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT
7 ADAPTER25:=GATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT
9 CUTADAPTARG:=-e 0.08 -n 2 -m 0 -O 5
10 CUTADRADARG:=-e 0.08 -n 1 -m 0 -O 5
12 FQEXTS:=.fq.gz
13 CUTADAPTCMD:=cutadapt
15 RADSEQFQS1 = $(foreach d,$(RADSEQFQPATH),$(wildcard $(addprefix $(d)/*,.1$(FQEXTS))))
16 RADSEQFQS2 = $(foreach d,$(RADSEQFQPATH),$(wildcard $(addprefix $(d)/*,.2$(FQEXTS))))
17 WGSFQS1 = $(foreach d,$(WGSFQPATH),$(wildcard $(addprefix $(d)/*,.1$(FQEXTS))))
18 WGSFQS2 = $(foreach d,$(WGSFQPATH),$(wildcard $(addprefix $(d)/*,.2$(FQEXTS))))
19 COMMONFQS := $(RADSEQFQS2) $(WGSFQS1) $(WGSFQS2)
20 ALLITEMS := $(RADSEQFQS1:.1.fq.gz=.rad) $(COMMONFQS:.fq.gz=)
22 .PHONY: all clean
24 all: $(ALLITEMS)
25 @echo all [$@] [$<] [${MAKEOPTS}]
27 %.1: %.1.fq.gz
28 $(CUTADAPTCMD) -a $(ADAPTER13) -g $(ADAPTER15) $(CUTADAPTARG) -o $@.cut.gz -r $@.rest.gz --info-file=$@.nfo.gz $< > $@.cut.log
29 touch $@
31 %.2: %.2.fq.gz
32 $(CUTADAPTCMD) -a $(ADAPTER23) -g $(ADAPTER25) $(CUTADAPTARG) -o $@.cut.gz -r $@.rest.gz --info-file=$@.nfo.gz $< > $@.cut.log
33 touch $@
35 %.rad: %.1.fq.gz
36 $(CUTADAPTCMD) -a $(ADAPTER13) -g $(ADAPTER15) $(CUTADAPTARG) -o $(@:.rad=.1.cut.gz) -r $(@:.rad=.1.rest.gz) --info-file=$(@:.rad=.1.nfo.gz) $< > $(@:.rad=.1.cut.log)
37 touch $@
39 clean:
40 -rm $(ALLITEMS) $(COMMONFQS:.fq.gz=.rest.gz) $(COMMONFQS:.fq.gz=.cut.log)
41 -rm $(COMMONFQS:.fq.gz=.cut.gz)