Thanks for your replies.<div><br></div><div>I tried removing 'ret' and using it as a population factor in AMOVA and the group differentiation is not significant. Similarly, removing it and using it as a population identifier in a PCA produces a plot absent of structure. Using scaleGen on the genind object prior to the pca provides a different picture. There is not much structure there. There is a small cluster that all share the same 'ret' type. </div>
<div><br></div><div>Thanks for your time.</div><div><br></div><div>Vinson<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 11:30 AM, Jombart, Thibaut <span dir="ltr"><<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
it seems you have merged the data correctly together. So your results indicate that the marker 'ret' does contain some group structure as you mentioned.<br>
<br>
You could cross-validate these results using different approaches. One is using an AMOVA using 'ret' as a factor, I expect that the group differentiation will be significant. See function 'amova' in pegas (if I remember well).<br>
<br>
Another option (not as satisfying, but quick) is to look for two clusters using find.clusters, and compare the obtained clusters to 'ret' (as a factor). This can be done using 'table( first_group, secondgroup).<br>
<br>
Cheers<br>
<br>
Thibaut<br>
<br>
<br>
________________________________________<br>
From: <a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org">adegenet-forum-bounces@lists.r-forge.r-project.org</a> [<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org">adegenet-forum-bounces@lists.r-forge.r-project.org</a>] on behalf of Vinson Doyle [<a href="mailto:sonofvin@gmail.com">sonofvin@gmail.com</a>]<br>
Sent: 12 June 2012 19:28<br>
To: <a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br>
Subject: [adegenet-forum] combining data<br>
<div class="HOEnZb"><div class="h5"><br>
Dear Thibaut,<br>
<br>
I have a situation with which I am bit confused. I have 8 microsatellite loci<br>
typed for a haploid organism. I also have a retrotransposon-based marker<br>
allowing me to recognize two different types of individuals in the populations.<br>
If I code these two states with 3-digit codes "100" and "200" so as to combine them<br>
with the microsatellite alleles, I use read.table to import the data:<br>
<br>
>A<-read.table("populations.tab")<br>
>A[1:5]<br>
Ret L10D10 L14F4 L2C1 LB5B4 LC192 LC2090 LC4168 LF9 Pop<br>
103-M 200 278 325 217 366 305 349 220 284 M<br>
105-M 100 276 321 217 366 286 349 220 284 M<br>
108-M 200 278 321 215 366 286 349 220 284 M<br>
1414-M 200 276 321 215 366 311 366 220 284 M<br>
540-M 100 278 321 215 366 305 349 220 286 M<br>
<br>
<br>
I convert this to a genind object and perform a PCA:<br>
<br>
>NineLocusRegion<-df2genind(A[,-10], sep=NULL, ncode=3, pop=as.factor(A[,10]),ploidy=1, type="codom")<br>
<br>
>obj <- na.replace(NineLocusRegion, method = "mean")<br>
>pca1<-dudi.pca(obj$tab,cent=TRUE,scale=FALSE,scannf=FALSE, nf=3)<br>
>barplot(pca1$eig[1:50],main="Eigenvalues")<br>
>s.class(pca1$li,obj$pop,lab=obj$pop.names,sub="PCA1-2", csub=2)<br>
>title("PCA of Regional Data\naxes 1-2")<br>
>add.scatter.eig(pca1$eig[1:20],nf=3,xax=1,yax=2,posi="bottom")<br>
<br>
> truenames(obj)$tab[1:5,1:10]<br>
Ret.100 Ret.200 L10D10.233 L10D10.235 L10D10.241 L10D10.243 L10D10.249 L10D10.251 L10D10.274 L10D10.276<br>
103-M 0 1 0 0 0 0 0 0 0 0<br>
105-M 1 0 0 0 0 0 0 0 0 1<br>
108-M 0 1 0 0 0 0 0 0 0 0<br>
1414-M 0 1 0 0 0 0 0 0 0 1<br>
540-M 1 0 0 0 0 0 0 0 0 0<br>
<br>
<br>
The points on the plot do not cluster by population as expected. However, they do seem to cluster on the plot by 1st column; the retrotransposon marker. I figured this out using locator(). Confirmed by the fact that there is no clustering when this marker is removed.<br>
<br>
Is there a problem with combining these data in adegenet for PCA or any other analyses?<br>
<br>
Thanks,<br>
V<br>
</div></div></blockquote></div><br></div>