Question: Weir And Cockerham Fst from PLINK(bed/bim/fam) input files
1
gravatar for kautilya
4.2 years ago by
kautilya370
United States
kautilya370 wrote:

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?

 

plink fst gwas • 3.9k views
ADD COMMENTlink modified 2.3 years ago by Myosotis197910 • written 4.2 years ago by kautilya370

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"

ADD REPLYlink written 4.2 years ago by zx87545.0k
1

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.

ADD REPLYlink written 4.2 years ago by kautilya370
5
gravatar for chrchang523
4.2 years ago by
chrchang5233.9k
United States
chrchang5233.9k wrote:

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.)

ADD COMMENTlink written 4.2 years ago by chrchang5233.9k

This is a comment, not an answer.

ADD REPLYlink written 4.2 years ago by zx87545.0k

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

ADD REPLYlink written 4.2 years ago by kautilya370
1

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.

ADD REPLYlink written 4.2 years ago by chrchang5233.9k
1

Great. Thanks. Eagerly Looking forward to this release

ADD REPLYlink written 4.2 years ago by kautilya370
3

Now implemented as --fst (or "--fst case-control" if your subpopulations are defined by case/control status).

ADD REPLYlink written 4.2 years ago by chrchang5233.9k
1

Thanks a lot. Tried --fst case-control works really well. Great ease of use.

ADD REPLYlink written 4.2 years ago by kautilya370

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!

ADD REPLYlink written 3.8 years ago by arslanzaidipsu0

Use --within to load a file defining your subpopulations.

ADD REPLYlink written 3.8 years ago by chrchang5233.9k

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.

ADD REPLYlink written 3.8 years ago by arslanzaidipsu0
1

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.

ADD REPLYlink written 3.8 years ago by chrchang5233.9k

Please how are the data formatted in subpopulation file ? Thanks...

ADD REPLYlink written 2.3 years ago by Myosotis197910

Hi, it's a three column file, first two of the fam file plus a third one with the clusters (you can repeat the first column here or put whatever you need).

ADD REPLYlink modified 19 months ago • written 19 months ago by Simo30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 672 users visited in the last hour