From goatsrunfaster at gmail.com Mon Aug 4 20:32:34 2014 From: goatsrunfaster at gmail.com (Spencer Bruce) Date: Mon, 4 Aug 2014 14:32:34 -0400 Subject: [adegenet-forum] simulation engine that will simulate a discrete period of admixture Message-ID: Hey Everyone, I know this is a bit off topic but I'm looking for a simulation engine that will simulate a discrete period of admixture, then evolve over multiple generations in isolation with datasets output every 10 generations to see how the admixture signal changes over time. I know that Easypop is a great program but it doesn't output genotypes at multiple generations. Many other simulation programs are more complicated than I need. Wondering if anyone here might have any advice on this front. Thanks! -- Spencer A Bruce 200 Washington St. Troy, NY 12180 518 225 0787 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Tue Aug 5 12:40:42 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Tue, 5 Aug 2014 10:40:42 +0000 Subject: [adegenet-forum] simulation engine that will simulate a discrete period of admixture In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A823C75D@icexch-m1.ic.ac.uk> Hi Spencer, I dunno of a soft that does it, but that could be easy enough to write down in R (check the function 'hybridize' - code is simple enough). 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 Spencer Bruce [goatsrunfaster at gmail.com] Sent: 04 August 2014 19:32 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] simulation engine that will simulate a discrete period of admixture Hey Everyone, I know this is a bit off topic but I'm looking for a simulation engine that will simulate a discrete period of admixture, then evolve over multiple generations in isolation with datasets output every 10 generations to see how the admixture signal changes over time. I know that Easypop is a great program but it doesn't output genotypes at multiple generations. Many other simulation programs are more complicated than I need. Wondering if anyone here might have any advice on this front. Thanks! -- Spencer A Bruce 200 Washington St. Troy, NY 12180 518 225 0787 From Aaron.Adamack at canberra.edu.au Wed Aug 6 12:15:46 2014 From: Aaron.Adamack at canberra.edu.au (Aaron.Adamack) Date: Wed, 6 Aug 2014 10:15:46 +0000 Subject: [adegenet-forum] simulation engine that will simulate a discrete period of admixture Message-ID: <0996D44934151041B8D7623B1DC805E8A651184B@genoa.ucstaff.win.canberra.edu.au> Hi Spencer, One possibility might be to use the CDPOP program that was developed by Erin Landguth. A second possibility is I've got some R code that might do the simulation that you're looking for. I wrote a simple individual-based model in R that simulates 2 populations with 50 individuals in each population. The model tracks individual genotypes (microsatellites). A fixed number of individuals can migrate between populations each time step. Within the populations mating is random. The model outputs all genotypes for the complete simulation. It shouldn't be hard to modify it for larger population sizes, etc. On the other hand, the program I wrote is quite simple and was done quickly (e.g. 1-2 days). Rather than wasting a day or so figuring out what I did, you could write your own program in R, or if you are using much larger population sizes over hundreds/thousands of years, you'd be better off doing it in fortran or C or some other compiled language in order to get the runtime down to a reasonable length. -Aaron From nicolas.dussex at gmail.com Thu Aug 7 03:15:03 2014 From: nicolas.dussex at gmail.com (Nicolas Dussex) Date: Thu, 7 Aug 2014 13:15:03 +1200 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Thu Aug 7 12:53:26 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Thu, 7 Aug 2014 10:53:26 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com] Sent: 07 August 2014 02:15 To: 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 From coramane at gmail.com Thu Aug 7 13:01:43 2014 From: coramane at gmail.com (Emrah Coraman) Date: Thu, 7 Aug 2014 14:01:43 +0300 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> Message-ID: 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 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 [ > adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas > Dussex [nicolas.dussex at gmail.com] > Sent: 07 August 2014 02:15 > To: 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 > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Thu Aug 7 13:08:29 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Thu, 7 Aug 2014 11:08:29 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk>, Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> 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] Sent: 07 August 2014 12:01 To: Jombart, Thibaut Cc: Nicolas Dussex; 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com] Sent: 07 August 2014 02:15 To: 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 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum From rita.castil at gmail.com Thu Aug 7 17:27:42 2014 From: rita.castil at gmail.com (Rita Castilho) Date: Thu, 7 Aug 2014 16:27:42 +0100 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk>, <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> Message-ID: 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 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] > Sent: 07 August 2014 12:01 > To: Jombart, Thibaut > Cc: Nicolas Dussex; 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com] > Sent: 07 August 2014 02:15 > To: 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 > 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 > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Thu Aug 7 18:10:35 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Thu, 7 Aug 2014 16:10:35 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk>, <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk>, Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] Sent: 07 August 2014 16:27 To: 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 > 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] Sent: 07 August 2014 12:01 To: Jombart, Thibaut Cc: Nicolas Dussex; 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com] Sent: 07 August 2014 02:15 To: 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 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 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum From nicolas.dussex at gmail.com Thu Aug 7 23:27:33 2014 From: nicolas.dussex at gmail.com (Nicolas Dussex) Date: Fri, 8 Aug 2014 09:27:33 +1200 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> Message-ID: 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 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 [ > adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita > Castilho [rita.castil at gmail.com] > Sent: 07 August 2014 16:27 > To: 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 > 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] > Sent: 07 August 2014 12:01 > To: Jombart, Thibaut > Cc: Nicolas Dussex; adegenet-forum at lists.r-forge.r-project.org 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>> 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 adegenet-forum-bounces at lists.r-forge.r-project.org> [ > 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: 07 August 2014 02:15 > To: adegenet-forum at lists.r-forge.r-project.org 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 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 > 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From coramane at gmail.com Thu Aug 7 23:38:11 2014 From: coramane at gmail.com (Emrah Coraman) Date: Fri, 8 Aug 2014 00:38:11 +0300 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> Message-ID: 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 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 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 [ >> adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita >> Castilho [rita.castil at gmail.com] >> Sent: 07 August 2014 16:27 >> To: 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 > > 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] >> Sent: 07 August 2014 12:01 >> To: Jombart, Thibaut >> Cc: Nicolas Dussex; adegenet-forum at lists.r-forge.r-project.org> 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 > > >> 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> adegenet-forum-bounces at lists.r-forge.r-project.org> [ >> 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: 07 August 2014 02:15 >> To: adegenet-forum at lists.r-forge.r-project.org> 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> 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 >> >> 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 >> >> 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 > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.dussex at gmail.com Fri Aug 8 03:05:11 2014 From: nicolas.dussex at gmail.com (Nicolas Dussex) Date: Fri, 8 Aug 2014 13:05:11 +1200 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> Message-ID: 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 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 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 >> 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 [ >>> adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita >>> Castilho [rita.castil at gmail.com] >>> Sent: 07 August 2014 16:27 >>> To: 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 >> > 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] >>> Sent: 07 August 2014 12:01 >>> To: Jombart, Thibaut >>> Cc: Nicolas Dussex; adegenet-forum at lists.r-forge.r-project.org>> 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 >> > >>> 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>> adegenet-forum-bounces at lists.r-forge.r-project.org> [ >>> 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: 07 August 2014 02:15 >>> To: adegenet-forum at lists.r-forge.r-project.org>> 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>> 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 >>> >>> 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 >>> >>> 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 >> >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Fri Aug 8 11:54:08 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Fri, 8 Aug 2014 09:54:08 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk>, Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A824492A@icexch-m1.ic.ac.uk> Hi, so, err... ahem... how to say? Please check my previous answer(s). What you're looking for is changing the *grp* argument in the function *scatter.dapc*. It just changes the colors. In case this is still unclear, an example: ## load data data(microbov) ## make a DAPC - this uses by default pop(microbov) dapc1 <- dapc(microbov, n.pca=10, n.da=2) ## plot with groups used in DAPC scatter(dapc1) ## plot with another group - the species scatter(dapc1, grp=microbov$other$spe) Makes sense? Cheers Thibaut ________________________________________ From: Nicolas Dussex [nicolas.dussex at gmail.com] Sent: 07 August 2014 22:27 To: Jombart, Thibaut Cc: Rita Castilho; adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] Sent: 07 August 2014 16:27 To: 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 >> 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>] Sent: 07 August 2014 12:01 To: Jombart, Thibaut Cc: Nicolas Dussex; 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 >>> 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> [adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com>] Sent: 07 August 2014 02:15 To: 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> 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 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 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 From t.jombart at imperial.ac.uk Fri Aug 8 11:55:57 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Fri, 8 Aug 2014 09:55:57 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> , Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A824493B@icexch-m1.ic.ac.uk> 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 > 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 > 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] Sent: 07 August 2014 16:27 To: 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 >> 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>] Sent: 07 August 2014 12:01 To: Jombart, Thibaut Cc: Nicolas Dussex; 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 >>> 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> [adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com>] Sent: 07 August 2014 02:15 To: 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> 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 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 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 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 From rita.castil at gmail.com Fri Aug 8 12:11:33 2014 From: rita.castil at gmail.com (Rita Castilho) Date: Fri, 8 Aug 2014 11:11:33 +0100 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570A824492A@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk>, <2CB2DA8E426F3541AB1907F98ABA6570A824492A@icexch-m1.ic.ac.uk> Message-ID: Ah, yes that makes sense! And I guess it will also work the other way around?. clusters first, pop after? Thanks On 8 Aug, 2014, at 10:54, Jombart, Thibaut wrote: > > Hi, > > so, err... ahem... how to say? Please check my previous answer(s). What you're looking for is changing the *grp* argument in the function *scatter.dapc*. It just changes the colors. > > In case this is still unclear, an example: > > ## load data > data(microbov) > > ## make a DAPC - this uses by default pop(microbov) > dapc1 <- dapc(microbov, n.pca=10, n.da=2) > > ## plot with groups used in DAPC > scatter(dapc1) > > ## plot with another group - the species > scatter(dapc1, grp=microbov$other$spe) > > Makes sense? > > Cheers > > Thibaut > > > ________________________________________ > From: Nicolas Dussex [nicolas.dussex at gmail.com] > Sent: 07 August 2014 22:27 > To: Jombart, Thibaut > Cc: Rita Castilho; adegenet-forum at lists.r-forge.r-project.org > Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population > > 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] > Sent: 07 August 2014 16:27 > To: 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 >> 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>] > Sent: 07 August 2014 12:01 > To: Jombart, Thibaut > Cc: Nicolas Dussex; 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 >>> 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> [adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com>] > Sent: 07 August 2014 02:15 > To: 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> > 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 > 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rita.castil at gmail.com Fri Aug 8 11:17:47 2014 From: rita.castil at gmail.com (Rita Castilho) Date: Fri, 8 Aug 2014 10:17:47 +0100 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> Message-ID: <7B770781-606A-49F2-B79C-E5678EE9141B@gmail.com> Hi, In cases where the clusters are not so clear cut, it may be much more difficult, and anyway, the original quest was slightly different, I guess. Here is another example: DAPC performed on pops (first figure) or DAPC without pop info (find.clusters) (second figure). As each dot on the second figure belongs to a sampled pop, can we get them coloured (without changing the plot) with colour codes as in the first figure? Apparently not? But was not that the original question? Cheers Rita On 8 Aug, 2014, at 02:05, Nicolas Dussex wrote: > 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 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 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 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] > Sent: 07 August 2014 16:27 > To: 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 > 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] > Sent: 07 August 2014 12:01 > To: Jombart, Thibaut > Cc: Nicolas Dussex; 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com] > Sent: 07 August 2014 02:15 > To: 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 > 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 > 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 > 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 > 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 > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-2.tiff Type: image/tiff Size: 295206 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-3.tiff Type: image/tiff Size: 295206 bytes Desc: not available URL: From t.jombart at imperial.ac.uk Fri Aug 8 13:38:26 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Fri, 8 Aug 2014 11:38:26 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: <7B770781-606A-49F2-B79C-E5678EE9141B@gmail.com> References: <2CB2DA8E426F3541AB1907F98ABA6570A823CE45@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823CE96@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570A823D1B8@icexch-m1.ic.ac.uk> , <7B770781-606A-49F2-B79C-E5678EE9141B@gmail.com> Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A8244A22@icexch-m1.ic.ac.uk> >As each dot on the second figure belongs to a sampled pop, can we get them coloured (without changing the plot) with colour codes as in the first figure? Apparently not? But was not that the original question? Yes, but as I replied twice already, and Emrah once, I'll refer to the previous posts. Cheers Thibaut ------------------------- On 8 Aug, 2014, at 02:05, Nicolas Dussex > wrote: 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 > 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 > 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 > 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Rita Castilho [rita.castil at gmail.com] Sent: 07 August 2014 16:27 To: 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 >> 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>] Sent: 07 August 2014 12:01 To: Jombart, Thibaut Cc: Nicolas Dussex; 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 >>> 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> [adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Nicolas Dussex [nicolas.dussex at gmail.com>] Sent: 07 August 2014 02:15 To: 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> 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 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 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 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 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum From cwaters8 at uw.edu Thu Aug 14 19:48:18 2014 From: cwaters8 at uw.edu (Charlie Waters) Date: Thu, 14 Aug 2014 10:48:18 -0700 Subject: [adegenet-forum] Significance of allelic contribution to discriminant functions Message-ID: Hello, I know the $var.contr slot gives the contribution of the alleles to each discriminant function, but is there a way to test the statistical significance of these contributions? I am primarily interested in identifying (in a statistical manner) the alleles that most contribute to my first two discriminant functions, which happen to separate my various populations. I am currently using an arbitrary cutoff of the top 1% of alleles. Many thanks for your help! Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.david.salas at gmail.com Mon Aug 25 23:20:00 2014 From: maria.david.salas at gmail.com (Maria del Carmen David) Date: Mon, 25 Aug 2014 16:20:00 -0500 Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids Message-ID: Hello, I have a microsatellite data set of an hexaploid organism. I have uploaded the data but when I call for the number of alleles per locus I get an extra allele (0), it is cause for the zeros I have to put so the data can make sense. Now, I'm worried that this allele frequency will distortion my results because I want to make a DAPC. In the package "poppr" there's a command called "recode.polyploids" to eliminate that extra allele but after reading adegenet tutorials I haven't found any comment about this issue. Should I eliminate this extra allele or leave my data as it is? Thank you for your help. Maria del Carmen David -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.navascues at gmail.com Tue Aug 26 12:07:26 2014 From: m.navascues at gmail.com (Miguel Navascues) Date: Tue, 26 Aug 2014 12:07:26 +0200 Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids In-Reply-To: References: Message-ID: <53FC5C5E.8020907@supagro.inra.fr> Hi Maria, In order to estimate allele frequencies for polyploids you need specific methods (see below) that will take into account the type of inheritance and the probability (given the type of inheritance) of a observed phenotype of each of the possible genotyopes. With phenotype I mean the observed size bands (for instance, one individual had bands of size 100, 104, and 108 bp) and with genotype the actual number of copies that the individual had (for the given example it could be 100,100,100,100,104,108 or 100,100,100,104,104,108, etc., etc., etc.). To my knowledge adegenet does not implement such methods. You may use information on presence/absence of one allele though, but I do not remember how right now... Best, Miguel De Silva et al. (2005) Estimation of allele frequencies in polyploids under certain patterns of inheritance. doi:10.1038/sj.hdy.6800728 On 25/08/14 23:20, Maria del Carmen David wrote: > Hello, > I have a microsatellite data set of an hexaploid organism. I have > uploaded the data but when I call for the number of alleles per locus I > get an extra allele (0), it is cause for the zeros I have to put so the > data can make sense. Now, I'm worried that this allele frequency will > distortion my results because I want to make a DAPC. In the package > "poppr" there's a command called "recode.polyploids" to eliminate that > extra allele but after reading adegenet tutorials I haven't found any > comment about this issue. Should I eliminate this extra allele or leave > my data as it is? Thank you for your help. > > Maria del Carmen David > > > _______________________________________________ > adegenet-forum mailing list > adegenet-forum at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum > -- Miguel NAVASCU?S, PhD Charg? de Recherche (CR2) INRA UMR CBGP Centre de Biologie pour la Gestion des Populations 755 avenue du campus Agropolis CS30016 34988 Montferrier-sur-Lez cedex (France) phone: +33(0)4.99.62.33.70 fax: +33(0)4.99.62.33.45 e-mail: miguel.navascues AT supagro.inra.fr e-mail: m.navascues AT gmail.com Skype: m.navascues web: http://www1.montpellier.inra.fr/cbgp/ web: http://sites.google.com/site/navascuesresearch/ From caitiecollins at gmail.com Tue Aug 26 12:49:34 2014 From: caitiecollins at gmail.com (Caitlin Collins) Date: Tue, 26 Aug 2014 11:49:34 +0100 Subject: [adegenet-forum] Significance of allelic contribution to discriminant functions Message-ID: Hi Charlie, Good question. Technically, there is no one "correct" statistical solution to your problem. But, there *are *a number of ways of approaching the problem with more statistical rigour than simply using an arbitrary threshold as you have done. Have you taken a look at the snpzip function in the adegenet packge? If not, just type "?snpzip" into R with the adegenet package loaded. With this function, you can apply one of seven different hierarchical clustering formulas to the allelic contributions generated by dapc. Essentially, each hierarchical clustering method uses a unique approach to determine where the threshold should be drawn. I should note, however, that this descriptive approach will not have an associated p-value. You may want to try out a few different methods before deciding which variables you want to consider "most significant". I hope that helps! Best, Caitlin -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Tue Aug 26 13:18:25 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Tue, 26 Aug 2014 11:18:25 +0000 Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A8259244@icexch-m1.ic.ac.uk> Hello, I am sorry but I am not sure I understand the problem. hexaploid data are OK as long as all individuals have the same ploidy. For the rest you can import the data using df2genind, and all should run smoothly. If I'm missing the point, please post a (reproducible) example, showing what's wrong. 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 [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Maria del Carmen David [maria.david.salas at gmail.com] Sent: 25 August 2014 22:20 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids Hello, I have a microsatellite data set of an hexaploid organism. I have uploaded the data but when I call for the number of alleles per locus I get an extra allele (0), it is cause for the zeros I have to put so the data can make sense. Now, I'm worried that this allele frequency will distortion my results because I want to make a DAPC. In the package "poppr" there's a command called "recode.polyploids" to eliminate that extra allele but after reading adegenet tutorials I haven't found any comment about this issue. Should I eliminate this extra allele or leave my data as it is? Thank you for your help. Maria del Carmen David From t.jombart at imperial.ac.uk Tue Aug 26 13:23:22 2014 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Tue, 26 Aug 2014 11:23:22 +0000 Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids In-Reply-To: <53FC5C5E.8020907@supagro.inra.fr> References: , <53FC5C5E.8020907@supagro.inra.fr> Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570A825929B@icexch-m1.ic.ac.uk> Hi there, I'm assuming that for microsat we have access to the genotypes, i.e.88/88 will appear as 88/88 and not just '88'. If this is not the case, indeed some estimation is needed, and adegenet does not handle that. 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 Miguel Navascues [m.navascues at gmail.com] Sent: 26 August 2014 11:07 To: adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] number of alleles using microsatellite data for polyploids Hi Maria, In order to estimate allele frequencies for polyploids you need specific methods (see below) that will take into account the type of inheritance and the probability (given the type of inheritance) of a observed phenotype of each of the possible genotyopes. With phenotype I mean the observed size bands (for instance, one individual had bands of size 100, 104, and 108 bp) and with genotype the actual number of copies that the individual had (for the given example it could be 100,100,100,100,104,108 or 100,100,100,104,104,108, etc., etc., etc.). To my knowledge adegenet does not implement such methods. You may use information on presence/absence of one allele though, but I do not remember how right now... Best, Miguel De Silva et al. (2005) Estimation of allele frequencies in polyploids under certain patterns of inheritance. doi:10.1038/sj.hdy.6800728 On 25/08/14 23:20, Maria del Carmen David wrote: > Hello, > I have a microsatellite data set of an hexaploid organism. I have > uploaded the data but when I call for the number of alleles per locus I > get an extra allele (0), it is cause for the zeros I have to put so the > data can make sense. Now, I'm worried that this allele frequency will > distortion my results because I want to make a DAPC. In the package > "poppr" there's a command called "recode.polyploids" to eliminate that > extra allele but after reading adegenet tutorials I haven't found any > comment about this issue. Should I eliminate this extra allele or leave > my data as it is? Thank you for your help. > > Maria del Carmen David > > > _______________________________________________ > adegenet-forum mailing list > adegenet-forum at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum > -- Miguel NAVASCU?S, PhD Charg? de Recherche (CR2) INRA UMR CBGP Centre de Biologie pour la Gestion des Populations 755 avenue du campus Agropolis CS30016 34988 Montferrier-sur-Lez cedex (France) phone: +33(0)4.99.62.33.70 fax: +33(0)4.99.62.33.45 e-mail: miguel.navascues AT supagro.inra.fr e-mail: m.navascues AT gmail.com Skype: m.navascues web: http://www1.montpellier.inra.fr/cbgp/ web: http://sites.google.com/site/navascuesresearch/ _______________________________________________ adegenet-forum mailing list adegenet-forum at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum From vojta at trapa.cz Tue Aug 26 13:51:15 2014 From: vojta at trapa.cz (=?utf-8?B?Vm9qdMSbY2g=?= Zeisek) Date: Tue, 26 Aug 2014 13:51:15 +0200 Subject: [adegenet-forum] number of alleles using microsatellite data for polyploids In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570A825929B@icexch-m1.ic.ac.uk> References: <53FC5C5E.8020907@supagro.inra.fr> <2CB2DA8E426F3541AB1907F98ABA6570A825929B@icexch-m1.ic.ac.uk> Message-ID: <12149176.6FTEqHqaSc@veles.site> Hi, I'm not sure if it is the point, but there are two common workarounds for polyploids and microsatellites. First is if one has more ploidy levels, e.g. tetraploids and hexaploids and used software requires only one ploidy level, one can add zeroes (or NAs) to ?mimic? the highest ploidy level. In the mentioned case, the tetraploids would get extra data to look like hexaploids. I have doubts about that approach. Second possibility is to recode microsatellites as presence/absence data. This is particularly useful if the ploidy level is high and one cann't be sure about the pattern (Do I have 88/88/88/90 or 88/88/90/90? And so on.), PCR can be sometimes hard to read. Then one has similar problem with too much zeroes and/or NAs, especially when mixing ploidy levels. So that the problem can be ?How to code my data to keep as much information as possible for the software.?. Sincerely, Vojt?ch Dne ?t 26. srpna 2014 11:23:22, Jombart, Thibaut napsal(a): > Hi there, > > I'm assuming that for microsat we have access to the genotypes, i.e.88/88 > will appear as 88/88 and not just '88'. > > If this is not the case, indeed some estimation is needed, and adegenet does > not handle that. > > 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 Miguel > Navascues [m.navascues at gmail.com] Sent: 26 August 2014 11:07 > To: adegenet-forum at lists.r-forge.r-project.org > Subject: Re: [adegenet-forum] number of alleles using microsatellite data > for polyploids > > Hi Maria, > > In order to estimate allele frequencies for polyploids you need specific > methods (see below) that will take into account the type of inheritance > and the probability (given the type of inheritance) of a observed > phenotype of each of the possible genotyopes. With phenotype I mean the > observed size bands (for instance, one individual had bands of size 100, > 104, and 108 bp) and with genotype the actual number of copies that the > individual had (for the given example it could be > 100,100,100,100,104,108 or 100,100,100,104,104,108, etc., etc., etc.). > > To my knowledge adegenet does not implement such methods. You may use > information on presence/absence of one allele though, but I do not > remember how right now... > > Best, > > Miguel > > > De Silva et al. (2005) Estimation of allele frequencies in polyploids > under certain patterns of inheritance. doi:10.1038/sj.hdy.6800728 > > On 25/08/14 23:20, Maria del Carmen David wrote: > > Hello, > > I have a microsatellite data set of an hexaploid organism. I have > > uploaded the data but when I call for the number of alleles per locus I > > get an extra allele (0), it is cause for the zeros I have to put so the > > data can make sense. Now, I'm worried that this allele frequency will > > distortion my results because I want to make a DAPC. In the package > > "poppr" there's a command called "recode.polyploids" to eliminate that > > extra allele but after reading adegenet tutorials I haven't found any > > comment about this issue. Should I eliminate this extra allele or leave > > my data as it is? Thank you for your help. > > > > Maria del Carmen David -- Vojt?ch Zeisek http://trapa.cz/en/ Department of Botany, Faculty of Science Charles University in Prague Ben?tsk? 2, Prague, 12801, CZ http://botany.natur.cuni.cz/en/ Institute of Botany, Academy of Science Z?mek 1, Pr?honice, 25243, CZ http://www.ibot.cas.cz/en/ Czech Republic -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: This is a digitally signed message part. URL: From goatsrunfaster at gmail.com Tue Aug 26 14:36:48 2014 From: goatsrunfaster at gmail.com (Spencer Bruce) Date: Tue, 26 Aug 2014 08:36:48 -0400 Subject: [adegenet-forum] Quantifying Admixture Message-ID: Does anyone know a good technique for quantifying Admixture? Ideally I'd like something on a scale of .0 to .1 (similar to how heterzygosity is measured), but I would be interested in anything that would give me more scale than just the number of q values greater than .1 in a STRUCTURE plot. Thanks in advance! -Spencer -------------- next part -------------- An HTML attachment was scrubbed... URL: From caitiecollins at gmail.com Tue Aug 26 17:58:56 2014 From: caitiecollins at gmail.com (Caitlin Collins) Date: Tue, 26 Aug 2014 16:58:56 +0100 Subject: [adegenet-forum] Fwd: Significance of allelic contribution to discriminant functions In-Reply-To: References: Message-ID: Yeah, it's new! I might as well note, in case you decide only to try a subset of the methods available: - Ward's method is most likely to select a very large number of variables to get the most complete picture - Single linkage hierarchical clustering will probably select the fewest - Centroid clustering will probably select a useful middle-ground. You can always check to see what proportion of the variance is contained in the subset of variables retained, or you could even try running a DAPC/ PCA with just those variables to compare the discriminatory power of the entire set with that of the subset selected. Good luck. Cheers, Caitlin. On Tue, Aug 26, 2014 at 4:31 PM, Charlie Waters wrote: > Thanks Caitlin! I've never come across the snpzip function so I'll give > those clustering methods a try. > > Thanks, > Charlie > > > On Tue, Aug 26, 2014 at 3:49 AM, Caitlin Collins > wrote: > >> Hi Charlie, >> >> Good question. Technically, there is no one "correct" statistical >> solution to your problem. But, there *are *a number of ways of >> approaching the problem with more statistical rigour than simply using an >> arbitrary threshold as you have done. >> >> Have you taken a look at the snpzip function in the adegenet packge? If >> not, just type "?snpzip" into R with the adegenet package loaded. With this >> function, you can apply one of seven different hierarchical clustering >> formulas to the allelic contributions generated by dapc. Essentially, each >> hierarchical clustering method uses a unique approach to determine where >> the threshold should be drawn. I should note, however, that this >> descriptive approach will not have an associated p-value. You may want to >> try out a few different methods before deciding which variables you want >> to consider "most significant". >> >> I hope that helps! >> >> Best, >> Caitlin >> > > > > -- > Charlie Waters > Box 355020 > School of Aquatic and Fishery Sciences > University of Washington > Seattle, WA 98105 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: