Sweave (bash) shell script II

Fixed buglet with --noquiet, -nq option. Fixed version is available here. I will not post this version to CRAN, not yet.


Sweave (bash) shell script

My Sweave.sh (bash) shell script eases the compilation of Sweave (link1, link2) file to Postscript or PDF format i.e. Sweave --> LaTeX --> Postscript/PDF. Although, this seems an easy task, it can get quite involved, since there are many ways and glitches on how to compile LaTeX (LaTeX web page, Wikipedia) source file. For example:
  • LaTeX --> PS via texi2dvi or latex and dvips and then ps2pdf for PS --> PDF,
  • LaTeX --> PDF via texi2pdf or pdflatex.
Until now Sweave.sh worked only with Sweave source files i.e. a mix of LaTeX and R code. Today I have modified it in such a way so that it can also work with LaTeX file only. Now I can easily type
Sweave.sh --noweave -otld file.tex
to compile file.tex to PDF and open it directly in default PDF previewer. New version will be posted on CRAN. For the impatient I uploaded the script to my webpage.

See also:


Honey bee genetics

This post is for keeping track of writings about genetics & breeding in honey bee. Btw. Germany has BLUP evaluation for bees - link.

First some slovenian honey bee sites:
Some notes on genetics in bees from Germany:
Some relevant papers:
On genomic matrices:
Genome stuff:



Free classic music

Do you like to listen to some classic music while working with the computer? Try:


P.S. Works smoothly also with my Ubunut Linux setup

Firefox extensions

I use the following Firefox extensions:

Unilever and McDonalds change to free-range eggs

From WorldPoultry.net ...

Heritability estimates are dependent on the model

I frequently realize that heritability estimate is dependent on the model used for the estimation. I have in mind mixed/hierachical/multilevel model. You can play with adding or removing "fixed" effects as noted by Wilson, but you can also play with adding or removing "random" effects or even moving effects between "fixed" and "random" set of effects.


Bob's comment on Hill et al. Data and Theory Point to Mainly Additive Genetic Variance for Complex Traits

Bob has blogged about recent paper by Hill et al. in PLOS about variance components of genetic variance of complex (quantitative) traits. He argues that things are not so simple as Hill et al. state.

Opening farm subsidies to public scrutiny

Mariann Fischer Boel has blogged about opening farm subsisides to public in detail on the internet by the end of April next year. More ...

My webpage

I decided to move my (now old) webpage to Google pages. I did this move, since I find editing Google pages very easy and slick. However, file handling is quite limited. You can easily upload any file you want, but you can not create folders and there is a disk quota. Therefore, I decided to use Scribd for file sharing. Scribd offers unlimited storage for free and is also very easy and slick to use. I have started to migrate all my writings and talks to Scribd and made link on writings page.


Course and Workshop on Whole Genome Association and Genomic Selection

International postgraduate course and workshop

Whole Genome Association and Genomic Selection

September 1-8, 2008, in Salzburg, Austria


Use of genotype probabilities in selection on PrP genotype in sheep

I have finished paper on use of genotype probabilities in selection on PrP genotype in sheep. PrP genotype is one of the main factors for susceptibility to scrapie in sheep. Here is the link to the last version of the paper. And the abstract:

PrP genotype probabilities for ungenotyped animals of Jezersko-Solcava sheep breed were calculated. Data consisted of 10,429 animals among which 3,669 had PrP genotype data. There were 2,673 live ungenotyped animals. Five PrP haplotypes were present with the following frequencies: ARR 0.174, AHQ 0.074, ARH 0.083, ARQ 0.632, and VRQ 0.037. All 15 PrP genotypes were found. Iterative allelic peeling with incomplete penetrance model as implemented in GenoProb program was used for calculation of PrP genotype probabilities. There were only some additional PrP genotype and NSP type identifications with high probability. Main reasons for a low number of additional identifications can be attributed to large number of haplotypes with moderate frequencies, incomplete penetrance model, uniform prior, and inherently pedigree and genotype data structure. Incomplete penetrance model caused inflation of small probabilities but has proved to be very useful for field data where conflicting data rise due to pedigree of genotype errors. Novel parameters (maximal NSP type, average NSP type and its variance and accuracy) are proposed that make use of PrP genotype probabilities and can facilitate selection for scrapie resistance. Parameters were derived with emphasis on practical implementation of selection schemes based on NSP types. Maximal NSP type can be used to infer maximal potential scrapie susceptibility of individual ungenotyped animals as well as for whole flocks. Average NSP type makes full use of all PrP genotype probabilities and is the most useful and practical parameter for selection on NSP type and therefore PrP genotype. In addition, accuracy of average NSP type should also be used as selection criteria in order to assess the variability of average NSP type.


Populacijska genetika in selekcija domačih živali

Pred časom sem že postavil spletno stran za objavo gradiva za vaje pri predmetu populacijska genetika in selekcija domačih živali. Spletna stran se nahaja na mojih spletnih straneh pri Google-u:

Danes smo si s študenti ogledali en praktičen in zanimiv primer, kako lahko vplivamo na letni genetski napredek. Ja, primer sem povzel po knjigi "Understanding Animal Breeding" od Bourdon-a. Sicer bolj uporabljamo "zeleno" knjigo "Introduction to Quantitative Genetics" od Falconer-ja. Za zaključek pa še povezava do prispevka o tem avtorju in njegovi knjigi.


Histogram v živo


Hardy, Weinberg and Language Impediments

PrP allele (haplotype) and genotye frequencies in sheep II

I wrote about better display of PrP haplotype and genotype frequencies in last post. I have proposed a set of histograms instead of a table. However, parallel plot (R example 1, R example 2, random web article) is even better. Here is my attempt to use it on data compiled by Lühken et al. (2008):
There is still room for improvement of the plot i.e. axis, ticks, ... For example, I would prefer to have 0-100 % scale on y axis. Anyway, the idea of parallel plot for haplotype/genotype frequencies in case of many haplotypes/genotypes should be clear. Here is also the data and R code to produce the plots.


PrP allele (haplotype) and genotye frequencies in sheep

Lühken et al. (2008) published estimates of PrP allele (haplotype) and genotye frequencies in for 56 sheep breeds in Europe and Middle East. They made a huge one-page table with all the numbers. Gosh, it is hard to read that table! There is to much info. It would be much better if they would plot this data. Well, I did and I think it is much more informative. I just copied their table into a spreadsheet and used R to do the plotting

Browse Happy



Some hot animal science from Wageningen

Animal Science Group at Wageningen has a nice newsletter with hot news in animal science. Here is a list of link to newsletters:

One more statistical package

I just came across another statistical package - aML.

Genetic diversity in human

There is a nice review paper "Going the distance: human population genetics in a clinal world" by Handley et al. They have a nice picture of earth globe with routes of colonization and genetic diversity. If you have access to Trends in genetics, these two links are very informative:

Lessons learned from the dog genome

Wayne and Ostrander wrote a paper "Lessons learned from the dog genome". Here is their abstract: "Extensive genetic resources and a high-quality genome sequence position the dog as an important model species for understanding genome evolution, population genetics and genes underlying complex phenotypic traits. Newly developed genomic resources have expanded our understanding of canine evolutionary history and dog origins. Domestication involved genetic contributions from multiple populations of gray wolves probably through backcrossing. More recently, the advent of controlled breeding practices has segregated genetic variability into distinct dog breeds that possess specific phenotypic traits. Consequently, genome-wide association and selective sweep scans now allow the discovery of genes underlying breed-specific characteristics. The dog is finally emerging as a novel resource for studying the genetic basis of complex traits, including behavior".


LaTeX and Windows

Two pages (one static web page and blog post linking to the first) with LaTeX and Windows comparison:
I think that blog spot is very relevant!