--- /dev/null
+GENE_INFO ?=$(shell dir=./; while [ "$$( (cd $${dir} >/dev/null; pwd) )" != "/" ]; do if [ -e "$${dir}bin/gene_info" ]; then echo $${dir}bin/gene_info; break; fi; dir="$${dir}../"; done;)
+
+GENE_INFO_OPTIONS ?= --splicing
+
+gene_information.txt: gene_list.txt $(GENE_INFO)
+ $(GENE_INFO) $(GENE_INFO_OPTIONS) $< > $@;
--- /dev/null
+SNP_INFO ?=$(shell dir=./; while [ "$$( (cd $${dir} >/dev/null; pwd) )" != "/" ]; do if [ -e "$${dir}bin/snp_info" ]; then echo $${dir}bin/snp_info; break; fi; dir="$${dir}../"; done;)
+
+snp_information.txt: snp_list.txt
+ if [ -e $@.target.md5sum ] && [ -e $@ ] && md5sum --status --check $@.target.md5sum; then \
+ touch $@; \
+ else \
+ $(SNP_INFO) $(SNP_INFO_OPTIONS) $< > $@; \
+ md5sum $^ > $@.target.md5sum; \
+ fi;
--- /dev/null
+R ?= R
+
+%.pdf: %.svg
+ inkscape -A $@ $<
+ pdfcrop $@
+ mv $(dir $@)*-crop.pdf $@
+
+%.png: %.svg
+ inkscape -e $@ -d 300 $<
+
+%.tex: %.Rnw
+ $(R) CMD Sweave --encoding=utf-8 $<
+
+%.pdf: %.tex $(wildcard *.bib) $(wildcard *.tex)
+ latexmk -pdflatex=xelatex -bibtex -use-make -pdf $<