### Archive

Archive for June, 2013

## Software update

Another month, another software update

samtools 0.1.19

I missed it in the last posts (this version was released in March). Multi-thread is now available. I play a bit with the the different displays (Html, Curse and Text) of tview, (pretty handy). I may need more time to get acustomed to bamcheck/plot-bamcheck output.

Delly 0.0.11

Some small fixes, a new progress bar to control process, better temporary file handling, and BWA-mem support…more here

BWA 0.7.5a

Several small fixes

Picard tools 1.93

Small bug fixes. Released some hours ago (I had to compensate samtools glitch)

llvm 3.3

Still some efficiency enhancement, clang is now totally C++11 complient. New Arch support…and more. Release announcement is still pending, but binary are already available.

GCTA

Apparently computing speed improvement are the newsworthy point of this release.

Coming soon…

I’ve had access to both next cuda 5.5 RC and Intel compiler….and so far the good new is that both now offer a simplified install procedure. Cuda 5.5 is available as a deb file, Intel compiler as a script with a GUI. I am eager to test these RC.

Categories: emacs, Linux, NGS

## Are bets following mendel’s law ?

My parents just got two cute calves. Their parents are both heterozygous at the polled locus, furthermore their sire is heterozygous at the Red Factor (Rr). As a breeder I hope they’ll be both homozygous polled (PP) and red factor (Rr)…as a scientist, (or just a realistic breeder) I know the odds for such an event are low, so I tried to bet for something more realistic — which in fact is not that easy !  This lead me to the question :

Do bets on genotypes follow mendel’s law ?

I’ve set a quick and dirty survey  to collect data, in the hope that it may help to answer this question. So if you’ve got time to fill the form, I’ll be more than happy !

PS : These calves will be tested on the new Eurogenomics LD chip so real genotypes /status will be available in a month or two….with hopefully some first analysis of the results.

## Beamer theme creation

June 13, 2013 1 comment

As mentioned in a previous post , INRA renewed it’s visual identity. Unfortunately no beamer theme was provided. This gave me the occasion to look a bit deeper on beamer’s theme and how to create a relatively simple INRA theme.

I tried to keep things simple. Thus, I first identify the main characteristics of the powerpoint template.

1. First slide have a green background while others slides have a white background and a logo on the left of the header
2. General colors for title and subtitle are two specific green (with a precise RGB code)
3. All the slides contains author name, presentation title, and date in their footer.

Beamer theme are defined through “.sty” files. Here, we’ll create a file named beamerthemeINRA.sty , the later will be used via the command \usetheme{INRA} in our source code. The beamerthemeINRA.sty itself, contain instructions to include sty files each defining a part of the theme.

\ProvidesPackage{beamerthemeINRA}[]
\useoutertheme{INRA}

We will address the solutions I’ve adopted for each of the 3 main points of the INRA theme.

## Background

The Background can be changed in the outtertheme, we have to redefine the canvas template and include a background image.

In my case, to get the background, I opened the powerpoint templates, removed any text made  screen-shots of it. The screen-shots were then pasted in gimp, and saved as png. Now, in the file outerthemeINRA.sty we define the images to include in the background. As we’ll use a different background on the first slide, we’ll need a conditional instructions.

\setbeamertemplate{background canvas}{%
\includegraphics[width=\paperwidth,height=\paperheight]{bgINRA1}
\else%Other slides
\includegraphics[width=\paperwidth,height=\paperheight]{bgINRA2}
\fi%
}

First test, add \usetheme{INRA} in your source code, check bgINRA1 and bgINRA2, and all the sty file are in the current directory. Compile, check your pdf (things should already be pretty close to what you expect).

The title slide is obviously not where it should it should ! We’ll have to tweak the title template. After a quick look at some other beamer theme, and series of trials and errors, I  end out with this bunch of code :

## Colors

Colors are generally defined in a beamercolortheme.sty file.

\definecolor{INRA@lgreen}{RGB}{188,214,49}
\definecolor{INRA@dgreen}{RGB}{139,172,33}
\setbeamercolor{structure}{fg=INRA@dinst}

Structure will define the color set for most of the elements of your presentation. We define only the foreground color, since a background colour would hide the upper left logo in the background. Now add \usecolortheme{INRA} to the beamerthemeINRA.sty, compile and check the results.

## Footline

Back to the outertheme, we now want to add the author, presentation title and date in the footline. Once again, after a look at other theme, we copy paste code that look close to what we are looking for. Proceed by trial and errors, until obtaining a satisfactory result. For me it gave something like :

%footline
\defbeamertemplate*{footline}{INRA theme}{
\begin{beamercolorbox}[wd=\paperwidth,ht=15 pt,leftskip=1.5cm,dp=1ex]{structure.fg}%
\end{beamercolorbox}
}

## Useful resources

The theme is now available on the animal genetics’ forge

In order to create the theme, I googled a lot, here is a stack of useful link I went trough, it might be of interest to you.

http://www.tug.org/pracjourn/2005-4/mertz/mertz.pdf

http://en.wikibooks.org/wiki/LaTeX/Presentations

http://mcclinews.free.fr/latex/beamermodif.php

http://www.math.umbc.edu/~rouben/beamer/quickstart.html

http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/beamer/doc/beameruserguide.pdf

http://programming-r-pro-bro.blogspot.fr/2011/11/create-your-own-beamer-template.html

Categories: Communication, LaTeX