1 BAMS
= $(sort $(wildcard *.bam
))
2 BAMF
= $(patsubst %.bam
,%,$(BAMS
))
3 OUT1
= $(addsuffix .recal.tbl
,$(BAMF
))
4 OUT3
= $(addsuffix .post.tbl
,$(BAMF
))
5 OUT4
= $(addsuffix .cmp.pdf
,$(BAMF
))
6 OUT2
= $(addsuffix .recalbam
,$(BAMF
))
8 REF
:= /bak
/seqdata
/genomes
/Felis_catus_80_masked
/Felis_catus80_chr.fa
12 all: $(OUT1
) $(OUT2
) $(OUT3
) $(OUT4
)
13 echo
[$(BAMS
)] -> [$(OUT2
)]
16 gatk
-T BaseRecalibrator
-nct
8 -mte
-R
$(REF
) -I
$(*).bam
-knownSites filtered2.vcf
-o
$@
2>$@.log
18 %.post.tbl
: %.recal.tbl
%.bam
19 gatk
-T BaseRecalibrator
-nct
8 -mte
-R
$(REF
) -I
$(*).bam
-knownSites filtered2.vcf
-BQSR
$(@
:.post.tbl
=.recal.tbl
) -o
$@
2>$@.log
21 %.cmp.pdf
: %.recal.tbl
%.post.tbl
22 gatk
-T AnalyzeCovariates
-R
$(REF
) -before
$(@
:.cmp.pdf
=.recal.tbl
) -after
$(@
:.cmp.pdf
=.post.tbl
) -plots
$@
2>$@.log
24 %.recalbam
: %.recal.tbl
%.bam
25 gatk
-T PrintReads
-R
$(REF
) -I
$(*).bam
-BQSR
$(@
:.recalbam
=.recal.tbl
) -o
$@
2>$@.log