[adegenet-forum] DNAbin object from genind
Katalin Csillery
kati.csillery at gmail.com
Wed Dec 12 20:57:44 CET 2012
Hello there,
df <- data.frame(locusA=c("aa","at","tt","tt"),
locusB=c(NA,"tt","tt","at"),locusC=c("cc","cg","cc","cc"))
row.names(df) <- .genlab("genotype",4)
Let's assume that 'df' is my SNP genotypes. The length of my original
DNA sequences was 200 bp, but I had only the 3 SNPs.
The problem: I would like to make a DNAbin object to be able to use
e.g. tajima.test() from pegas and other functions.
Any elegant way already implemented or I have to write my own code
with dummy columns for the non-segregating sites?
Any ideas are welcome!
Kati
--
Katalin Csilléry
INRA URFM, UR 629, Domaine Saint Paul, Site Agroparc
84914 Avignon Cedex 9, France
Tel +33 (0)4 32 72 29 98
Fax +33 (0)4 32 72 29 02
More information about the adegenet-forum
mailing list