From thomas.hainaux at unamur.be Mon Apr 3 09:47:38 2017 From: thomas.hainaux at unamur.be (Thomas HAINAUX) Date: Mon, 03 Apr 2017 09:47:38 +0200 Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package Message-ID: <29e5-58e1fe00-1-5c1bc580@135151852> Hi, I was performing an PCA analysis on a data set containing 4709 SNPs in 144 individuals but I encountered some warning messages that i didn't understood. I followed the instructions from the tutorial "An introduction to adegenet 2.0.0" (July 29, 2015). 1) I opened my data and converted it to an genind object and i got this warning message: > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv ", header=TRUE) > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA ") Warning message: In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : entirely non-type marker(s) deleted 2) Then I wanted to run the scalegen function and i got a second warning message. > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") Warning message: In .local(x, ...) : Some scaling values are null. Corresponding alleles are removed. After running the scalegen function, the number of loci went from 4709 to 3694. Why these loci are being removed? Is it possible to keep these value? Thank you very much beforehand for your help and your time. I apologise if my questions might be trivial for you, I just started using R recently and i'm not an expert yet. Best regards Thomas Hainaux - Researcher URBV - Plant Biotechnology Namur University Rue de Bruxelles 61 - 5000 Namur Belgique From roman.lustrik at biolitika.si Mon Apr 3 09:57:02 2017 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Mon, 3 Apr 2017 09:57:02 +0200 (CEST) Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package In-Reply-To: <29e5-58e1fe00-1-5c1bc580@135151852> References: <29e5-58e1fe00-1-5c1bc580@135151852> Message-ID: <139199912.6155.1491206222260.JavaMail.zimbra@biolitika.si> Are the spaces around NA (NA.char = " NA ") intended? Cheers, Roman ---- In god we trust, all others bring data. ----- Original Message ----- From: "Thomas HAINAUX" To: adegenet-forum at r-forge.wu-wien.ac.at Sent: Monday, April 3, 2017 9:47:38 AM Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package Hi, I was performing an PCA analysis on a data set containing 4709 SNPs in 144 individuals but I encountered some warning messages that i didn't understood. I followed the instructions from the tutorial "An introduction to adegenet 2.0.0" (July 29, 2015). 1) I opened my data and converted it to an genind object and i got this warning message: > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv ", header=TRUE) > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA ") Warning message: In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : entirely non-type marker(s) deleted 2) Then I wanted to run the scalegen function and i got a second warning message. > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") Warning message: In .local(x, ...) : Some scaling values are null. Corresponding alleles are removed. After running the scalegen function, the number of loci went from 4709 to 3694. Why these loci are being removed? Is it possible to keep these value? Thank you very much beforehand for your help and your time. I apologise if my questions might be trivial for you, I just started using R recently and i'm not an expert yet. Best regards Thomas Hainaux - Researcher URBV - Plant Biotechnology Namur University Rue de Bruxelles 61 - 5000 Namur Belgique _______________________________________________ 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 thomas.hainaux at unamur.be Mon Apr 3 10:16:23 2017 From: thomas.hainaux at unamur.be (Thomas HAINAUX) Date: Mon, 03 Apr 2017 10:16:23 +0200 Subject: [adegenet-forum] =?utf-8?b?Pz09P3V0Zi04P3E/ICBXYXJuaW5nIG1lc3Nh?= =?utf-8?q?ge_when_performing_PCA_analysis_using_adegenet_package?= In-Reply-To: <139199912.6155.1491206222260.JavaMail.zimbra@biolitika.si> Message-ID: <2cd1-58e20500-1-2d6d510@11057489> Not really, but i removed the spaces and it didn't change anything. Le Lundi 3 Avril 2017 09:57 CEST, Roman Lu?trik a ?crit: > Are the spaces around NA (NA.char = " NA ") intended? > > Cheers, > Roman > > ---- > In god we trust, all others bring data. > > ----- Original Message ----- > From: "Thomas HAINAUX" > To: adegenet-forum at r-forge.wu-wien.ac.at > Sent: Monday, April 3, 2017 9:47:38 AM > Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package > > Hi, > > I was performing an PCA analysis on a data set containing 4709 SNPs in > 144 individuals but I encountered some warning messages that i didn't understood. > I followed the instructions from the tutorial "An introduction to adegenet 2.0.0" (July 29, 2015). > > > 1) I opened my data and converted it to an genind object and i got this warning message: > > > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv ", header=TRUE) > > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA ") > Warning message: > In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : > entirely non-type marker(s) deleted > > 2) Then I wanted to run the scalegen function and i got a second warning message. > > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") > Warning message: > In .local(x, ...) : Some scaling values are null. > Corresponding alleles are removed. > > After running the scalegen function, the number of loci went from 4709 to 3694. > Why these loci are being removed? Is it possible to keep these value? > > > Thank you very much beforehand for your help and your time. > I apologise if my questions might be trivial for you, I just started using R recently and i'm not an expert yet. > > > Best regards > Thomas Hainaux - Researcher > URBV - Plant Biotechnology > Namur University > Rue de Bruxelles 61 - 5000 Namur > Belgique > > > _______________________________________________ > 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 roman.lustrik at biolitika.si Mon Apr 3 10:21:31 2017 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Mon, 3 Apr 2017 10:21:31 +0200 (CEST) Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package In-Reply-To: <2cd1-58e20500-1-2d6d510@11057489> References: <2cd1-58e20500-1-2d6d510@11057489> Message-ID: <1512615158.6235.1491207691212.JavaMail.zimbra@biolitika.si> Can you post a small, reproducible example (http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) which we can look at? Cheers, Roman ---- In god we trust, all others bring data. ----- Original Message ----- From: "Thomas HAINAUX" To: "Roman Lu?trik" Cc: adegenet-forum at r-forge.wu-wien.ac.at Sent: Monday, April 3, 2017 10:16:23 AM Subject: Re: [adegenet-forum] Warning message when performing PCA analysis using adegenet package Not really, but i removed the spaces and it didn't change anything. Le Lundi 3 Avril 2017 09:57 CEST, Roman Lu?trik a ?crit: > Are the spaces around NA (NA.char = " NA ") intended? > > Cheers, > Roman > > ---- > In god we trust, all others bring data. > > ----- Original Message ----- > From: "Thomas HAINAUX" > To: adegenet-forum at r-forge.wu-wien.ac.at > Sent: Monday, April 3, 2017 9:47:38 AM > Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package > > Hi, > > I was performing an PCA analysis on a data set containing 4709 SNPs in > 144 individuals but I encountered some warning messages that i didn't understood. > I followed the instructions from the tutorial "An introduction to adegenet 2.0.0" (July 29, 2015). > > > 1) I opened my data and converted it to an genind object and i got this warning message: > > > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv ", header=TRUE) > > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA ") > Warning message: > In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : > entirely non-type marker(s) deleted > > 2) Then I wanted to run the scalegen function and i got a second warning message. > > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") > Warning message: > In .local(x, ...) : Some scaling values are null. > Corresponding alleles are removed. > > After running the scalegen function, the number of loci went from 4709 to 3694. > Why these loci are being removed? Is it possible to keep these value? > > > Thank you very much beforehand for your help and your time. > I apologise if my questions might be trivial for you, I just started using R recently and i'm not an expert yet. > > > Best regards > Thomas Hainaux - Researcher > URBV - Plant Biotechnology > Namur University > Rue de Bruxelles 61 - 5000 Namur > Belgique > > > _______________________________________________ > 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 thibautjombart at gmail.com Mon Apr 3 10:37:08 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 3 Apr 2017 09:37:08 +0100 Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package In-Reply-To: <1512615158.6235.1491207691212.JavaMail.zimbra@biolitika.si> References: <2cd1-58e20500-1-2d6d510@11057489> <1512615158.6235.1491207691212.JavaMail.zimbra@biolitika.si> Message-ID: Hi there, this is the expected behaviour when loci are non-polymorphic. Why would you like to keep them? Especially in the context of a PCA, where it will creates variables with a variances of zero, and therefore Inf values when scaling? Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 3 April 2017 at 09:21, Roman Lu?trik wrote: > Can you post a small, reproducible example (http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) which we can look at? > > Cheers, > Roman > > ---- > In god we trust, all others bring data. > > ----- Original Message ----- > From: "Thomas HAINAUX" > To: "Roman Lu?trik" > Cc: adegenet-forum at r-forge.wu-wien.ac.at > Sent: Monday, April 3, 2017 10:16:23 AM > Subject: Re: [adegenet-forum] Warning message when performing PCA analysis using adegenet package > > Not really, but i removed the spaces and it didn't change anything. > > Le Lundi 3 Avril 2017 09:57 CEST, Roman Lu?trik a ?crit: > >> Are the spaces around NA (NA.char = " NA ") intended? >> >> Cheers, >> Roman >> >> ---- >> In god we trust, all others bring data. >> >> ----- Original Message ----- >> From: "Thomas HAINAUX" >> To: adegenet-forum at r-forge.wu-wien.ac.at >> Sent: Monday, April 3, 2017 9:47:38 AM >> Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package >> >> Hi, >> >> I was performing an PCA analysis on a data set containing 4709 SNPs in >> 144 individuals but I encountered some warning messages that i didn't understood. >> I followed the instructions from the tutorial "An introduction to adegenet 2.0.0" (July 29, 2015). >> >> >> 1) I opened my data and converted it to an genind object and i got this warning message: >> >> > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv ", header=TRUE) >> > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA ") >> Warning message: >> In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : >> entirely non-type marker(s) deleted >> >> 2) Then I wanted to run the scalegen function and i got a second warning message. >> > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") >> Warning message: >> In .local(x, ...) : Some scaling values are null. >> Corresponding alleles are removed. >> >> After running the scalegen function, the number of loci went from 4709 to 3694. >> Why these loci are being removed? Is it possible to keep these value? >> >> >> Thank you very much beforehand for your help and your time. >> I apologise if my questions might be trivial for you, I just started using R recently and i'm not an expert yet. >> >> >> Best regards >> Thomas Hainaux - Researcher >> URBV - Plant Biotechnology >> Namur University >> Rue de Bruxelles 61 - 5000 Namur >> Belgique >> >> >> _______________________________________________ >> 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 guillaume.robert at inra.fr Tue Apr 4 13:58:13 2017 From: guillaume.robert at inra.fr (Guillaume Robert) Date: Tue, 4 Apr 2017 11:58:13 +0000 Subject: [adegenet-forum] FST genlight Message-ID: <1491307090009.41625@inra.fr> Hi, I use adegenet to perform FST analysis for a big set of SNPs markers. I've already loaded my data in a genlight object, but I haven't found how to do a FST computation for each SNP. (the method described in the "basic tutorial" is for genind object) Would anyone know if it's possible, and how? Thanks, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Tue Apr 4 15:18:28 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 4 Apr 2017 14:18:28 +0100 Subject: [adegenet-forum] addendum to question about how to remove outliers (http://lists.r-forge.r-project.org/pipermail/adegenet-forum/2015-July/001194.html) In-Reply-To: References: Message-ID: Hi Ella, what you want is possible; workflow would be: 1) get a vector of loci to remove (different options here) 2) subset the genind Example using microbov: > locNames(microbov) [1] "INRA63" "INRA5" "ETH225" "ILSTS5" "HEL5" "HEL1" "INRA35" [8] "ETH152" "INRA23" "ETH10" "HEL9" "CSSM66" "INRA32" "ETH3" [15] "BM2113" "BM1824" "HEL13" "INRA37" "BM1818" "ILSTS6" "MM12" [22] "CSRM60" "ETH185" "HAUT24" "HAUT27" "TGLA227" "TGLA126" "TGLA122" [29] "TGLA53" "SPS115" Let say I want to remove all 'INRA ...' markers, and my input is the allele names: > x <- grep("INRA", locNames(microbov, TRUE), value = TRUE) > x [1] "INRA63.167" "INRA63.171" "INRA63.173" "INRA63.175" "INRA63.177" [6] "INRA63.179" "INRA63.181" "INRA63.183" "INRA63.185" "INRA5.137" [11] "INRA5.139" "INRA5.141" "INRA5.143" "INRA5.145" "INRA5.147" [16] "INRA5.149" "INRA35.102" "INRA35.104" "INRA35.106" "INRA35.108" [21] "INRA35.110" "INRA35.114" "INRA35.120" "INRA23.193" "INRA23.197" [26] "INRA23.199" "INRA23.201" "INRA23.203" "INRA23.205" "INRA23.207" [31] "INRA23.209" "INRA23.211" "INRA23.213" "INRA23.215" "INRA23.217" [36] "INRA23.219" "INRA32.160" "INRA32.162" "INRA32.164" "INRA32.166" [41] "INRA32.168" "INRA32.174" "INRA32.176" "INRA32.178" "INRA32.180" [46] "INRA32.182" "INRA32.184" "INRA32.186" "INRA32.202" "INRA32.204" [51] "INRA37.112" "INRA37.114" "INRA37.116" "INRA37.118" "INRA37.120" [56] "INRA37.122" "INRA37.124" "INRA37.126" "INRA37.128" "INRA37.130" [61] "INRA37.132" "INRA37.134" "INRA37.136" "INRA37.138" "INRA37.140" [66] "INRA37.142" "INRA37.144" "INRA37.146" "INRA37.148" > loc_to_remove <- unique(sub("[.].*", "", x)) > loc_to_remove [1] "INRA63" "INRA5" "INRA35" "INRA23" "INRA32" "INRA37" > loc_to_keep <- setdiff(locNames(microbov), loc_to_remove) > loc_to_keep [1] "ETH225" "ILSTS5" "HEL5" "HEL1" "ETH152" "ETH10" "HEL9" [8] "CSSM66" "ETH3" "BM2113" "BM1824" "HEL13" "BM1818" "ILSTS6" [15] "MM12" "CSRM60" "ETH185" "HAUT24" "HAUT27" "TGLA227" "TGLA126" [22] "TGLA122" "TGLA53" "SPS115" > new_data /// GENIND OBJECT ///////// // 704 individuals; 24 loci; 304 alleles; size: 944.1 Kb // Basic content @tab: 704 x 304 matrix of allele counts @loc.n.all: number of alleles per locus (range: 5-22) @loc.fac: locus factor for the 304 columns of @tab @all.names: list of allele names for each locus @ploidy: ploidy of each individual (range: 2-2) @type: codom @call: .local(x = x, i = i, j = j, loc = ..1, drop = drop) // Optional content @pop: population of each individual (group size range: 30-61) @other: a list containing: coun breed spe > locNames(new_data) [1] "ETH225" "ILSTS5" "HEL5" "HEL1" "ETH152" "ETH10" "HEL9" [8] "CSSM66" "ETH3" "BM2113" "BM1824" "HEL13" "BM1818" "ILSTS6" [15] "MM12" "CSRM60" "ETH185" "HAUT24" "HAUT27" "TGLA227" "TGLA126" [22] "TGLA122" "TGLA53" "SPS115" Done! The only difference in your case will be the regular expression to use for your data, likely something like: sub("_.*", "", x) Otherwise, it should all work fine. Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 30 March 2017 at 21:27, Ella Bowles wrote: > Hello, > > I am trying to remove a set of loci, as in the question posted here: > http://lists.r-forge.r-project.org/pipermail/adegenet-forum/2015-July/001194.html. > However, I'm wondering if there is a way to list the exact locus names > instead of simply the position of the locus. And, what is more, if there is > a way to provide a vector with loci to remove, with the identifier be only > part of the full locus name? > > Say I have the following >> dat.s_subset <- dat.s[1:5,1:5] >> dat.s_subset > /// GENIND OBJECT ///////// > > // 5 individuals; 3 loci; 5 alleles; size: 6.7 Kb > > // Basic content > @tab: 5 x 5 matrix of allele counts > @loc.n.all: number of alleles per locus (range: 1-2) > @loc.fac: locus factor for the 5 columns of @tab > @all.names: list of allele names for each locus > @ploidy: ploidy of each individual (range: 2-2) > @type: codom > @call: .local(x = x, i = i, j = j, drop = drop) > > // Optional content > @pop: population of each individual (group size range: 5-5) >> locNames(dat.s_subset) > [1] "12706_10" "14223_16" "14481_7" > > As I understand it, if I want to remove locus 14223_16, I can use >> toRemove=c(2) >> x=dat.s_subset[loc=-toRemove] >> x > /// GENIND OBJECT ///////// > > // 5 individuals; 2 loci; 3 alleles; size: 6.3 Kb > > // Basic content > @tab: 5 x 3 matrix of allele counts > @loc.n.all: number of alleles per locus (range: 1-2) > @loc.fac: locus factor for the 3 columns of @tab > @all.names: list of allele names for each locus > @ploidy: ploidy of each individual (range: 2-2) > @type: codom > @call: .local(x = x, i = i, j = j, loc = ..1, drop = drop) > > // Optional content > @pop: population of each individual (group size range: 5-5) >> locNames(x) > [1] "12706_10" "14481_7" > > However, I have thousands of loci, and from the analysis that I have done, > my vector of loci that I want to remove has the number of the locus before > the underscore. Is there a way of specifying loci using only this > information? So, I'd need something like the unix wildcard "*", and to be > able to say something like toRemove=c(14223*). > > I've done a bunch of searching on the web to see if it would be easier to do > this outside of adegenet, but it seems like it is going to be hard. > > Any help would be much appreciated. > > Sincerely, > Ella > > -- > Ella Bowles, PhD > Postdoctoral Researcher > Department of Biology > Concordia University > > Website: https://ellabowlesphd.wordpress.com/ > Email: bowlese at gmail.com > > _______________________________________________ > 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 thibautjombart at gmail.com Tue Apr 4 15:19:50 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 4 Apr 2017 14:19:50 +0100 Subject: [adegenet-forum] FST genlight In-Reply-To: <1491307090009.41625@inra.fr> References: <1491307090009.41625@inra.fr> Message-ID: I think J?rome Goudet was thinking of implementing this at some point, but I don't know where this ended. This is not implemented as it is in adegenet. PR welcome ;) Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 4 April 2017 at 12:58, Guillaume Robert wrote: > Hi, > > > I use adegenet to perform FST analysis for a big set of SNPs markers. > > > I've already loaded my data in a genlight object, but I haven't found how to > do a FST computation for each SNP. > > (the method described in the "basic tutorial" is for genind object) > > > Would anyone know if it's possible, and how? > > > Thanks, > > > Guillaume > > > _______________________________________________ > 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 thibautjombart at gmail.com Tue Apr 4 15:08:11 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 4 Apr 2017 14:08:11 +0100 Subject: [adegenet-forum] Older version of adegenet In-Reply-To: <6597957BE88F22419CB987B2E084C50504F73E9E502D@MBX-EXC-ED-01.rbge.org.uk> References: <6597957BE88F22419CB987B2E084C50504F73E9E502D@MBX-EXC-ED-01.rbge.org.uk> Message-ID: Dear Markus, old sources can be found on CRAN: https://cran.r-project.org/src/contrib/Archive/adegenet/ However, I would strongly recommend using the current version. There has been, I think, no loss of functionalities since 1.4.1, only improvements (many bug fixes and new features). Some scripts will not be backward compatible, but the changes required are usually minor. Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 20 March 2017 at 15:16, Markus Ruhsam wrote: > Hello, > > > > I would like to install v1.4-1 but the link on the > http://adegenet.r-forge.r-project.org/ website to the Windows binary > results in an 404 error. Has this been moved or is the file not available > more? > > > > Thank you > > > > Markus > > > > > > > > > > > > > > > > > > Dr Markus Ruhsam > > Molecular Plant Ecologist > > Royal Botanic Garden Edinburgh > > 20A Inverleith Row > > Edinburgh > > EH3 5LR > > United Kingdom > > > > Tel: +44 (0) 131 248 2859 <+44%20131%20248%202859> > Fax: +44 (0) 131 248 2901 <+44%20131%20248%202901> > > > > http://www.rbge.org.uk/science/genetics-and-conservation/markus-ruhsam- > homepage > > > > The mission of the Royal Botanic Garden Edinburgh is to ?*To explore, > conserve and explain the world of plants for a better future*? > > > > > > [image: cid:image002.png at 01D09F78.9DFBA130] > > > > > The Royal Botanic Garden Edinburgh is a charity > registered in Scotland (No SC007983) > > > _______________________________________________ > 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: image001.png Type: image/png Size: 31595 bytes Desc: not available URL: From thierrygosselin at icloud.com Tue Apr 4 15:31:10 2017 From: thierrygosselin at icloud.com (Thierry Gosselin) Date: Tue, 04 Apr 2017 09:31:10 -0400 Subject: [adegenet-forum] FST genlight In-Reply-To: References: <1491307090009.41625@inra.fr> Message-ID: Hi Guillaume and Thibault, How many markers in the genlight object ? Cheers, Thierry > On Apr 4, 2017, at 09:19, Thibaut Jombart wrote: > > I think J?rome Goudet was thinking of implementing this at some point, > but I don't know where this ended. This is not implemented as it is in > adegenet. PR welcome ;) > > Cheers > Thibaut > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 > > > On 4 April 2017 at 12:58, Guillaume Robert wrote: >> Hi, >> >> >> I use adegenet to perform FST analysis for a big set of SNPs markers. >> >> >> I've already loaded my data in a genlight object, but I haven't found how to >> do a FST computation for each SNP. >> >> (the method described in the "basic tutorial" is for genind object) >> >> >> Would anyone know if it's possible, and how? >> >> >> Thanks, >> >> >> Guillaume >> >> >> _______________________________________________ >> 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 guillaume.robert at inra.fr Tue Apr 4 15:45:14 2017 From: guillaume.robert at inra.fr (Guillaume Robert) Date: Tue, 4 Apr 2017 13:45:14 +0000 Subject: [adegenet-forum] FST genlight In-Reply-To: References: <1491307090009.41625@inra.fr> , Message-ID: <1491313501717.30856@inra.fr> Hi and thank you for your response, I have around 400k SNPs, but I could reduce my set, focusing on coding regions. What is the maximum number of SNPs that a genind object could handle? (I've got 32Go of RAM) ________________________________________ De : Thierry Gosselin Envoy? : mardi 4 avril 2017 15:31 ? : Thibaut Jombart; Guillaume Robert Cc : adegenet-forum at lists.r-forge.r-project.org Objet : Re: [adegenet-forum] FST genlight Hi Guillaume and Thibault, How many markers in the genlight object ? Cheers, Thierry > On Apr 4, 2017, at 09:19, Thibaut Jombart wrote: > > I think J?rome Goudet was thinking of implementing this at some point, > but I don't know where this ended. This is not implemented as it is in > adegenet. PR welcome ;) > > Cheers > Thibaut > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 > > > On 4 April 2017 at 12:58, Guillaume Robert wrote: >> Hi, >> >> >> I use adegenet to perform FST analysis for a big set of SNPs markers. >> >> >> I've already loaded my data in a genlight object, but I haven't found how to >> do a FST computation for each SNP. >> >> (the method described in the "basic tutorial" is for genind object) >> >> >> Would anyone know if it's possible, and how? >> >> >> Thanks, >> >> >> Guillaume >> >> >> _______________________________________________ >> 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 thierrygosselin at icloud.com Tue Apr 4 16:22:27 2017 From: thierrygosselin at icloud.com (Thierry Gosselin) Date: Tue, 04 Apr 2017 10:22:27 -0400 Subject: [adegenet-forum] FST genlight In-Reply-To: <1491313501717.30856@inra.fr> References: <1491307090009.41625@inra.fr> <1491313501717.30856@inra.fr> Message-ID: <95A54F10-665A-4E09-A39C-011C066147BB@icloud.com> several solutions: SNPRelate, hierfstat, strataG, diveRsity and GENODIVE. But I prefer my package ;) why? (check this link) assigner vignette bug report I haven?t tested my package above 200K markers, curious to see how it goes with 400K! It uses genlight and many other input files. I would start by just asking for the overall Fst, then if it finish without bug or error. Example with genlight object: library(assigner) #Install instructions on my github fst.test <- stackr::tidy_genomic_data(data = genlight.data) %>% assigner::fst_WC84(data = ., verbose = TRUE) After, you could use other arguments: pairwise, confidence intervals and subsampling. There is also a function for Nei?s Gst, G?st and Jost?s D Cheers Thierry > On Apr 4, 2017, at 09:45, Guillaume Robert wrote: > > Hi and thank you for your response, > > I have around 400k SNPs, but I could reduce my set, focusing on coding regions. > > What is the maximum number of SNPs that a genind object could handle? (I've got 32Go of RAM) > ________________________________________ > De : Thierry Gosselin > Envoy? : mardi 4 avril 2017 15:31 > ? : Thibaut Jombart; Guillaume Robert > Cc : adegenet-forum at lists.r-forge.r-project.org > Objet : Re: [adegenet-forum] FST genlight > > Hi Guillaume and Thibault, > > How many markers in the genlight object ? > > Cheers, > Thierry > >> On Apr 4, 2017, at 09:19, Thibaut Jombart wrote: >> >> I think J?rome Goudet was thinking of implementing this at some point, >> but I don't know where this ended. This is not implemented as it is in >> adegenet. PR welcome ;) >> >> Cheers >> Thibaut >> >> -- >> Dr Thibaut Jombart >> Lecturer, Department of Infectious Disease Epidemiology, Imperial College London >> Head of RECON: repidemicsconsortium.org >> sites.google.com/site/thibautjombart/ >> github.com/thibautjombart >> Twitter: @TeebzR >> +44(0)20 7594 3658 >> >> >> On 4 April 2017 at 12:58, Guillaume Robert wrote: >>> Hi, >>> >>> >>> I use adegenet to perform FST analysis for a big set of SNPs markers. >>> >>> >>> I've already loaded my data in a genlight object, but I haven't found how to >>> do a FST computation for each SNP. >>> >>> (the method described in the "basic tutorial" is for genind object) >>> >>> >>> Would anyone know if it's possible, and how? >>> >>> >>> Thanks, >>> >>> >>> Guillaume >>> >>> >>> _______________________________________________ >>> 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 thibautjombart at gmail.com Tue Apr 4 16:24:55 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 4 Apr 2017 15:24:55 +0100 Subject: [adegenet-forum] FST genlight In-Reply-To: <95A54F10-665A-4E09-A39C-011C066147BB@icloud.com> References: <1491307090009.41625@inra.fr> <1491313501717.30856@inra.fr> <95A54F10-665A-4E09-A39C-011C066147BB@icloud.com> Message-ID: Looks cool! :) -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 4 April 2017 at 15:22, Thierry Gosselin wrote: > several solutions: SNPRelate, hierfstat, strataG, diveRsity and GENODIVE. > > But I prefer my package ;) why? (check this link) > assigner > vignette > bug report > > I haven?t tested my package above 200K markers, curious to see how it goes > with 400K! > > It uses genlight and many other input files. > I would start by just asking for the overall Fst, then if it finish without > bug or error. > > Example with genlight object: > > library(assigner) #Install instructions on my github > > fst.test <- stackr::tidy_genomic_data(data = genlight.data) %>% > assigner::fst_WC84(data = ., verbose = TRUE) > > After, you could use other arguments: pairwise, confidence intervals and > subsampling. > > There is also a function for Nei?s Gst, G?st and Jost?s D > > Cheers > Thierry > > On Apr 4, 2017, at 09:45, Guillaume Robert wrote: > > Hi and thank you for your response, > > I have around 400k SNPs, but I could reduce my set, focusing on coding > regions. > > What is the maximum number of SNPs that a genind object could handle? (I've > got 32Go of RAM) > ________________________________________ > De : Thierry Gosselin > Envoy? : mardi 4 avril 2017 15:31 > ? : Thibaut Jombart; Guillaume Robert > Cc : adegenet-forum at lists.r-forge.r-project.org > Objet : Re: [adegenet-forum] FST genlight > > Hi Guillaume and Thibault, > > How many markers in the genlight object ? > > Cheers, > Thierry > > On Apr 4, 2017, at 09:19, Thibaut Jombart wrote: > > I think J?rome Goudet was thinking of implementing this at some point, > but I don't know where this ended. This is not implemented as it is in > adegenet. PR welcome ;) > > Cheers > Thibaut > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College > London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 > > > On 4 April 2017 at 12:58, Guillaume Robert wrote: > > Hi, > > > I use adegenet to perform FST analysis for a big set of SNPs markers. > > > I've already loaded my data in a genlight object, but I haven't found how to > do a FST computation for each SNP. > > (the method described in the "basic tutorial" is for genind object) > > > Would anyone know if it's possible, and how? > > > Thanks, > > > Guillaume > > > _______________________________________________ > 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 guillaume.robert at inra.fr Tue Apr 4 16:44:47 2017 From: guillaume.robert at inra.fr (Guillaume Robert) Date: Tue, 4 Apr 2017 14:44:47 +0000 Subject: [adegenet-forum] FST genlight In-Reply-To: References: <1491307090009.41625@inra.fr> <1491313501717.30856@inra.fr> <95A54F10-665A-4E09-A39C-011C066147BB@icloud.com>, Message-ID: <1491317084215.51976@inra.fr> Thank you very much Thierry for the advices, I will give a try to your package ;) Guillaume ________________________________________ De : Thibaut Jombart Envoy? : mardi 4 avril 2017 16:24 ? : Thierry Gosselin Cc : Guillaume Robert; adegenet-forum at lists.r-forge.r-project.org Objet : Re: [adegenet-forum] FST genlight Looks cool! :) -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 4 April 2017 at 15:22, Thierry Gosselin wrote: > several solutions: SNPRelate, hierfstat, strataG, diveRsity and GENODIVE. > > But I prefer my package ;) why? (check this link) > assigner > vignette > bug report > > I haven?t tested my package above 200K markers, curious to see how it goes > with 400K! > > It uses genlight and many other input files. > I would start by just asking for the overall Fst, then if it finish without > bug or error. > > Example with genlight object: > > library(assigner) #Install instructions on my github > > fst.test <- stackr::tidy_genomic_data(data = genlight.data) %>% > assigner::fst_WC84(data = ., verbose = TRUE) > > After, you could use other arguments: pairwise, confidence intervals and > subsampling. > > There is also a function for Nei?s Gst, G?st and Jost?s D > > Cheers > Thierry > > On Apr 4, 2017, at 09:45, Guillaume Robert wrote: > > Hi and thank you for your response, > > I have around 400k SNPs, but I could reduce my set, focusing on coding > regions. > > What is the maximum number of SNPs that a genind object could handle? (I've > got 32Go of RAM) > ________________________________________ > De : Thierry Gosselin > Envoy? : mardi 4 avril 2017 15:31 > ? : Thibaut Jombart; Guillaume Robert > Cc : adegenet-forum at lists.r-forge.r-project.org > Objet : Re: [adegenet-forum] FST genlight > > Hi Guillaume and Thibault, > > How many markers in the genlight object ? > > Cheers, > Thierry > > On Apr 4, 2017, at 09:19, Thibaut Jombart wrote: > > I think J?rome Goudet was thinking of implementing this at some point, > but I don't know where this ended. This is not implemented as it is in > adegenet. PR welcome ;) > > Cheers > Thibaut > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College > London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 > > > On 4 April 2017 at 12:58, Guillaume Robert wrote: > > Hi, > > > I use adegenet to perform FST analysis for a big set of SNPs markers. > > > I've already loaded my data in a genlight object, but I haven't found how to > do a FST computation for each SNP. > > (the method described in the "basic tutorial" is for genind object) > > > Would anyone know if it's possible, and how? > > > Thanks, > > > Guillaume > > > _______________________________________________ > 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 thibautjombart at gmail.com Tue Apr 11 13:27:34 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 11 Apr 2017 12:27:34 +0100 Subject: [adegenet-forum] Warning message when performing PCA analysis using adegenet package In-Reply-To: <52c5-58eb7a80-13-5f00e780@31578948> References: <52c5-58eb7a80-13-5f00e780@31578948> Message-ID: No probs! Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 10 April 2017 at 13:29, Thomas HAINAUX wrote: > Hi, > > you are right, there is no reason to keep this value. > Sorry for this silly question, i was troubled by the warning messages. > > > Thank you for your help. > > Best regards > Thomas > > Le Lundi 3 Avril 2017 10:37 CEST, Thibaut Jombart < > thibautjombart at gmail.com> a ?crit: > > > Hi there, > > > > this is the expected behaviour when loci are non-polymorphic. Why > > would you like to keep them? Especially in the context of a PCA, where > > it will creates variables with a variances of zero, and therefore Inf > > values when scaling? > > > > Cheers > > Thibaut > > > > -- > > Dr Thibaut Jombart > > Lecturer, Department of Infectious Disease Epidemiology, Imperial > College London > > Head of RECON: repidemicsconsortium.org > > sites.google.com/site/thibautjombart/ > > github.com/thibautjombart > > Twitter: @TeebzR > > +44(0)20 7594 3658 > > > > > > On 3 April 2017 at 09:21, Roman Lu?trik > wrote: > > > Can you post a small, reproducible example (http://stackoverflow.com/ > questions/5963269/how-to-make-a-great-r-reproducible-example) which we > can look at? > > > > > > Cheers, > > > Roman > > > > > > ---- > > > In god we trust, all others bring data. > > > > > > ----- Original Message ----- > > > From: "Thomas HAINAUX" > > > To: "Roman Lu?trik" > > > Cc: adegenet-forum at r-forge.wu-wien.ac.at > > > Sent: Monday, April 3, 2017 10:16:23 AM > > > Subject: Re: [adegenet-forum] Warning message when performing PCA > analysis using adegenet package > > > > > > Not really, but i removed the spaces and it didn't change anything. > > > > > > Le Lundi 3 Avril 2017 09:57 CEST, Roman Lu?trik < > roman.lustrik at biolitika.si> a ?crit: > > > > > >> Are the spaces around NA (NA.char = " NA ") intended? > > >> > > >> Cheers, > > >> Roman > > >> > > >> ---- > > >> In god we trust, all others bring data. > > >> > > >> ----- Original Message ----- > > >> From: "Thomas HAINAUX" > > >> To: adegenet-forum at r-forge.wu-wien.ac.at > > >> Sent: Monday, April 3, 2017 9:47:38 AM > > >> Subject: [adegenet-forum] Warning message when performing PCA > analysis using adegenet package > > >> > > >> Hi, > > >> > > >> I was performing an PCA analysis on a data set containing 4709 SNPs > in > > >> 144 individuals but I encountered some warning messages that i didn't > understood. > > >> I followed the instructions from the tutorial "An introduction to > adegenet 2.0.0" (July 29, 2015). > > >> > > >> > > >> 1) I opened my data and converted it to an genind object and i got > this warning message: > > >> > > >> > datacsv = read.csv2("170329_solcap_select_20_98_grouped_by_k3.csv > ", header=TRUE) > > >> > datagenind = df2genind(datacsv[,2:4709], sep= " | ", NA.char= " NA > ") > > >> Warning message: > > >> In df2genind(datacsv[, 2:4709], sep = " | ", NA.char = " NA ") : > > >> entirely non-type marker(s) deleted > > >> > > >> 2) Then I wanted to run the scalegen function and i got a second > warning message. > > >> > datasc = scaleGen(datagenind[,2:4709], NA.method= "mean") > > >> Warning message: > > >> In .local(x, ...) : Some scaling values are null. > > >> Corresponding alleles are removed. > > >> > > >> After running the scalegen function, the number of loci went from > 4709 to 3694. > > >> Why these loci are being removed? Is it possible to keep these value? > > >> > > >> > > >> Thank you very much beforehand for your help and your time. > > >> I apologise if my questions might be trivial for you, I just started > using R recently and i'm not an expert yet. > > >> > > >> > > >> Best regards > > >> Thomas Hainaux - Researcher > > >> URBV - Plant Biotechnology > > >> Namur University > > >> Rue de Bruxelles 61 - 5000 Namur > > >> Belgique > > >> > > >> > > >> _______________________________________________ > > >> 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 jose.andres at usask.ca Fri Apr 21 21:22:47 2017 From: jose.andres at usask.ca (Andres, Jose) Date: Fri, 21 Apr 2017 19:22:47 +0000 Subject: [adegenet-forum] supplementary individual analyses: install devol error In-Reply-To: References: <52c5-58eb7a80-13-5f00e780@31578948>, Message-ID: <1492802567563.5773@usask.ca> Hi there, I am working on the assignment of supplementary individuals to one of my previous DAPC analyses. Because the know issues with the predict.dapc of the repository version (2.0.1) I'd like to use the devol version of Adegenet. Unfortunately, my compilation fails because of the following error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLin site:lists.r-forge.r-project.org/pipermail/adegenet-forum/ ERROR: compilation failed for package 'adegenet' * removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' * restoring previous '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' Any suggestions on how to fix this? I am using R 3.3.2 GUI 1.68 Mavericks build (7288) under a MacOC Sierra 10.12 Thanks! /Jose Andres -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrien.rieux at cirad.fr Mon Apr 24 14:04:23 2017 From: adrien.rieux at cirad.fr (Adrien Rieux) Date: Mon, 24 Apr 2017 16:04:23 +0400 Subject: [adegenet-forum] DAPC: shall I keep or exclude repeated genotypes ? Message-ID: <58FDE9C7.2000009@cirad.fr> Hi there, I?ve got a question regarding the assessment of genetic structure from microsatellite data using the DAPC method. My dataset contains around 30% of repeated genotypes. I observe different and contrasted results (BIC as a function of the number of clusters) when I keep or exclude repeated genotypes (find.clusters function). Has someone ever experienced this situation and how would you explain it ? I would have predicted that finding the optimal number of clusters should not be influenced by repeated genotypes as the DAPC is only based on the variation between genotypes. Is there a general recommendation whether keeping or excluding repeated genotypes when performing DAPC ? Cheers, Adrien -- Adrien RIEUX CIRAD - Dpt BIOS - UMR PVBMT Tel: 0262499219 https://adrienrieux.wordpress.com/home/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrien.rieux at cirad.fr Mon Apr 24 14:10:51 2017 From: adrien.rieux at cirad.fr (Adrien Rieux) Date: Mon, 24 Apr 2017 16:10:51 +0400 Subject: [adegenet-forum] Combining SNP and microsatellites markers in a single DAPC Message-ID: <58FDEB4B.9040104@cirad.fr> Hi there, Is there a way to combine microsatellite and SNP data in a single DAPC ? I do observe striking difference in the genetic structure independently measured by both type of markers and I?d be keen, if possible, to see what I get when both information are combined. I should tell that I only have SNP data for a subset of the samples that were genotyped with microsatellites. Cheers, Adrien -- Adrien RIEUX CIRAD - Dpt BIOS - UMR PVBMT Tel: 0262499219 https://adrienrieux.wordpress.com/home/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Mon Apr 24 15:27:22 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 14:27:22 +0100 Subject: [adegenet-forum] supplementary individual analyses: install devol error In-Reply-To: <1492802567563.5773@usask.ca> References: <52c5-58eb7a80-13-5f00e780@31578948> <1492802567563.5773@usask.ca> Message-ID: Hi Jose this looks like a devtools issue. Can you please try with the current version of R, using a vanilla session (R --vanilla)? Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 21 April 2017 at 20:22, Andres, Jose wrote: > Hi there, > I am working on the assignment of supplementary individuals to one of > my previous DAPC analyses. Because the know issues with the predict.dapc of > the repository version (2.0.1) I'd like to use the devol version of > Adegenet. Unfortunately, my compilation fails because of the following > error: > > invalid active developer path (/Library/Developer/CommandLineTools), > missing xcrun at: /Library/Developer/CommandLin site: > lists.r-forge.r-project.org/pipermail/adegenet-forum/ > > ERROR: compilation failed for package ?adegenet? > * removing ?/Library/Frameworks/R.framework/Versions/3.3/ > Resources/library/adegenet? > * restoring previous ?/Library/Frameworks/R.framework/Versions/3.3/ > Resources/library/adegenet? > > Any suggestions on how to fix this? I am using R 3.3.2 GUI 1.68 Mavericks > build (7288) under a MacOC Sierra 10.12 > > Thanks! > > > /Jose Andres > > _______________________________________________ > 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 thibautjombart at gmail.com Mon Apr 24 15:39:25 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 14:39:25 +0100 Subject: [adegenet-forum] DAPC: shall I keep or exclude repeated genotypes ? In-Reply-To: <58FDE9C7.2000009@cirad.fr> References: <58FDE9C7.2000009@cirad.fr> Message-ID: Hello, changes are to be expected, as repeated genotypes form, by definition, clusters. So by adding/removing them you are effectively adding or removing clusters. Mathematically this is reflected by the variance components (total, between, within), which are all sums over individuals, and therefore change when adding / removing individuals. In one case, your clustering solution will likely mostly reflect the presence of identical genotypes. In the second case, clusters will give an account of the diversity between unique genotypes. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 13:04, Adrien Rieux wrote: > Hi there, > > I?ve got a question regarding the assessment of genetic structure from > microsatellite data using the DAPC method. My dataset contains around 30% > of repeated genotypes. I observe different and contrasted results (BIC as a > function of the number of clusters) when I keep or exclude repeated > genotypes (find.clusters function). Has someone ever experienced this > situation and how would you explain it ? I would have predicted that > finding the optimal number of clusters should not be influenced by repeated > genotypes as the DAPC is only based on the variation between genotypes. Is > there a general recommendation whether keeping or excluding repeated > genotypes when performing DAPC ? > > > Cheers, > > Adrien > > -- > > Adrien RIEUX > CIRAD - Dpt BIOS - UMR PVBMT > Tel: 0262499219 > https://adrienrieux.wordpress.com/home/ > > > _______________________________________________ > 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 thibautjombart at gmail.com Mon Apr 24 15:43:29 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 14:43:29 +0100 Subject: [adegenet-forum] Combining SNP and microsatellites markers in a single DAPC In-Reply-To: <58FDEB4B.9040104@cirad.fr> References: <58FDEB4B.9040104@cirad.fr> Message-ID: Hi again, the annoying answer is: yes, and no. Several options you can explore: 1. extract tables using 'tab', cbind them, and run the analysis on the new table: caveat: the table with the larger variance (typically the largest one) will have a stronger weight in the analysis 2. do the above, but standardize the two tables before binding them, e.g. by dividing them by the total inertia (sum of all variances) 3. before going for a single analysis, run separate analyses and look for common structures using a coinertia. See ?ade4::cointertia for more information. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 13:10, Adrien Rieux wrote: > Hi there, > > > > Is there a way to combine microsatellite and SNP data in a single DAPC ? I > do observe striking difference in the genetic structure independently > measured by both type of markers and I?d be keen, if possible, to see what > I get when both information are combined. I should tell that I only have > SNP data for a subset of the samples that were genotyped with > microsatellites. > > > > Cheers, > > > > Adrien > > -- > > Adrien RIEUX > CIRAD - Dpt BIOS - UMR PVBMT > Tel: 0262499219 > https://adrienrieux.wordpress.com/home/ > > > _______________________________________________ > 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 rb951092 at dal.ca Mon Apr 24 16:32:19 2017 From: rb951092 at dal.ca (Robert Fairweather) Date: Mon, 24 Apr 2017 14:32:19 +0000 Subject: [adegenet-forum] Reading a genepop file with adegenet Message-ID: Dear Forum, I am having some trouble importing my genepop file into adegenet using the read.genepop function. I have set the ncode argument to 3 to reflect the the character format of my SNP data (eg 001003) but still receive the error "some alleles are not encoded for by three characters" The error persists even with the default ncode parameter and a two character format used. Missing data is coded for as 000000 (or 0000 in 2 character format) and upon comparison with the nancycats file I cannot see any differences. Are you able to help me out? I have attached the file. Many thanks, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GENEPOP-54_pops-796_loci.gen Type: application/octet-stream Size: 424286 bytes Desc: GENEPOP-54_pops-796_loci.gen URL: From jose.andres at usask.ca Mon Apr 24 16:58:45 2017 From: jose.andres at usask.ca (Andres, Jose) Date: Mon, 24 Apr 2017 14:58:45 +0000 Subject: [adegenet-forum] supplementary individual analyses: install devol error In-Reply-To: References: <52c5-58eb7a80-13-5f00e780@31578948> <1492802567563.5773@usask.ca>, Message-ID: <1493045924932.30957@usask.ca> Hi Thibaut, I Just tried to install devtools from my Xquartz (i.e. X11) using a vanilla R (3.4.0) session. Unfortunately, I still get the same error. Any thoughts? Thanks a lot! /Jose ________________________________ From: Thibaut Jombart Sent: Monday, April 24, 2017 7:27 AM To: Andres, Jose Cc: adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] supplementary individual analyses: install devol error Hi Jose this looks like a devtools issue. Can you please try with the current version of R, using a vanilla session (R --vanilla)? Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 21 April 2017 at 20:22, Andres, Jose > wrote: Hi there, I am working on the assignment of supplementary individuals to one of my previous DAPC analyses. Because the know issues with the predict.dapc of the repository version (2.0.1) I'd like to use the devol version of Adegenet. Unfortunately, my compilation fails because of the following error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLin site:lists.r-forge.r-project.org/pipermail/adegenet-forum/ ERROR: compilation failed for package 'adegenet' * removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' * restoring previous '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' Any suggestions on how to fix this? I am using R 3.3.2 GUI 1.68 Mavericks build (7288) under a MacOC Sierra 10.12 Thanks! /Jose Andres _______________________________________________ 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 thibautjombart at gmail.com Mon Apr 24 17:06:11 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 16:06:11 +0100 Subject: [adegenet-forum] Reading a genepop file with adegenet In-Reply-To: References: Message-ID: Hello, upon inspection, I think your file is corrupt - there are two rogue '00000000' (8 times 0). After replacing these and specifying ncode = 3 it reads fine. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 15:32, Robert Fairweather wrote: > Dear Forum, > I am having some trouble importing my genepop file into adegenet using the > read.genepop function. I have set the ncode argument to 3 to reflect the > the character format of my SNP data (eg 001003) but still receive the error > "some alleles are not encoded for by three characters" > The error persists even with the default ncode parameter and a two > character format used. Missing data is coded for as 000000 (or 0000 in 2 > character format) and upon comparison with the nancycats file I cannot see > any differences. Are you able to help me out? I have attached the file. > Many thanks, > Robert > > > _______________________________________________ > 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 thibautjombart at gmail.com Mon Apr 24 17:07:26 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 16:07:26 +0100 Subject: [adegenet-forum] supplementary individual analyses: install devol error In-Reply-To: <1493045924932.30957@usask.ca> References: <52c5-58eb7a80-13-5f00e780@31578948> <1492802567563.5773@usask.ca> <1493045924932.30957@usask.ca> Message-ID: Can you post an issue on github, copy-paste the results of the install, and add your session info? Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 15:58, Andres, Jose wrote: > Hi Thibaut, > > I Just tried to install devtools from my Xquartz (i.e. X11) using a > vanilla R (3.4.0) session. Unfortunately, I still get the same error. Any > thoughts? > > > Thanks a lot! > > /Jose > > > ------------------------------ > *From:* Thibaut Jombart > *Sent:* Monday, April 24, 2017 7:27 AM > *To:* Andres, Jose > *Cc:* adegenet-forum at lists.r-forge.r-project.org > *Subject:* Re: [adegenet-forum] supplementary individual analyses: > install devol error > > Hi Jose > > this looks like a devtools issue. Can you please try with the current > version of R, using a vanilla session (R --vanilla)? > > Best > Thibaut > > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College > London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 <+44%2020%207594%203658> > > On 21 April 2017 at 20:22, Andres, Jose wrote: > >> Hi there, >> I am working on the assignment of supplementary individuals to one of >> my previous DAPC analyses. Because the know issues with the predict.dapc of >> the repository version (2.0.1) I'd like to use the devol version of >> Adegenet. Unfortunately, my compilation fails because of the following >> error: >> >> invalid active developer path (/Library/Developer/CommandLineTools), >> missing xcrun at: /Library/Developer/CommandLin site: >> lists.r-forge.r-project.org/pipermail/adegenet-forum/ >> >> ERROR: compilation failed for package ?adegenet? >> * removing ?/Library/Frameworks/R.framework/Versions/3.3/Resources/ >> library/adegenet? >> * restoring previous ?/Library/Frameworks/R.framewo >> rk/Versions/3.3/Resources/library/adegenet? >> >> Any suggestions on how to fix this? I am using R 3.3.2 GUI 1.68 Mavericks >> build (7288) under a MacOC Sierra 10.12 >> >> Thanks! >> >> >> /Jose Andres >> >> _______________________________________________ >> 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 kamvarz at science.oregonstate.edu Mon Apr 24 17:39:43 2017 From: kamvarz at science.oregonstate.edu (Zhian Kamvar) Date: Mon, 24 Apr 2017 10:39:43 -0500 Subject: [adegenet-forum] supplementary individual analyses: install devol error In-Reply-To: References: Message-ID: <947E0C25-9C89-4191-8FBB-801944EFF69F@science.oregonstate.edu> Hi, The error you get suggests that you need to install/reset command line tools. Here's what I got when I did a google search for the error: https://apple.stackexchange.com/a/254381 Go to your Terminal.app and type: xcode-select --install You should then be able to install adegenet after that. ----- Zhian N. Kamvar, Ph. D. Postdoctoral Researcher (Everhart Lab) Department of Plant Pathology University of Nebraska-Lincoln > > Date: Mon, 24 Apr 2017 14:58:45 +0000 > From: "Andres, Jose" > To: Thibaut Jombart > Cc: "adegenet-forum at lists.r-forge.r-project.org" > > Subject: Re: [adegenet-forum] supplementary individual analyses: > install devol error > Message-ID: <1493045924932.30957 at usask.ca> > Content-Type: text/plain; charset="iso-8859-1" > > Hi Thibaut, > > I Just tried to install devtools from my Xquartz (i.e. X11) using a vanilla R (3.4.0) session. Unfortunately, I still get the same error. Any thoughts? > > > Thanks a lot! > > /Jose > > > > ________________________________ > From: Thibaut Jombart > Sent: Monday, April 24, 2017 7:27 AM > To: Andres, Jose > Cc: adegenet-forum at lists.r-forge.r-project.org > Subject: Re: [adegenet-forum] supplementary individual analyses: install devol error > > Hi Jose > > this looks like a devtools issue. Can you please try with the current version of R, using a vanilla session (R --vanilla)? > > Best > Thibaut > > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College London > Head of RECON: repidemicsconsortium.org > sites.google.com/site/thibautjombart/ > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 > > On 21 April 2017 at 20:22, Andres, Jose > wrote: > > Hi there, > I am working on the assignment of supplementary individuals to one of my previous DAPC analyses. Because the know issues with the predict.dapc of the repository version (2.0.1) I'd like to use the devol version of Adegenet. Unfortunately, my compilation fails because of the following error: > > invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLin site:lists.r-forge.r-project.org/pipermail/adegenet-forum/ > > ERROR: compilation failed for package 'adegenet' > * removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' > * restoring previous '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/adegenet' > > Any suggestions on how to fix this? I am using R 3.3.2 GUI 1.68 Mavericks build (7288) under a MacOC Sierra 10.12 > > Thanks! > > > > /Jose Andres > > _______________________________________________ > 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 thibautjombart at gmail.com Mon Apr 24 19:25:00 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 24 Apr 2017 18:25:00 +0100 Subject: [adegenet-forum] Reading a genepop file with adegenet In-Reply-To: References: Message-ID: I so want to say it is a super power.. but the truth is: 1. try opening your file running debug mode 2. in the guts of the read.genepop function, pull the temporary object storing genotypes 3. use table(nchar(x)) to see the distribution of the number of characters in all entries 4. found two rogue entries with 8 characters, identified them 5. then opened your file and looked for '00000000' A similar question would be: how did the rogue entry get there in the first place? ;) -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 17:29, Robert Fairweather wrote: > Hi Thibaut, > > Many thanks finding this, you are right, the file now reads fie. But how > did you find the two rogue values? The only way I could think would be to > scan the file by eye. > > Best, > > Robert > ------------------------------ > *From:* Thibaut Jombart > *Sent:* 24 April 2017 12:06:11 > *To:* Robert Fairweather > *Cc:* adegenet-forum at lists.r-forge.r-project.org > *Subject:* Re: [adegenet-forum] Reading a genepop file with adegenet > > Hello, > > upon inspection, I think your file is corrupt - there are two rogue > '00000000' (8 times 0). After replacing these and specifying ncode = 3 it > reads fine. > > Best > Thibaut > > > -- > Dr Thibaut Jombart > Lecturer, Department of Infectious Disease Epidemiology, Imperial College > London > Head of RECON: repidemicsconsortium.org > R Epidemics Consortium > repidemicsconsortium.org > The R Epidemics Consortium (RECON) assembles a group of international > experts in infectious disease modelling, Public Health, and software > development to create the ... > > > sites.google.com/site/thibautjombart/ > > Thibaut Jombart's webpage - Google Sites > > sites.google.com > Dr Thibaut Jombart MRC Centre for Outbreak Analysis and Modelling > Department of Infectious Disease Epidemiology Imperial College St Mary?s > Campus > > > github.com/thibautjombart > Twitter: @TeebzR > +44(0)20 7594 3658 <+44%2020%207594%203658> > > On 24 April 2017 at 15:32, Robert Fairweather wrote: > >> Dear Forum, >> I am having some trouble importing my genepop file into adegenet using >> the read.genepop function. I have set the ncode argument to 3 to reflect >> the the character format of my SNP data (eg 001003) but still receive the >> error "some alleles are not encoded for by three characters" >> The error persists even with the default ncode parameter and a two >> character format used. Missing data is coded for as 000000 (or 0000 in 2 >> character format) and upon comparison with the nancycats file I cannot see >> any differences. Are you able to help me out? I have attached the file. >> Many thanks, >> Robert >> >> >> _______________________________________________ >> 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 rb951092 at dal.ca Mon Apr 24 19:40:41 2017 From: rb951092 at dal.ca (Robert Fairweather) Date: Mon, 24 Apr 2017 17:40:41 +0000 Subject: [adegenet-forum] Reading a genepop file with adegenet In-Reply-To: References: , Message-ID: Hi Thibaut, Thanks for this, it will make my checking more efficient for the future. The rogue values most likely ocurred through some of my clumsy reformatting, although I am not sure exactly how. Best regards, Robert ________________________________ From: Thibaut Jombart Sent: 24 April 2017 14:25:00 To: Robert Fairweather; adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] Reading a genepop file with adegenet I so want to say it is a super power.. but the truth is: 1. try opening your file running debug mode 2. in the guts of the read.genepop function, pull the temporary object storing genotypes 3. use table(nchar(x)) to see the distribution of the number of characters in all entries 4. found two rogue entries with 8 characters, identified them 5. then opened your file and looked for '00000000' A similar question would be: how did the rogue entry get there in the first place? ;) -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 17:29, Robert Fairweather > wrote: Hi Thibaut, Many thanks finding this, you are right, the file now reads fie. But how did you find the two rogue values? The only way I could think would be to scan the file by eye. Best, Robert ________________________________ From: Thibaut Jombart > Sent: 24 April 2017 12:06:11 To: Robert Fairweather Cc: adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] Reading a genepop file with adegenet Hello, upon inspection, I think your file is corrupt - there are two rogue '00000000' (8 times 0). After replacing these and specifying ncode = 3 it reads fine. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org R Epidemics Consortium repidemicsconsortium.org The R Epidemics Consortium (RECON) assembles a group of international experts in infectious disease modelling, Public Health, and software development to create the ... sites.google.com/site/thibautjombart/ [https://sites.google.com/site/thibautjombart/_/rsrc/1386231344491/home/moi2.jpg?height=320&width=302] Thibaut Jombart's webpage - Google Sites sites.google.com Dr Thibaut Jombart MRC Centre for Outbreak Analysis and Modelling Department of Infectious Disease Epidemiology Imperial College St Mary?s Campus github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 24 April 2017 at 15:32, Robert Fairweather > wrote: Dear Forum, I am having some trouble importing my genepop file into adegenet using the read.genepop function. I have set the ncode argument to 3 to reflect the the character format of my SNP data (eg 001003) but still receive the error "some alleles are not encoded for by three characters" The error persists even with the default ncode parameter and a two character format used. Missing data is coded for as 000000 (or 0000 in 2 character format) and upon comparison with the nancycats file I cannot see any differences. Are you able to help me out? I have attached the file. Many thanks, Robert _______________________________________________ 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 dcrawford at rsmas.miami.edu Wed Apr 26 16:05:50 2017 From: dcrawford at rsmas.miami.edu (Crawford, Douglas L) Date: Wed, 26 Apr 2017 14:05:50 +0000 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population Message-ID: Good Morning, I must be missing something about an old thread (Fri Aug 8 11:54:08 CEST 2014) that appears to have a solution, but does not work for me. To restate the problem: I want to color individuals by population, but keep the optimal DAPC clusters. My data (CR_84) has 84 individuals from 6 ?populations" with 3,243 SNPs, BIC suggest 3 clusters. CR_84 is a GENLIGHT OBJECT // 84 genotypes, 3,243 binary SNPs, size: 504.5 Kb 28119 (0.1 %) missing data // Basic content @gen: list of 84 SNPbin @ploidy: ploidy of each individual (range: 2-2) // Optional content @ind.names: 84 individual labels @loc.names: 3243 locus labels @pop: population of each individual (group size range: 4-22) If I follow the previous advice (Fri Aug 8 11:54:08 CEST 2014) I get two different plots one that has the 3 groups colored by group and the 2nd is 6 groups colored by pop. #make a DAPC - this uses by optimum DAPC dapc1 <- dapc(CR_84, n.pca=7, n.da=5, grp$grp) # plot with groups used in DAPC scatter(dapc1) ## I get a scatter plot with 3 groups where 2 of the groups have individuals from 5 ?populations? that has 3 colors (by group) # plot with another group - the species ? ?species" was from the toy data set: microbov$other$spe # I used "grp=CR_84$pop" scatter(dapc1, grp=CR_84$pop) ## I get a scatter plot with 6 groups where 5 of the groups are scatter together. ##That is, I do not get the three groups with individuals colored by populations. What am I missing here? Any clarification would be great. Cheers Douglas ??************________*********???? Douglas L. Crawford Professor, Marine Biology & Ecology Rosenstiel School of Marine & Atmospheric Science University of Miami 4600 Rickenbacker Causeway Mami, FL 33149 305-421-4121 dcrawford at miami.edu http://www.funhe-evol.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Thu Apr 27 11:26:06 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Thu, 27 Apr 2017 10:26:06 +0100 Subject: [adegenet-forum] DAPC scatter plot and individual colour by population In-Reply-To: References: Message-ID: Hi there, I might have missed something, but I think what you get is what one would expect. I have run through a similar example with a genlight just to make sure there was nothing fishy. In short: # case1: You made a DAPC with 3 clusters; when plotting it you get three clusters # case2: If you provide grp = pop(CR_84), which has 6 clusters, then you get a plot with 6 groups (i.e. colored inertia ellipses, by default) Why would you expect 3 groups in the second case? Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 26 April 2017 at 15:05, Crawford, Douglas L wrote: > Good Morning, > I must be missing something about an old thread (Fri Aug 8 11:54:08 > CEST 2014) that appears to have a solution, but does not work for me. > To restate the problem: I want to color individuals by population, but keep > the optimal DAPC clusters. > My data (CR_84) has 84 individuals from 6 ?populations" with 3,243 SNPs, BIC > suggest 3 clusters. > CR_84 is a GENLIGHT OBJECT > // 84 genotypes, 3,243 binary SNPs, size: 504.5 Kb > 28119 (0.1 %) missing data > > // Basic content > @gen: list of 84 SNPbin > @ploidy: ploidy of each individual (range: 2-2) > > // Optional content > @ind.names: 84 individual labels > @loc.names: 3243 locus labels > @pop: population of each individual (group size range: 4-22) > > If I follow the previous advice (Fri Aug 8 11:54:08 CEST 2014) I get two > different plots one that has the 3 groups colored by group and the 2nd is 6 > groups colored by pop. > > #make a DAPC - this uses by optimum DAPC > dapc1 <- dapc(CR_84, n.pca=7, n.da=5, grp$grp) > > # plot with groups used in DAPC > scatter(dapc1) > ## I get a scatter plot with 3 groups where 2 of the groups have individuals > from 5 ?populations? that has 3 colors (by group) > > # plot with another group - the species ? ?species" was from the toy data > set: microbov$other$spe > # I used "grp=CR_84$pop" > > scatter(dapc1, grp=CR_84$pop) > ## I get a scatter plot with 6 groups where 5 of the groups are scatter > together. > ##That is, I do not get the three groups with individuals colored by > populations. > > What am I missing here? > Any clarification would be great. > > Cheers > Douglas > > > ??************________*********???? > Douglas L. Crawford > Professor, Marine Biology & Ecology > Rosenstiel School of Marine & Atmospheric Science > University of Miami > 4600 Rickenbacker Causeway > Mami, FL 33149 > 305-421-4121 > > dcrawford at miami.edu > http://www.funhe-evol.org/ > > > > _______________________________________________ > 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 s.harned at miami.edu Wed Apr 26 16:46:39 2017 From: s.harned at miami.edu (Harned, Sydney P.) Date: Wed, 26 Apr 2017 14:46:39 +0000 Subject: [adegenet-forum] scatterplot color by original population Message-ID: Hello, Someone posted this question a few years back but it never got answered. I have a scatter plot with 3 clusters, and the individuals in each come from different source populations. I want to color each point according to its source population, kind of like in this example: https://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650 Does anyone know how to go about this? I?m pretty new to RStudio so any help is appreciated. Sydney -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Thu Apr 27 11:45:16 2017 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Thu, 27 Apr 2017 10:45:16 +0100 Subject: [adegenet-forum] scatterplot color by original population In-Reply-To: References: Message-ID: Hi there, What analysis are you using? If this is in a DAPC context, I just answered a question which itself quoted a solution posted on this forum a while back ;) Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR +44(0)20 7594 3658 On 26 April 2017 at 15:46, Harned, Sydney P. wrote: > Hello, > > Someone posted this question a few years back but it never got answered. I > have a scatter plot with 3 clusters, and the individuals in each come from > different source populations. I want to color each point according to its > source population, kind of like in this example: > > https://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650 > > Does anyone know how to go about this? I?m pretty new to RStudio so any help > is appreciated. > > Sydney > > > _______________________________________________ > 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