choishingwan / PRS-Tutorial

A tutorial on how to run basic polygenic risk score analysis
MIT License
68 stars 104 forks source link

fam order dependency on chromosomes #37

Closed fmadani closed 2 years ago

fmadani commented 2 years ago

Hi @privefl, In the chromosome based LD matrix calculation, " it is commented that: # We assume the fam order is the same across different chromosomes". On the other hand, fam order code is in the for loop of chromosomes while fam.order variable can be calculated independently out of the loop. When fam.order is in the loop, the final value of fam.order is based upon chromosome 22. Would you clarify if my understanding is true and we can move the "fam order code "out of the loop and apply only one of the chromosomes (or even the whole of genome) to achieve fam.order.

FYI: fam order code fam.order <- as.data.table(obj.bigSNP$fam)