[adegenet-forum] Different outcomes using dapc(x, grp$grp) and dapc(x)

Markus Ruhsam M.Ruhsam at rbge.ac.uk
Mon Jan 16 15:35:24 CET 2017


Hello,

I followed the DAPC tutorial and produced a scatter plot using the following commands

> rul<-read.structure("1548SNPsQ60_427_scc30_sec10_nuclear_195ampl.str",missing=-9,quiet=FALSE)

> grp <- find.clusters(rul, max.n.clust=10, n.start=200)
Choose the number PCs to retain (>=1):
400
Choose the number of clusters (>=2:
4
> dapcgrp1 <- dapc(rul, grp$grp)
Choose the number PCs to retain (>=1):
15
Choose the number discriminant functions to retain (>=1):
3
> scatter(dapcgrp1, scree.da=FALSE, solid=1)



[cid:image004.jpg at 01D27005.C5EFCC20]


If I do the same thing without the find.clusters step using the following commands I get quite a different scatter plot


> dapc1 <- dapc(rul)

Choose the number PCs to retain (>=1):

15

Choose the number discriminant functions to retain (>=1):

3

> scatter(dapc1, scree.da=FALSE, solid=1)

[cid:image006.jpg at 01D27005.C5EFCC20]

Although the two plots look somehow similar, the contents and overlap of the groups is different. For example, none of the samples in 'Group 2' (dapc(x, grp$grp)) are in 'hispanica' (dapc(x)) - Group 2 and hispanica are the two small outlier groups occupying the 'same' space in the two DAPC analyses. Looking at the inferred/original table it's obvious that with dapc(x, grp$grp) samples in my predefined 'hispanica' group are put together with other samples into group 3 (where most of my 'non-native' samples fall), whereas with dapc(x) they more or less are in their own group (which makes biological sense).


[cid:image009.jpg at 01D27005.C5EFCC20]
dapc(x, grp$grp)




[cid:image013.jpg at 01D27005.C5EFCC20]
dapc(x)


This raises the question why the two analyses of the same data set produce rather different results and which one should 'believe'? Any help or ideas are appreciated.

Thank you

Markus



Dr Markus Ruhsam
Molecular Plant Ecologist
Royal Botanic Garden Edinburgh
20A Inverleith Row
Edinburgh
EH3 5LR
United Kingdom

Tel: +44 (0) 131 248 2859
Fax: +44 (0) 131 248 2901

http://www.rbge.org.uk/science/genetics-and-conservation/markus-ruhsam-homepage

The mission of the Royal Botanic Garden Edinburgh is to "To explore, conserve and explain the world of plants for a better future"


[cid:image001.png at 01D26FFF.59E41870]

The Royal Botanic Garden Edinburgh is a charity registered in Scotland (No SC007983)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 31595 bytes
Desc: image001.png
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 21309 bytes
Desc: image004.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 28274 bytes
Desc: image006.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.jpg
Type: image/jpeg
Size: 12536 bytes
Desc: image009.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image013.jpg
Type: image/jpeg
Size: 12370 bytes
Desc: image013.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170116/7679cb70/attachment-0007.jpg>


More information about the adegenet-forum mailing list