Question: Calculate Fst to draw Manhattan plot
1
gravatar for mostafarafiepour
7 months ago by
mostafarafiepour60 wrote:

Hi All,

I trying to calculate Fst. In the first step, I used the following script to calculate Fst with window 100 kb

./vcftools --vcf input_data.vcf --weir-fst-pop population_1.txt --weir-fst-pop population_2.txt --fst-window-size 100000 --fst-window-step 50000 --out pop1_vs_pop2

But in the next step, I do not know how to convert the output file to z-transform? Because before plotting the plot using the Manhattan package in R, z-transform must be performed.

Best Regard

Mostafa

snp R • 558 views
ADD COMMENTlink modified 7 months ago by RamRS21k • written 7 months ago by mostafarafiepour60

Maybe this link is relevant, http://membres-timc.imag.fr/Olivier.Francois/LEA/files/LEA_snmf.html

Next, we convert the FSTFST values into absolute values of zz-scores.

#convert fst values into z-scores (absolute values) 
n = dim(Q(obj.snmf, K = 2))[1]
fst.values[fst.values<0] = 0.000001
K = 2
z.scores = sqrt(fst.values*(n-K)/(1-fst.values))
ADD REPLYlink written 7 months ago by zx87547.1k

many thanks for your reply,

This is the output of the Fst stage:

enter image description here

I do not know exactly which of these columns should be z-transformed and how?

ADD REPLYlink written 7 months ago by mostafarafiepour60
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: 932 users visited in the last hour