[adegenet-forum] DAPC scatter plot and individual colour by population
Jombart, Thibaut
t.jombart at imperial.ac.uk
Fri Aug 8 11:55:57 CEST 2014
That would be bad practice, and quite misleading as well.
BTW we have no reason to know what's in your 'grp' object, so I dunno what the difference is between grp$pop and grp$grp
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 Nicolas Dussex [nicolas.dussex at gmail.com]
Sent: 08 August 2014 02:05
To: Emrah Coraman
Cc: adegenet-forum at lists.r-forge.r-project.org
Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population
I think I understand now. So I guess that in the following figure (http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650), they ran the analysis using grp$pop without the population ellipses and simply draw the clusters manually. At least that is how I understand it.
Thanks for your help!
Nic
On 8 August 2014 09:38, Emrah Coraman <coramane at gmail.com<mailto:coramane at gmail.com>> wrote:
Hi Nic,
That's what I thought as well.
But indeed you have to change the argument when using the scatter.dapc argument as Thimbaut pointed.
Best wishes,
Emrah
On 8 August 2014 00:27, Nicolas Dussex <nicolas.dussex at gmail.com<mailto:nicolas.dussex at gmail.com>> wrote:
Hi everyone,
Thanks for your help. Emrah is sort of right. I also tried this command:
dapc1 <- dapc(data, grp$pop)
but the clustering seems a bit different from the grp$grp option. So I would like to keep the clusters identified with the group discrimination method but color my points according to their population of origin as in this example:
http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650
but didn't find the information to do that sort of scatter plot in the manual.
Hope it makes sense.
Cheers
Nic
On 8 August 2014 04:10, Jombart, Thibaut <t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk>> wrote:
You run an analysis using group 'yyy'. The analysis provides an optimum discrimination for group 'yyy'.
Then if you plot the results using group 'zzz', the analysis is no longer optimum for this group. The analysis hasn't changed, and is still only optimal for 'yyy'.
Cheers
Thibaut
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org> [adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Rita Castilho [rita.castil at gmail.com<mailto:rita.castil at gmail.com>]
Sent: 07 August 2014 16:27
To: adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>
Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population
So, why the warning: "the analysis is no longer optimal in terms of group discrimination”, if it is the same analysis...
Cheers
Rita
On 7 Aug, 2014, at 12:08, Jombart, Thibaut <t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk><mailto:t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk>>> wrote:
Hi
this is what I understood too. And my answer does exactly that - see the grp argument in ?scatter.dapc.
Cheers
Thibaut
________________________________________
From: Emrah Coraman [coramane at gmail.com<mailto:coramane at gmail.com><mailto:coramane at gmail.com<mailto:coramane at gmail.com>>]
Sent: 07 August 2014 12:01
To: Jombart, Thibaut
Cc: Nicolas Dussex; adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org><mailto:adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>>
Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population
Hi,
I think Nic just wants to color the DAPC scatter plot not with the identified DAPC groups but with their respective population information.
So I guess he doesn't want to change the group discrimination method.
Did I get it right?
Best wishes,
Emrah
On 7 August 2014 13:53, Jombart, Thibaut <t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk><mailto:t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk>><mailto:t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk>>> wrote:
Hi there,
simple, just replace grp$grp with the grouping of individuals you want to use for the plot.
This said, be aware that the analysis is no longer optimal in terms of group discrimination.
Best
Thibaut
==============================
Dr Thibaut Jombart
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
Norfolk Place, London W2 1PG, UK
Tel. : 0044 (0)20 7594 3658
http://sites.google.com/site/thibautjombart/
http://sites.google.com/site/therepiproject/
http://adegenet.r-forge.r-project.org/
Twitter: @thibautjombart
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org><mailto:adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org>> [adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org><mailto:adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org>>] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com<mailto:nicolas.dussex at gmail.com><mailto:nicolas.dussex at gmail.com<mailto:nicolas.dussex at gmail.com>>]
Sent: 07 August 2014 02:15
To: adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org><mailto:adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>>
Subject: [adegenet-forum] DAPC scatter plot and individual colour by population
Hi,
I built a DAPC scatter plot without using a priori grouping information (i.e. geographically distinct populations) using this simple command line: dapc1 <- dapc(data, grp$grp).
I obtained three distinct cluster but now I was wondering how I could represent each individual with a colour corresponding to their sampling origin rather than to their inferred cluster.
I couldn't find this information on the manual and was hoping I could get some advice on that.
Thanks for your help!
Nic
--
Nic Dussex PhD
Department of Zoology
University of Otago
340 Great King Street
P.O.Box 56
Dunedin 9054
New Zealand
Mobile: 021 02790938
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org><mailto:adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
--
Nic Dussex PhD
Department of Zoology
University of Otago
340 Great King Street
P.O.Box 56
Dunedin 9054
New Zealand
Mobile: 021 02790938
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
--
Nic Dussex PhD
Department of Zoology
University of Otago
340 Great King Street
P.O.Box 56
Dunedin 9054
New Zealand
Mobile: 021 02790938
More information about the adegenet-forum
mailing list