Using another GRM as input for gl.grm.network

29 views
Skip to first unread message

weedy

unread,
Jul 2, 2025, 6:13:32 PMJul 2
to dartR
Hi Luis,
Because of the presence of clones, inbreeding, and structure in my population, the matrix from gl.grm generates some unusual values (values less than 1 on the diagonal and negative off-diagonals). Therefore I have instead used a matrix generated from EMIBD9 using Wang's 2022 kinship estimator which is designed for small samples and inbred populations. But I would still like to generate the gl.grm.network to visualise clones. This works with the Wang GRM as input, but I am concerned that the values on the network are incorrect because the values in the GRM I have used are different (e.g. values on the diagonals are f rather than 1+f, off-diagonals are kinship rather than two times the kinship). I tried editing my GRM to be in line with that generated by gl.grm by adding one to the diagonals and multiplying the off-diagonals by two to get two times the kinship coefficient, but I don't think I have done this correctly as it produced a weird network with no links at all and negative values. 
So my questions are:
1) Would gl.grm.network still produce a correct network even if I use my matrix from gl.grm with weird values? i.e. is it all relative anyway?
2) If not, can another GRM be used as input into gl.grm.network, and if yes does this need to be edited to be compatible?
3) What would I need to edit in the GRM from EMIBD9 to make it compatible? My attempt obviously wasn't correct.
Thank you so much for your help,
Sarah

Bernd.Gruber

unread,
Jul 2, 2025, 6:32:34 PMJul 2
to da...@googlegroups.com, dartR
Hi Sarah
my answers below

1) no the network will be wrong. The problem is that for relatedness (and kinship) allele frequencies are used. If those are calculated from a biased sample of a population the relatedness values will be off
2) yes that is possible
3) out of my head please check

Diagonals form emibd9 *2 -1 =f
Off diagonals 2*emibd

This should give a relatedness matrix. Admittedly you should be able to use the emibd9 matrix directly and create a network based on kinship if you just want to use it to show groups. That should be fine

Cheers Bernd
---------


On 3 Jul 2025, at 08:13, weedy <sarahj...@gmail.com> wrote:

Hi Luis,
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/8dd217a2-569a-44a4-a009-de7b8be3bf83n%40googlegroups.com.
Message has been deleted

weedy

unread,
Jul 6, 2025, 8:09:40 PMJul 6
to dartR
Thank you so much for your help! I think that is working.
Reply all
Reply to author
Forward
0 new messages