From character to numeric pedigrees

In quantitative genetic analyses we often use a pedigree to represent the relatedness between individuals, so this is accounted in the analyses, because the observations are not independent of each other. Often this pedigree contains alphanumeric labels, and most software can cope with that.

Sometimes, though, we want to use numeric identities because we would like to make the data available to third parties (other researchers, publication), and there is commercial sensitivity about them. Or just want to use a piece of software that can’t deal with character identities.

Last night put together an El quicko* function to numberify identities, which returns a list with a numeric version of the pedigree and a key to then go back to the old identities.

* It could be generalized to extract the names of the 3 fields, etc.

1 Comment

Good evening, I am trying to use this on a pedigree that requires five columns to be changed to numeric (Animal_Num, Animal_ID, Sire, Dam, and Animal_Name). Note that Animal_Num, Animal_ID, and Animal_Name are all the same value. For some reason when I attempt to use this, R tells me that mutate cannot be applied to an object that contains a list. Strangely, it worked for me when I had only three columns. Can this command Only be used to convert three fields, or can it be expanded?

Leave a Reply to Shauneen ONeill Cancel reply