xiaolei-lab / SIMER

Data Simulation for Life Science and Breeding
Apache License 2.0
27 stars 8 forks source link

Modelling traits with different distributions #4

Closed m-hrachov closed 11 months ago

m-hrachov commented 1 year ago

Hi! I see I could model different underlying distributions of QTLs, but is it possible to model the trat that has gamma or beta (anything besides normal) distribution? Thank you.

Foredawnbio commented 11 months ago

Thank you for using Simer. You will get gamma or beta distubution follow these links: Generate phenotype controlled by QTNs subject to Gamma distribution; Generate phenotype controlled by QTNs subject to Beta distribution.

m-hrachov commented 11 months ago

Hi and thank you. The question is not answered. The phenotype is controlled by some non-normal distribution, but the distribution of phenotypic records stays normal all the time (i.e. barplot of phenotypic values). I am interested in modeling a trait that has non-normal phenotypic distribution (e.g. disease scores). Is there a way to do so?

Foredawnbio commented 11 months ago

Hi and I understand your question now. You know Y = G + E, where Y is phenotype, G is genetic value, and E is residual. There are 2 ways to simulate phenotype with a skew distribution: 1) sampling a small number of SNPs as QTNs with a skew distribution (the distribution of 0, 1, 2 is skew), and multiplied by the QTN effects with normal distribution to get a skew G; 2) keeping G normal, but sampling a skew residual E.

m-hrachov commented 11 months ago

Okay, thank you for your help! This works.