[adegenet-forum] Regarding genetic distance of genind object
Jombart, Thibaut
t.jombart at imperial.ac.uk
Wed Apr 11 11:44:51 CEST 2012
Hello,
there is an example of this in the vignette 'adegenet-basics', p.22-23. Basically you want to use:
D <- dist(truenames(yourGenindObject))
tre <- nj(D) # or another clustering algo, see ?hclust
As for the options you mentioned:
- avoid dist(genind) as it would rely on an implicit 'as.matrix' in dist
- distances in dist.genpop are defined for populations, so not available for individual-level data
- dist.genet is deprecated as is everything concerning genetics in ade4 - one day we'll actually put a 'deprecated' message there, but ade4 is a big beast that moves slowly.
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 Roy Francis Mathew [RoyFrancis.Mathew at agrsci.dk]
Sent: 09 April 2012 10:47
To: 'adegenet-forum at lists.r-forge.r-project.org'
Subject: [adegenet-forum] Regarding genetic distance of genind object
Hi,
I was wondering how to take the genetic distance of a genind object to create individual level cladograms.
* dist(genind) works, but no options to choose Nei/Reynold/Edward etc.
* dist.genpop(genpop) has all the options but works only with genpop objects.
* dist.genet() from ade4 works only with genet objects.
Kind regards
Roy Mathew Francis
Ph.D. Fellow
Dept. of Agroecology
Aarhus University
Forsøgsvej 1
DK-4200 Slagelse
Tel.: +45 8715 8131
Email: RoyFrancis.Mathew at agrsci.dk
Tel.: +45 8715 6000
Web: www.agrsci.au.dk
[Logo]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 9975 bytes
Desc: image001.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120411/cb84ca1e/attachment.jpg>
More information about the adegenet-forum
mailing list