+ added script which draws the coverage bar plots presented in the QPalma paper
authorfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 21 May 2008 19:43:10 +0000 (19:43 +0000)
committerfabio <fabio@e1793c9e-67f9-0310-80fc-b846ff1f7b36>
Wed, 21 May 2008 19:43:10 +0000 (19:43 +0000)
git-svn-id: http://svn.tuebingen.mpg.de/ag-raetsch/projects/QPalma@9134 e1793c9e-67f9-0310-80fc-b846ff1f7b36

scripts/createCoverageFigures.sh [new file with mode: 0755]

diff --git a/scripts/createCoverageFigures.sh b/scripts/createCoverageFigures.sh
new file mode 100755 (executable)
index 0000000..ee1bc8b
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+
+cat $1 | grep correct | cut -f 3 > correct.coverage_labels
+cat $1 | grep wrong | cut -f 3 > wrong.coverage_labels
+
+( cat <<EOF
+load correct.coverage_labels;
+load wrong.coverage_labels;
+correct_vec = zeros(10,1);
+wrong_vec = zeros(10,1);
+for i=1:10,
+   correct_vec(i) = sum([correct == (i-1)]);
+   wrong_vec(i) = sum([wrong == (i-1)]);
+end
+bar(correct_vec,1)
+hold;
+set(gca,'xlim',[0.5 length(correct_vec)+0.5])
+xlabel('Confirmation count')
+ylabel('Frequency')
+set(gca,'XTick',[0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5])
+set(gca,'XTickLabel',[0,1,2,3,4,5,6,7,8,9,10])
+saveas(gcf,'pos_cov.eps')
+clf;
+bar(wrong_vec,1);
+hold;
+set(gca,'xlim',[0.5 length(correct_vec)+0.5])
+xlabel('Confirmation count')
+ylabel('Frequency')
+set(gca,'XTick',[0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5])
+set(gca,'XTickLabel',[0,1,2,3,4,5,6,7,8,9,10])
+saveas(gcf,'neg_cov.eps')
+EOF
+) > test_script.m
+
+matlab -nojvm -r "test_script;" || echo -e "\nmatlab script failed!\n"