brentp / slivar

genetic variant expressions, annotation, and filtering for great good.
MIT License
247 stars 23 forks source link

function trio_denovo #150

Open fromtotw opened 1 year ago

fromtotw commented 1 year ago

function trio_denovo(kid, dad, mom) { // alts are 0:hom_ref, 1:het, 2:hom_alt, -1:unknown if(!(kid.alts == 1 && mom.alts == 0 && dad.alts == 0)){ return false} // sufficient depth in all if(kid.DP < 7 || mom.DP < 7 || dad.DP < 7) { return false; } // no evidence for alternate in the parents if((mom.AD[1] + dad.AD[1]) > 0) { return false; } // check the kid's allele balance. if(kid.AB < 0.2 || kid.AB > 0.8) { return false; } return true }

Could you please tell me why here is not checked to see if the kid has a heterozygous genotype (alts == 1) and both parents have a homozygous alt reference genotype (alts == 2)

// 0:hom_ref, 1:het, 2:hom_alt, -1:unknown

function trio_autosomal_recessive(kid, dad, mom) { return kid.affected && kid.alts == 2 && mom.alts == 1 && dad.alts == 1 && hiqual(kid, dad, mom) }

The code only assuming 1,1 as recessive (alts = 2) , alts = 0,0 is the dominant Could you please tell me why here is considering both 0 and 1 could be a dominant

brentp commented 1 year ago

hi, good questions. Feel free to create your own, more flexible definitions. These are sensible starting points. Indeed they do not find all mendelian violations, they are focused on finding variants that are likely relevant to rare-disease.