Rewrite to mendelian error function

Updated tests to include missingness checks