[adegenet-forum] DNAbin object from genind
Jombart, Thibaut
t.jombart at imperial.ac.uk
Thu Dec 13 00:20:12 CET 2012
Hello,
sorry, I missed the point the first time. You need the original data if you want to perform this test, as it requires computing the average genetic distance between sequences. The best is this to use read.dna (ape) to read original sequences into a DNAbin.
However, the DNAbin class only handles single sequences per individual, so I'm afraid diploid data will be a problem.
Cheers
Thibaut
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Katalin Csillery [kati.csillery at gmail.com]
Sent: 12 December 2012 19:57
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] DNAbin object from genind
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
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
More information about the adegenet-forum
mailing list