Computing Fst For Snp Data In 0,1,2 Format?
1
2
Entering edit mode
11.0 years ago

Hi,

Does anyone know of software that computes Fst values from SNP data encoded as 0, 1, 2, i.e., 0==AA, 1==Aa, 2==aa?

Thanks,
D.

snps fst • 3.4k views
ADD COMMENT
1
Entering edit mode

I know that the Pegas package calculates Fst. With some minor file formatting you could use it.

I would also suggest trying to write your own. Fst is pretty easy to implement and worth it.

ADD REPLY
2
Entering edit mode
11.0 years ago
dfornika ★ 1.1k

It looks like the basic.stats function from the hierfstat R package will calculate Fst.

You may need to convert the integers to factors using the factors function. eg:

> data = c(1,2,2,0,1,2,0,0,1,2,0,0,1)
> fdata = factor(data)
> fdata
 [1] 1 2 2 0 1 2 0 0 1 2 0 0 1
Levels: 0 1 2
ADD COMMENT
0
Entering edit mode

I'm trying to achieve the same and followed your recommendations but it seems like hierfstat only allows 1 and 2 values as input and they are integers not factors in the example given.

ADD REPLY

Login before adding your answer.

Traffic: 2664 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6