From aavalos at uvg.edu.gt Wed Mar 20 00:14:51 2013 From: aavalos at uvg.edu.gt (Andres Weinfeld Avalos Figueroa) Date: Tue, 19 Mar 2013 17:14:51 -0600 Subject: [adegenet-forum] d=n Message-ID: Hi What is the meaning of d=n displayed in the upper right corner of PCA's? Thank you A. Avalos Biochemist -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Wed Mar 20 11:13:56 2013 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Wed, 20 Mar 2013 10:13:56 +0000 Subject: [adegenet-forum] d=n In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA657057A4B964@icexch-m1.ic.ac.uk> Hello, this is the mesh of the grid. This can especially be useful when comparing several biplots from the same data (as it indicates differences in scales/magnitude of the structures). 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 Andres Weinfeld Avalos Figueroa [aavalos at uvg.edu.gt] Sent: 19 March 2013 23:14 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] d=n Hi What is the meaning of d=n displayed in the upper right corner of PCA's? Thank you A. Avalos Biochemist From rita.castil at gmail.com Mon Mar 25 17:15:13 2013 From: rita.castil at gmail.com (Rita Castilho) Date: Mon, 25 Mar 2013 16:15:13 +0000 Subject: [adegenet-forum] inexperienced user Message-ID: <51507811.7060804@gmail.com> Hi! I have a simple question. Most of us have our microsatellite data in an excel file to start with. The ones how use GenAlex even have the geographic coordinates in the last two rows. We can easily convert the data in the sheet into several formats. How can I convert an easily obtained csv file with headers (1sr row = individual id, 2nd = population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1, etc, 17th row = latitude, 18th row = longitude) nto a genind object that can be used in sPCA? I get an error that coordinates are repeated, but that is normal as there are multiple individuals in the same pop. If this question was answered previously, I will appreciate if you could direct me to it. Many thanks Rita first 5 rows of test.csv file ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62 FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62 FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62 FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pip.griffin at gmail.com Tue Mar 26 17:13:31 2013 From: pip.griffin at gmail.com (Pip Griffin) Date: Tue, 26 Mar 2013 17:13:31 +0100 Subject: [adegenet-forum] inexperienced user In-Reply-To: <51507811.7060804@gmail.com> References: <51507811.7060804@gmail.com> Message-ID: Hi Rita, as you probably know, sPCA is not designed to look at spatial structure between genetically-distinct, geographically well-defined populations, but rather to allow visualisation of (potentially crypic) geographic patterns in genetic data from multiple individuals across a geographic range. I found the Scandinavian bear example in Jombart et al (2008) really helpful in understanding what sPCA can do. So assuming that you do indeed have that sort of data, just with a few individuals sampled from each of multiple locations/populations... >From what I remember, sPCA does not like repeated geographic coordinates - because they will produce zero pairwise geographic distances, and/or complicate the calculation of the distance network. One way to fudge it is to add a very small jitter to your data - you can do this using the 'jitter' command in R on the X or Y coordinate, or both. Or, depending on your dataset, it might be appropriate to include just one representative genotype per population. hope this helps Pip On Mon, Mar 25, 2013 at 5:15 PM, Rita Castilho wrote: > Hi! > I have a simple question. Most of us have our microsatellite data in an > excel file to start with. The ones how use GenAlex even have the geographic > coordinates in the last two rows. We can easily convert the data in the > sheet into several formats. How can I convert an easily obtained csv file > with headers (1sr row = individual id, 2nd = population id, 3rd row= allele > 1, locus 1, 4th row= allele 2, locus 1, etc, 17th row = latitude, 18th row = > longitude) nto a genind object that can be used in sPCA? I get an error that > coordinates are repeated, but that is normal as there are multiple > individuals in the same pop. > > If this question was answered previously, I will appreciate if you could > direct me to it. > Many thanks > Rita > > first 5 rows of test.csv file > ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long > FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62 > FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62 > FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62 > FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62 > > > _______________________________________________ > 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 kamvarz at science.oregonstate.edu Tue Mar 26 18:22:30 2013 From: kamvarz at science.oregonstate.edu (Zhian Kamvar) Date: Tue, 26 Mar 2013 10:22:30 -0700 Subject: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2 In-Reply-To: References: Message-ID: Hi Rita, I am actually writing an R package that uses the genind format and I have written a function that will import genalex formatted files called read.genalex. You can find instructions for installation here: https://github.com/poppr/poppr If you want to just use the raw code, you can download it here (the function starts at line 180 and finishes at line 319): https://github.com/poppr/poppr/blob/master/R/file_handling.r Once you have the package installed or the source code in your R session, you can import your genalex file using: read.genalex("myfile.csv", geo=TRUE) Hope that helps! Cheers, Zhian On Tue, Mar 26, 2013 at 4:00 AM, < adegenet-forum-request at lists.r-forge.r-project.org> wrote: > Send adegenet-forum mailing list submissions to > adegenet-forum at lists.r-forge.r-project.org > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum > > or, via email, send a message with subject or body 'help' to > adegenet-forum-request at lists.r-forge.r-project.org > > You can reach the person managing the list at > adegenet-forum-owner at lists.r-forge.r-project.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of adegenet-forum digest..." > > > Today's Topics: > > 1. inexperienced user (Rita Castilho) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 25 Mar 2013 16:15:13 +0000 > From: Rita Castilho > To: adegenet-forum at lists.r-forge.r-project.org > Subject: [adegenet-forum] inexperienced user > Message-ID: <51507811.7060804 at gmail.com> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi! > I have a simple question. Most of us have our microsatellite data in an > excel file to start with. The ones how use GenAlex even have the > geographic coordinates in the last two rows. We can easily convert the > data in the sheet into several formats. How can I convert an easily > obtained csv file with headers (1sr row = individual id, 2nd = > population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1, > etc, 17th row = latitude, 18th row = longitude) nto a genind object that > can be used in sPCA? I get an error that coordinates are repeated, but > that is normal as there are multiple individuals in the same pop. > > If this question was answered previously, I will appreciate if you could > direct me to it. > Many thanks > Rita > > first 5 rows of test.csv file > > ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long > > FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62 > > FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62 > > FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62 > > FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130325/afbfe735/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > 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 > > End of adegenet-forum Digest, Vol 55, Issue 2 > ********************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Tue Mar 26 19:15:10 2013 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Tue, 26 Mar 2013 18:15:10 +0000 Subject: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2 In-Reply-To: References: , Message-ID: <2CB2DA8E426F3541AB1907F98ABA657057A57FAD@icexch-m1.ic.ac.uk> Sounds exciting! Don't forget to advertise it on the forum when you release it. 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 Zhian Kamvar [kamvarz at science.oregonstate.edu] Sent: 26 March 2013 17:22 To: adegenet-forum at lists.r-forge.r-project.org; rita.castil at gmail.com Subject: Re: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2 Hi Rita, I am actually writing an R package that uses the genind format and I have written a function that will import genalex formatted files called read.genalex. You can find instructions for installation here: https://github.com/poppr/poppr If you want to just use the raw code, you can download it here (the function starts at line 180 and finishes at line 319): https://github.com/poppr/poppr/blob/master/R/file_handling.r Once you have the package installed or the source code in your R session, you can import your genalex file using: read.genalex("myfile.csv", geo=TRUE) Hope that helps! Cheers, Zhian On Tue, Mar 26, 2013 at 4:00 AM, > wrote: Send adegenet-forum mailing list submissions to adegenet-forum at lists.r-forge.r-project.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum or, via email, send a message with subject or body 'help' to adegenet-forum-request at lists.r-forge.r-project.org You can reach the person managing the list at adegenet-forum-owner at lists.r-forge.r-project.org When replying, please edit your Subject line so it is more specific than "Re: Contents of adegenet-forum digest..." Today's Topics: 1. inexperienced user (Rita Castilho) ---------------------------------------------------------------------- Message: 1 Date: Mon, 25 Mar 2013 16:15:13 +0000 From: Rita Castilho > To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] inexperienced user Message-ID: <51507811.7060804 at gmail.com> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Hi! I have a simple question. Most of us have our microsatellite data in an excel file to start with. The ones how use GenAlex even have the geographic coordinates in the last two rows. We can easily convert the data in the sheet into several formats. How can I convert an easily obtained csv file with headers (1sr row = individual id, 2nd = population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1, etc, 17th row = latitude, 18th row = longitude) nto a genind object that can be used in sPCA? I get an error that coordinates are repeated, but that is normal as there are multiple individuals in the same pop. If this question was answered previously, I will appreciate if you could direct me to it. Many thanks Rita first 5 rows of test.csv file ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62 FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62 FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62 FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ 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 End of adegenet-forum Digest, Vol 55, Issue 2 ********************************************* From RoyFrancis.Mathew at agrsci.dk Wed Mar 27 10:23:17 2013 From: RoyFrancis.Mathew at agrsci.dk (Roy Mathew Francis) Date: Wed, 27 Mar 2013 09:23:17 +0000 Subject: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2 In-Reply-To: References: Message-ID: Adegenet can already read genalex format. This is what you do The microsatellite data and the coordinate data separately as separate text files. The microsatellite data is exported from GenAlex as 'genclass' file (x.gen) and read into R using read.genepop. The coordinates are read in as regular tab delimited file and then added to the genindtype object. df<-read.genepop("Microsatellites.gen", missing="mean") x<-as.matrix(read.table("coordinates.txt")) df at other<-list(xy=x) Regards Roy Mathew Francis From: adegenet-forum-bounces at lists.r-forge.r-project.org [mailto:adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of Zhian Kamvar Sent: 26 March 2013 18:23 To: adegenet-forum at lists.r-forge.r-project.org; rita.castil at gmail.com Subject: Re: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2 Hi Rita, I am actually writing an R package that uses the genind format and I have written a function that will import genalex formatted files called read.genalex. You can find instructions for installation here: https://github.com/poppr/poppr If you want to just use the raw code, you can download it here (the function starts at line 180 and finishes at line 319): https://github.com/poppr/poppr/blob/master/R/file_handling.r Once you have the package installed or the source code in your R session, you can import your genalex file using: read.genalex("myfile.csv", geo=TRUE) Hope that helps! Cheers, Zhian On Tue, Mar 26, 2013 at 4:00 AM, > wrote: Send adegenet-forum mailing list submissions to adegenet-forum at lists.r-forge.r-project.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum or, via email, send a message with subject or body 'help' to adegenet-forum-request at lists.r-forge.r-project.org You can reach the person managing the list at adegenet-forum-owner at lists.r-forge.r-project.org When replying, please edit your Subject line so it is more specific than "Re: Contents of adegenet-forum digest..." Today's Topics: 1. inexperienced user (Rita Castilho) ---------------------------------------------------------------------- Message: 1 Date: Mon, 25 Mar 2013 16:15:13 +0000 From: Rita Castilho > To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] inexperienced user Message-ID: <51507811.7060804 at gmail.com> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Hi! I have a simple question. Most of us have our microsatellite data in an excel file to start with. The ones how use GenAlex even have the geographic coordinates in the last two rows. We can easily convert the data in the sheet into several formats. How can I convert an easily obtained csv file with headers (1sr row = individual id, 2nd = population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1, etc, 17th row = latitude, 18th row = longitude) nto a genind object that can be used in sPCA? I get an error that coordinates are repeated, but that is normal as there are multiple individuals in the same pop. If this question was answered previously, I will appreciate if you could direct me to it. Many thanks Rita first 5 rows of test.csv file ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62 FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62 FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62 FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ 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 End of adegenet-forum Digest, Vol 55, Issue 2 ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: