famuvie / breedR

Statistical methods for forest genetic resources analysts
http://famuvie.github.io/breedR/
GNU General Public License v3.0
31 stars 24 forks source link

Estimate the competition breeding values with a genomic relationship matrix. #114

Closed mtiret closed 2 years ago

mtiret commented 2 years ago

Hello, is it possible to run the competition model with a genomic relationship matrix (GRM) instead of specifying the pedigree? Up until now, I have used the generic function to specify the GRM, but I do not see how I can mix it with the competition model - within the genetic section, which requires a pedigree. Any workaround?

Thanks in advance,

Mathieu Tiret

famuvie commented 2 years ago

Dear Mathieu,

This is currently not possible in breedR as it is.

In principle, you could hack your way around by fitting a regular competition model using a fake pedigree, replacing the additive-relationship matrix by your custom GRM in the internal breedR object and re-fitting the object again using internal functions.

The problem is that it gets very messy with the indices of the observations. You need to make sure that the ordering of the "effects" corresponding to the rows/cols of your GRM matches with the indicator matrices of the competition model. Specially because in the genetic competition model some non-observed effects are added internally for the founders, and also because the indices might get reordered depending on the pedigree.

So, while possible, it's delicate and potentially error-prone. I would not recommend doing it manually, without careful testing.

Hope it helps. ƒacu.-

mtiret commented 2 years ago

Ok thank you for your feedback! I will try dig into the code. Best,