Hello

Dne Po 10. června 2013 14:26:41 jste napsal(a):
> Hello, 
> 
> dist.genpop is a re-implementation of dist.genet - all material for genetics
> in ade4 should be deprecated by now, as it has been transfered into
> adegenet or adephylo a few years ago already.

OK, I see. So can I use dist.genpop() also for genind objects?

> I do not know about a package implementing Goldstein's distance. 
> 
> As for your question, you are right: adding a constant to a set of distances
> to make them Euclidean alters the geometry of the cloud of points, and is
> thus not very satisfying. This said, especially when it comes to individual
> microsatellite data, I have yet to see a fancy distance do more than the
> basic Euclidean distance in a PCoA, which in this case is also a PCA. The
> advantage of PCA is that it will also give you allele loadings which can be
> biologically meaningful. Not to say you should stick to it, but it is
> probably a good start to look at your data.

PCA and PCoA using distance generated by dist() give me more or less same 
results. I really wonder how this problem was solved in old Syntax (Podani, 
2000), which was calculating PCA/PCoA from any distance. ;-)
For now I don't see any enough good solution, but I at least understand it 
more. :-)

> Cheers
> Thibaut

Have a nice day,
Vojtěch

> ________________________________________
> From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org]
> on behalf of Vojtěch Zeisek [vojtech.zei...@opensuse.org]
> Sent: 10 June
> 2013 14:59
> To: r-sig-phylo@r-project.org
> Subject: Re: [R-sig-phylo] PCoA with custom distance matrix
> 
> Hello,
> thank You very much for Your reply. I'm sftill little confused.
> 
> Dne Pá 7. června 2013 16:03:13 jste napsal(a):
> 
> > Hello there,
> >
> >
> >
> > you could have done the PCoA on Chord's distance using adegenet, it would
> > have probably been simpler (see the vignette adegenet-basics, section 6
> > "Multivariate Analysis“).
> 
> 
> Function dist.genpop() contains Nei's distance, but man pages says it is
> only for genpop objects (I wish to analyse individuals, not populations).
> I imported the data using read.loci() and converted it to genind using
> loci2genind(). I found also function dist.genet() from ade4 package, but it
> requires genet object. So far I didn't find straightforward way to convert
> my data to it. And I haven't find any function providing the Goldstein's
> distance. 
> 
> > 'dist' is the canonical Euclidean distance, but dudi.pco will accept any
> > Euclidean distance. You can use "cailliez" in ade4 to make your distance
> > Euclidean before the PCoA.
> 
> 
> I'm not mathematician, so I don't understand one point. Let's say I have
> non-Euclidean distance matrix and some individuals (e.g. from same
> population) have zero distance (they are identical). When I use cailliez(),
> I have two possibilities (parameter cor.zero):
> 1) to add the constant also to zero-length distances, so that the shift is
> everywhere same. But as the result, the distance between originally
> identical objects is positive, so they will be treated as different in
> ongoing analysis, right?; or
> 2) keep zero-length distances, so that those objects stay identical, but
> their distances from another objects change, so the further analysis are
> biased again, right?
> Is there any solution? Or am I wrong?
> 
> 
> > Cheers
> > Thibaut
> 
> 
> Sincerely,
> Vojtěch
> 
> 
> > --
> > ######################################
> > Dr Thibaut JOMBART
> > MRC Centre for Outbreak Analysis and Modelling
> > Department of Infectious Disease Epidemiology
> > Imperial College - School of Public Health
> > St Mary’s Campus
> > Norfolk Place
> > London W2 1PG
> > United Kingdom
> > Tel. : 0044 (0)20 7594 3658
> > t.jomb...@imperial.ac.uk
> > http://sites.google.com/site/thibautjombart/
> > http://adegenet.r-forge.r-project.org/
> > ________________________________________
> > From: r-sig-phylo-boun...@r-project.org
> > [r-sig-phylo-boun...@r-project.org]
> > on behalf of Vojtěch Zeisek
> > [vojtech.zei...@opensuse.org]
> > Sent: 07 June
> > 2013 15:46
> > To: mailinglist R
> > Subject: [R-sig-phylo] PCoA with custom distance matrix
> >
> >
> >
> > Hello,
> > I have microsatellite data and I would like to analyze them using PCoA in
> > R. I would like to use following genetic distance: Goldstein's (1995)
> > (dμ)2 and Nei's chord distance (1983). I calculated those distances in
> > MSA (Dieringer and Schlötterer 2003), because I didn't find any
> > possibility to calculate them in R. I imported the distances like that:
> > dist.dms <- read.csv("dms_ind.txt", header=TRUE, sep="\t", dec=".",
> > row.names=1)
> > dioszegia.dist.dms <- as.dist(dioszegia.dist.dms)
> > class(dioszegia.dist.dms)
> > [1] "dist“
> > dms_ind.txt is ordinary square matrix with diagonal.
> > But using of dudi.pco() from ade4 package fails:
> > pcoa <- dudi.pco(dist.dms, scannf=FALSE, nf=3)
> > Warning message:
> > In dudi.pco(dioszegia.dist.dms, scannf = FALSE, nf = 3) :
> > 
> >   Non euclidean distance
> > 
> > When using Euclidean distance (function dist()), it works fine. It
> > produces some results despite the above error, but the results are very
> > far from those I get using dist() function. And the results don't look
> > realistic. What do I do wrong? :-)
> > Have a nice day!
> > Vojtěch
-- 
Vojtěch Zeisek

Komunita openSUSE GNU/Linuxu
Community of the openSUSE GNU/Linux

http://www.opensuse.org/
http://trapa.cz/

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to