]> git.donarmstrong.com Git - presentations/genome_diversity_oct_2016.git/commitdiff
add makefile and gitignore
authorDon Armstrong <don@donarmstrong.com>
Wed, 19 Oct 2016 19:54:11 +0000 (12:54 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 19 Oct 2016 19:54:11 +0000 (12:54 -0700)
Makefile [new file with mode: 0644]
figures/.gitignore [new file with mode: 0644]
genome_diversity_paper/.gitignore [new file with mode: 0644]
genome_diversity_paper/extract_figures.pl [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a655bfc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+all: simmons_genome_diversity_oct_2016.pdf
+
+R ?= R
+
+%.pdf: %.svg
+       inkscape -A $@ $<
+       pdfcrop $@
+       mv $(dir $@)*-crop.pdf $@
+
+%.png: %.svg
+       inkscape -e $@ -d 300 $<
+
+%.tex: %.Rnw
+       $(R) --encoding=utf-8 -e "library('knitr'); knit('$<')"
+
+simmons_genome_diversity_oct_2016.pdf:                                                                 \
+simmons_genome_diversity_oct_2016.tex genome_diversity_paper figures
+
+%.pdf: %.tex $(wildcard *.bib) $(wildcard *.tex)
+       latexmk -f -pdf -pdflatex='xelatex -shell-escape -8bit -interaction=nonstopmode %O %S' -bibtex -use-make $<
+
+
diff --git a/figures/.gitignore b/figures/.gitignore
new file mode 100644 (file)
index 0000000..e8c4a45
--- /dev/null
@@ -0,0 +1,7 @@
+igb_wordmark.pdf
+igb_wordmarks.zip
+relevant_xkcd.png
+uofi_mark.pdf
+uofi_mark.zip
+reduced_alphabet.png
+spalax.jpg
\ No newline at end of file
diff --git a/genome_diversity_paper/.gitignore b/genome_diversity_paper/.gitignore
new file mode 100644 (file)
index 0000000..65e24a5
--- /dev/null
@@ -0,0 +1,5 @@
+*.png
+*.pdf
+paper_figures
+paper_images
+supplemental_images
diff --git a/genome_diversity_paper/extract_figures.pl b/genome_diversity_paper/extract_figures.pl
new file mode 100644 (file)
index 0000000..6775e5d
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+my %figures =
+    (title => ['0','2400x1600+100+100'],
+     fig1a_1 => ['1','750x1200+60+750'],
+     fig1a_2 => ['1','750x1200+60+1950'],
+     fig1b => ['1','1000x500+810+1200'],
+     fig1c => ['1','1000x500+810+1700'],
+     fig1d => ['1','1000x500+810+2200'],
+     fig2a => ['2','1000x750+200+200'],
+     fig2b => ['2','1000x750+1200+200'],
+     fig2c => ['2','1000x750+200+950'],
+     fig2d => ['2','1000x750+1200+950'],
+     fig2e => ['2','1000x650+200+1650'],
+     fig2f => ['2','1000x650+1200+1650'],
+     fig3  => ['3','1200x1050+100+200'],
+     fig_ed1  => ['6','2400x1200+100+100'],
+     fig_ed2  => ['7','2400x2400+100+100'],
+     fig_ed3  => ['8','2400x2400+100+100'],
+     fig_ed4  => ['9','2400x1700+100+100'],
+     fig_ed5  => ['10','2400x2400+100+100'],
+     fig_ed5  => ['11','2400x2400+100+100'],
+    );
+
+for my $figure (keys %figures) {
+    print($figure."\n");
+    system('convert','-density','300',
+           'paper.pdf['.$figures{$figure}[0].']',
+           '-crop',$figures{$figure}[1],
+           $figure.'.png'
+          )
+}