This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Use plink filter --geno on cases and controls separately, within current analysis

Hello

I'm using plink/1.9b5. I am filtering my dataset with --geno 0.2, but I would like to filter both cases and controls separately and keep all variants in the same output file.

I've tried the --filter-cases/--filter-controls, but as the definition of this filter says, it causes only cases/controls to be included in the current analysis. Is there a way to filter cases and controls separately while having just one output?

Thank you in advance

--geno plink cases controls

1 answer

plink --bfile ... --geno 0.2 --filter-cases --write-snplist --out case_geno_filtered

plink --bfile ... --extract case_geno_filtered.snplist --geno 0.2 --filter-controls --write-snplist --out final

plink --bfile ... --extract final.snplist --make-bed

It worked just fine. Thank you for the help!

Log in to answer this question.