Fst from 012 genotype matrix
0
0
Entering edit mode
9.1 years ago
Jautis ▴ 580

Hi, I'm trying to calculate Fst between populations in R and I am wondering if there is a way to do so from a 012 genotype matrix with missing data (0 being homozygous reference; 2 being homozygous alternate, NA for missing).

I have tried running functions in the R package hierfstat, but get an error message saying there is a non-numeric binary operator.

Any suggestions? Thanks in advance!

Fst Genotype • 2.4k views
ADD COMMENT
0
Entering edit mode

Hi,

Have you checked that your matrix (or data.frame) is really "numeric"?

And regarding NAs, why not just remove them?

ADD REPLY
0
Entering edit mode

Yes, the data frame is actually numeric. It is comprised entirely of 0, 1, 2, and NA. I can't just remove the NAs because every site has at least some individuals called, but none have all individuals called. The NAs occur because this is low coverage sequencing.

ADD REPLY

Login before adding your answer.

Traffic: 2887 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