This is a comment, not an answer.
I want to calculate markerwise Weir And Cockerham Fst for certain differentiating markers. I have my data in PLINK(bed/bim/fam) format. I have scourged the internet for packages to calculate the fst but very few seem to support native plink format directly as an input.
There exists snpstats (bioconductor R package) but the method of calculation seems to be a non standard one.
Can anyone suggest an R package/software that can calculate Fst(preferebly Weir And Cockerham) from PLINK format data as input?
1 answer
How are your subpopulations defined? (I may just go ahead and add this to PLINK, but I first want to make sure that your subpopulations are defined in a PLINK-friendly manner.)
The subpopulations are defined by the values 0(unaffected) and 1(affected) in the phenotype column of the bim/ped file. No sure if this is what you had asked for. But it would be great if PLINK itself natively supports this calculation as this is a pretty frequently used statistic and will be a significant addition to the already great PLNIK 1.9
Okay, I'll try to add a --weir-fst flag next week (analogous to VCFtools --weir-fst-pop) which uses the set of cases as the subpopulation, and can be combined with --loop-assoc to operate on many subpopulations at once.
Great. Thanks. Eagerly Looking forward to this release
Hi, Didn't mean to hijack this post but I was wondering if there is a way to use --fst to calculate pairwise fst values for multiple populations? I tried --loop--assoc but it didn't work. Thanks!
Use --within to load a file defining your subpopulations.
I tried that. It gives one Fst value per SNP, so it's presumably calculating it over all subpopulations and not for all pairwise comparison (example headings given below):
SNP | Pop1 | Pop2 | Fst
Thank you.
Oops, missed the "pairwise" part of your remark. You will need to write a brief script with a double-for-loop for this; PLINK does not have that built-in.
Log in to answer this question.
Geneland seems to calculates Weir And Cockerham Fstat. Though you will have to convert plink files into matrix: "Diploid codominant genotype data. A matrix with one line per individual and 2 columns per locus"
Thanks for the reply. Geneland seems to be useful and i will try to give a shot to coverting the data into required format. Though it will be preferrable to have a tool which directly uses PLINK files since it seems to be pretty prevalent standard. I am pretty surprised by the scarcity of such tools.