This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is there a way to get a list of all homogygous sites for each sample with plink (regardless if they are in a run)

With plink I understand that you get runs of homogygosity with --homozyg, but I would like to a list of all sites that are homozygous for each sample. Is there any way to do this?

plink

2 answers

You can run like this-

plink --file your_data --homozyg --homozyg-group

Please check the Runs of homozygosity in the link below-

https://zzz.bwh.harvard.edu/plink/ibdibs.shtml#homo

I am a bit confused though, I am looking for a list of all sitse that are homozygous for A1 regardless of whether they are in a run of homozygosity. If I understand correctly that command gives me a file plink.hom.overlap that provides information on overlapping ROHs. Is there some way I can parse plink.hom.overlap to get what I need, I can't quite see how.

Please keep reading down the documentation listed above.

For one sample, a simple way to do this is to filter for minor-allele-count <= 0:

plink2 --bfile ... --indv <sample ID> --max-mac 0 --write-snplist

For many samples, you can use a shell-script for-loop, or plink2's --loop-cats flag. (Given a choice, I recommend learning about shell-script for-loops first, since they have many other applications.)

Log in to answer this question.