suchestoncampbelllab / gwasurvivr

GWAS Survival Package in R
11 stars 12 forks source link

On which allele the HR is calculated, depending on the flip.dosage option? #23

Open antgiord opened 2 years ago

antgiord commented 2 years ago

Hello. Could you please clarify what exactly the flip.dosage=TRUE/FALSE does, when using the plinkCoxSurv function? Apparently the flip.dosage is used to flip the allele, but it's not specified in the documentation if you are going to flip from A1 to A0 or from A0 to A1, or if the frequencies of the alleles are considered, independent of what is set to be A1/A0 in your bed files.

Thanks

sheshen22 commented 9 months ago

A0 is designated as the minor allele, and A1 is the major allele; their designations do not change with the setting of flip.dosage to TRUE or FALSE. When flip.dosage is set to TRUE, the term 'exp_freq_A1' in the output file denotes the frequency of the major allele A1. Conversely, when flip.dosage is set to FALSE, 'exp_freq_A1' in the output file indicates the frequency of the minor allele A0. In the output file, 'SAMP_MAF' consistently represents the frequency of the minor allele A0, regardless of the flip.dosage setting.

sheshen22 commented 9 months ago

Flip.dosage=TRUE, and HR is A1:A0, which represents the counting effect of A1; Flip.dosage=FALSE, and HR is A0:A1, which represents the counting effect of A0.

gradsmjin814 commented 3 months ago

when I tested with my data some SNPs that have highly similar AF between major and minor allele, have different SAMP_MAF and exp_freq_f1 even if flipDosage=F, due to probably software not being able to discern which one is higher AF accurately between the two AFs resulting in different values between SAMP_MAF and exp_freq_f1. SAMP MAF here are are all 0.49 above