Home > Agriculture, Funny science, R > More on polled

## More on polled

I’ve collected so far 23 answers to my little survey (by the way, a great “thank you” to all of you who answered). Just to remind to those of you who haven’t bet yet, why being polled and red carrier could be of interest for a breeder, here comes some R code. First you ‘ll have to download French’s holsteinĀ  gEBV here. Then start R in a terminal.

```#Find file name (I suppose the file is unique and in the directory)
File=dir(pattern="export_genomiques_")

#Polled genotype===================================
#create a vector of status "pp=>Normal,Pp=>heterozygous polled,PP=>Homozygous polled"
PO=rep("pp",dim(gEBV)[1])
#Identify heterozygous polled with grep applied to the name of the sire
PO[gEBV\$NOTAUR[grep(" P | P\$",gEBV\$NOTAUR,perl=TRUE)]]="Pp"
#Identify homozygous polled
PO[gEBV\$NOTAUR[grep(" PP | PP\$",gEBV\$NOTAUR,perl=TRUE)]]="PP"
#Draw a boxplot
boxplot(gEBV\$X0 ~ PO ,col="blue")
for(i in 1:3){text(i,0.95*max(gEBV\$X0),paste("N= ",table(PO)[i]))}

#=Now the Red factor================================
RF=rep("rr",dim(gEBV)[1])
RF[gEBV\$NOTAUR[grep(" RF | RF\$",gEBV\$NOTAUR,perl=TRUE)]]="Rr"
RF[gEBV\$NOTAUR[grep(" RED | RED\$",gEBV\$NOTAUR,perl=TRUE)]]="RR"
#Draw a boxplot
boxplot(gEBV\$X0 ~ RF ,col="red")
for(i in 1:dim(table(RF))){text(i,0.95*max(gEBV\$X0),paste("N= ",table(RF)[i]))}
```

So for a given genotype, chances to be in the “Elite” will vary a lot. Iris and her brother have pedigree (gEBV) of 155. Their parents reliability is .7.

```mu=155 ; VarG=25 ; Rel=0.25*(0.7+0.7)
sigma=sqrt(1-Rel)*VarG
#Boxplot of gEBV depending on genotypes (in the actual sire population)
boxplot(gEBV\$X0 ~ RF + PO ,col="grey",main="gEBV according to genotype")
#Add E(EBV) and trace a 90IC area
abline(h=155,col="green")
polygon(x=c(0,0,10,10),y=c(155-(1.96*sigma),155+(1.96*sigma),155+(1.96*sigma),155-(1.96*sigma)),col=rgb(0,0.8,0.1,0.1))
```

So, we can clearly see that for Iris and her brother their career will mostly depend on the fact that they are red and polled carriers !