Calculate q1 quality score. q1 is a measure of the fit of selfit. It is based on Pvalue and the fraction of valid F1 scores. If either is below their threshold the q1 value is 0. Also, if bestParentfit is different from bestfit this indicates a segregation distortion.
calc_q1(Pvalue, fracInvalid, bestfit, bestParentfit, Pvalue_threshold,
fracInvalid_threshold)
P-value of bestParentfit segtype
Fraction invalid scores of bestParentfit segtype
segtype of best fit of population
segtype of best fit of parents
Threshold P-value of bestParentfit segtype
a maximum threshold for the fracInvalid of the bestParentfit segtype (with a larger fraction of invalid dosages in the F1 the q1 quality parameter will be set to 0)