This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Phenotype and Genotype

Hello:

I have genotyped some samples (n=500), for those samples I have cholesterol absorption markers (phenotypes). How can I link the genotype to the phenotype? Note: genotype has been performed using PMRA array. (My interest, is only to test specific SNPs of some selected genes)

Thanks,

snp

1 answer

Hello, you can perform a binary logistic regression, as follows:

glm(genotype ~ phenotype, data = data, family = logit(link = 'binomial'))

...or a linear regression:

lm(phenotype ~ genotype, data = data)

I trust that you are capable of researching further these methods and functions on your own. The code syntax that I have posted is for R Programming Language.

Kevin

Dear Kevin,

Thank you for your reply. I have another question. We have used the command that you provided of linear regression, and this was the outcome:

![https://ibb.co/FYmk9wQ][1] My question now: How could I create a loop, to perform the command for many SNPs? The SNP can have three levels [AA, AB, BB]. In the model, we also want to adjust for the number of studies (N=5) and sex, also we want to include the gender as an independent. The program needs to go one column to the right in every new loop but keep the same variable (campesterol)?

Thank you in advance

Log in to answer this question.