brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inference questions

solcos opened this issue · comments

Hello,

I've been testing somalier for relatedness and also sex inference.

I have some questions regarding sex and relatedness.

  1. Sex inference:
    I've noticed that in some samples, the results for sex inference follow the formulas in (#125)
    but the result is not 'translated' in the sex column (inferred sex) of the somalier.samples file.

e.g.
sex phenotype X_depth_mean X_het X_hom_alt
-1 unknown 17.45 1 162

and the formula is --> if stats[i].x_het / stats[i].x_hom_alt < 0.05 and stats[i].x_dp.n > 10:

The results should be male, am I correct?
The 'x_dp.n' variable is the 'X_depth_mean' in the samples.tsv?
Or do you take into account other parameters?


  1. Relatedness

Regarding relatedness, I've noticed that in "https://github.com/brentp/somalier/wiki/pedigree-inference" to infer the relationships of the samples, you need a minimum of 3 samples "a trio", have relatedness value between 0.4 and 0.6 to $sample, have IBS0 / IBS2 < 0.005 to $sample, and also that the parents can't have a relatedness higher than 0.06.

Why the 0.06 is needed?

Thanks in advance!

Arnau