Blog Archives

Read line by line of a file in R

December 1, 2013
By

Are you using R for data manipulation for later use with other programs, i.e., a workflow something like this:read data sets from a disk,modify the data, andwrite it back to a disk.All fine, but of data set is really big, then you will soon stumble on ...

Read more »

Parse arguments of an R script

July 2, 2013
By

R can be used also as a scripting tool. We just need to add shebang in the first line of a file (script):#!/usr/bin/Rscriptand then the R code should follow.Often we want to pass arguments to such a script, which can be collected in the script by the c...

Read more »

2 min HOWTO in R

June 6, 2012
By

Lots of short videos on how to do several things in R.

Read more »

Small pedigree based mixed model example

April 8, 2012
By

Pedigree based mixed models (often called animal models, due to modelling animal performance) are the cornerstone of animal breeding and quantitative genetics. There are many programs that can be used for analyzing your data with these models, e.g., ASREML, BLUPf90, MATVEC, MiXBLUP & MiX99,  SurvivalKit, PEST/VCE, WOMBAT, ...). There are also R packages you...

Read more »

Regression – covariate adjustment

April 3, 2012
By

Linear regression is one of the key concepts in statistics . However, people are often confuse the meaning of parameters of linear regression - the intercept tells us the average value of y at x=0, while the slope tells us how m...

Read more »

GBLUP example in R

March 30, 2012
By

Shirin Amiri was asking about GBLUP (genomic BLUP) and based on her example I set up the following R script to show how GBLUP works. Note that this is the so called marker model, where we estimate allele substitution effects of the markers and not individual based model, where genomic breeding values are inferred directly. The code:library(package="MatrixModels") dat <- data.frame(...

Read more »

Polyploidy in sugarcane

September 28, 2011
By

While reading UseR conference abstracts I came across this sentence: "Sugarcane is polypoid, i.e., has 8 to 14 copies of every chromosome, with individual alleles in varying numbers." Vau! This generates really complex genotype system. Say we have biallelic gene with alleles being A and B. In diploids the possible genotypes are AA, AB, and BB. Given the...

Read more »

Setup up the inverse of additive relationship matrix in R

August 11, 2011
By
Setup up the inverse of additive relationship matrix in R

Additive genetic covariance between individuals is one of the key concepts in (quantitative) genetics. When doing the prediction of additive genetic values for pedigree members, we need the inverse of the so called numerator relationship matr...

Read more »

gRain: genetics example

April 14, 2011
By
gRain: genetics example

gRain is an R package for "probability propagation in graphical independence networks, also known as probabilistic expert systems (which includes Bayesian networks as a special case)". This package caught my attention because some genetic models can b...

Read more »

gRain: genetics example

April 14, 2011
By
gRain: genetics example

gRain is an R package for "probability propagation in graphical independence networks, also known as probabilistic expert systems (which includes Bayesian networks as a special case)". This package caught my attention because some genetic models can b...

Read more »