From thibautjombart at gmail.com Thu Jun 2 17:35:19 2016 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Thu, 2 Jun 2016 16:35:19 +0100 Subject: [adegenet-forum] genetic data analysis in R short course, Glasgow 16-20 Aug 2016 Message-ID: Dear all, a quick message to advertise the 2nd instance of the short course on Genetic Data Analysis using R, which will take place this summer near Glasgow, on the shores of Loch Lomond, 16-20 August 2016. For more information, contacts and booking: http://prstatistics.com/course/genetic-data-analysis-using-r-gdar/ Feel free to circulate this ad wherever relevant, and sorry in advance about double-posting. Looking forward to meeting some of you under the Scottish sun! Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology Imperial College London https://sites.google.com/site/thibautjombart/ https://github.com/thibautjombart Twitter: @TeebzR -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikafontaine at gmail.com Fri Jun 3 16:44:15 2016 From: mikafontaine at gmail.com (michael fontaine) Date: Fri, 3 Jun 2016 16:44:15 +0200 Subject: [adegenet-forum] Missing data in sPCA Message-ID: Dear all, The function na.replace seems to have disappear from the last version of ADEGENET 2.0.1. Now, one can use scaleGen() or tab() to replace missing data by the ?mean?, for example. However the returned object is a frequency table. It seems that the spca() function does not accept frequencies since adegenet 2.0.0. What is the recommended procedure to replace missing data by the mean and conduct a sPCA? Furthermore, I am using the jitter function to put some noise around my coordinates. It worked very well in the former version. In this new version, the sPCA tells me that it has found duplicates. I have checked the coordinates with noise, and there are none. Not sure what?s going on. Is there any similar report from other user? I am looking forward you advices. Thanks in advance Michael -- ><((((?>`?.??.???`?.?.???`?...?><((((?>?. `?.??.???`?.?????`?.. ><((((?>`?.??.???`?.?.???`?...?><((((?> Groningen Institute for Evolutionary Life Sciences (GELIFES) University of Groningen Nijenborgh 7 9747 AG Groningen The Netherlands Office phone: (+31) (0)50 363 2146 Email: m.c.fontaine at rug.nl Google scholar?profile Researcher-ID (G-5350-2011) http://michaelcfontaine.wordpress.com _____________________________________________________________________________ Please, adopt an eco-attitude Consider it twice before printing this email -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eco-logo.gif Type: image/gif Size: 1222 bytes Desc: not available URL: From thibautjombart at gmail.com Wed Jun 8 19:48:45 2016 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Wed, 8 Jun 2016 18:48:45 +0100 Subject: [adegenet-forum] Missing data in sPCA In-Reply-To: References: Message-ID: Dear Michael, good point. I'll fix this tomorrow. I have posted an issue from your post: https://github.com/thibautjombart/adegenet/issues/143 Follow it to track progress. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology Imperial College London https://sites.google.com/site/thibautjombart/ https://github.com/thibautjombart Twitter: @TeebzR On 3 June 2016 at 15:44, michael fontaine wrote: > Dear all, > > The function na.replace seems to have disappear from the last version of > ADEGENET 2.0.1. > > Now, one can use scaleGen() or tab() to replace missing data by the > ?mean?, for example. However the returned object is a frequency table. It > seems that the spca() function does not accept frequencies since adegenet > 2.0.0. What is the recommended procedure to replace missing data by the > mean and conduct a sPCA? > > Furthermore, I am using the jitter function to put some noise around my > coordinates. It worked very well in the former version. In this new > version, the sPCA tells me that it has found duplicates. I have checked the > coordinates with noise, and there are none. Not sure what?s going on. > > Is there any similar report from other user? > > I am looking forward you advices. > > Thanks in advance > > Michael > -- > > ><((((?>`?.??.???`?.?.???`?...?><((((?>?. > `?.??.???`?.?????`?.. ><((((?>`?.??.???`?.?.???`?...?><((((?> > > Groningen Institute for Evolutionary Life Sciences (GELIFES) > University of Groningen > Nijenborgh 7 > 9747 AG Groningen > The Netherlands > > Office phone: (+31) (0)50 363 2146 > Email: m.c.fontaine at rug.nl > Google scholar profile > > Researcher-ID (G-5350-2011) > http://michaelcfontaine.wordpress.com > > _____________________________________________________________________________ > > > *Please, adopt an eco-attitude* > *Consider it twice before printing this email* > > > _______________________________________________ > 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: eco-logo.gif Type: image/gif Size: 1222 bytes Desc: not available URL: From swahuaxi at yahoo.com Mon Jun 13 15:02:24 2016 From: swahuaxi at yahoo.com (Stephen Attwood) Date: Mon, 13 Jun 2016 13:02:24 +0000 (UTC) Subject: [adegenet-forum] scaleGen error using method="binom" References: <1732222419.2075195.1465822944918.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> Dear All I am having a problem using scaleGen, so I tried going back to the adegenet tutorial and I get the same error: data(microbov)obj <- genind2genpop(microbov) X1 <- scaleGen(obj)X2 <- scaleGen(obj,met="bin")Error in .local(x, ...) : unused argument (met = "bin") I get the same error with my own data (I also tried method = "binary", method = "bin", etc) X1 is as expected, but X2 is obviously not assigned I have the following packages loaded:library(ade4) library(adegenet) library(spdep)library ("OpenStreetMap")library(ape) Using adegenet 2.0.2 and R version 3.2.5 (2016-04-14); platform x86_64-pc-linux-gnu If someone could suggest what I might have overlooked, that would be a great help - I am probably missing a package somewhere. I thought it would be a common problem, but I haven't found it on Google - perhaps the solution is so simple. At the moment it is eluding me. Thank you. Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.lustrik at biolitika.si Tue Jun 14 10:11:01 2016 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Tue, 14 Jun 2016 10:11:01 +0200 (CEST) Subject: [adegenet-forum] scaleGen error using method="binom" In-Reply-To: <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> References: <1732222419.2075195.1465822944918.JavaMail.yahoo.ref@mail.yahoo.com> <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> Message-ID: <33647855.412226.1465891861377.JavaMail.zimbra@biolitika.si> Hi, I have looked at the sources on GitHub but they don't reveal anything interesting. Digging up stuff from 2013 on CRAN, though, shows that the method (R matches "met" to this argument) has been omitted in the 1.3-8 version from May 2013. This argument is thus no longer available, unfortunately the documentation hasn't followed suit yet. I will open a ticket on GitHub so that this can be resolved, once and for all. Cheers, Roman ---- In god we trust, all others bring data. From: "Stephen Attwood" To: adegenet-forum at lists.r-forge.r-project.org Sent: Monday, June 13, 2016 3:02:24 PM Subject: [adegenet-forum] scaleGen error using method="binom" Dear All I am having a problem using scaleGen, so I tried going back to the adegenet tutorial and I get the same error: data(microbov) obj <- genind2genpop(microbov) X1 <- scaleGen(obj) X2 <- scaleGen(obj,met="bin") Error in .local(x, ...) : unused argument (met = "bin") I get the same error with my own data (I also tried method = "binary", method = "bin", etc) X1 is as expected, but X2 is obviously not assigned I have the following packages loaded: library(ade4) library(adegenet) library(spdep) library ("OpenStreetMap") library(ape) Using adegenet 2.0.2 and R version 3.2.5 (2016-04-14); platform x86_64-pc-linux-gnu If someone could suggest what I might have overlooked, that would be a great help - I am probably missing a package somewhere. I thought it would be a common problem, but I haven't found it on Google - perhaps the solution is so simple. At the moment it is eluding me. Thank you. Stephen _______________________________________________ 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 anne_dasilva at hotmail.com Tue Jun 14 15:07:42 2016 From: anne_dasilva at hotmail.com (anne DaSilva) Date: Tue, 14 Jun 2016 13:07:42 +0000 Subject: [adegenet-forum] adegenet and Multispati In-Reply-To: References: Message-ID: Dear all, I analyse spatial population structuration by the consideration of phenotypic traits with Multispati (ade4). I was wondering if it was possible (or just a dream...) to use the wonderful "colorplot" function of adegenet, but with Multispati results, to otbain a cloud of colour points on the map? Thanks a lot, All the best, Anne -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.lustrik at biolitika.si Tue Jun 14 15:37:08 2016 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Tue, 14 Jun 2016 15:37:08 +0200 (CEST) Subject: [adegenet-forum] adegenet and Multispati In-Reply-To: References: Message-ID: <37015651.417690.1465911428421.JavaMail.zimbra@biolitika.si> Hi Anne, did you have something like this in mind? library(ade4) data(mafragh) maf.xy <- mafragh$xy maf.flo <- mafragh$flo maf.listw <- nb2listw(neig2nb(mafragh$neig)) s.label(maf.xy, neig = mafragh$neig, clab = 0.75) maf.coa <- dudi.coa(maf.flo,scannf = FALSE) maf.coa.ms <- multispati(maf.coa, maf.listw, scannf = FALSE, nfposi = 2, nfnega = 2) library(adegenet) colorplot(mafragh$xy, maf.coa.ms$li, cex = 3) Cheers, Roman ---- In god we trust, all others bring data. From: "anne DaSilva" To: adegenet-forum at lists.r-forge.r-project.org Sent: Tuesday, June 14, 2016 3:07:42 PM Subject: [adegenet-forum] adegenet and Multispati Dear all, I analyse spatial population structuration by the consideration of phenotypic traits with Multispati (ade4). I was wondering if it was possible (or just a dream...) to use the wonderful "colorplot" function of adegenet, but with Multispati results, to otbain a cloud of colour points on the map? Thanks a lot, All the best, Anne _______________________________________________ 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 Jun 14 23:14:16 2016 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Tue, 14 Jun 2016 22:14:16 +0100 Subject: [adegenet-forum] scaleGen error using method="binom" In-Reply-To: <33647855.412226.1465891861377.JavaMail.zimbra@biolitika.si> References: <1732222419.2075195.1465822944918.JavaMail.yahoo.ref@mail.yahoo.com> <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> <33647855.412226.1465891861377.JavaMail.zimbra@biolitika.si> Message-ID: Hello, yes, this argument has been removed as it had no real use besides a cosmetic difference in the way of computing the variances (which were numerically the same with any method). Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology Imperial College London https://sites.google.com/site/thibautjombart/ https://github.com/thibautjombart Twitter: @TeebzR On 14 June 2016 at 09:11, Roman Lu?trik wrote: > Hi, > > I have looked at the sources on GitHub but they don't reveal anything > interesting. Digging up stuff from 2013 on CRAN, though, shows that the > method (R matches "met" to this argument) has been omitted in the 1.3-8 > version from May 2013. This argument is thus no longer available, > unfortunately the documentation hasn't followed suit yet. I will open a > ticket on GitHub so that this can be resolved, once and for all. > > Cheers, > Roman > > ---- > In god we trust, all others bring data. > > ------------------------------ > *From: *"Stephen Attwood" > *To: *adegenet-forum at lists.r-forge.r-project.org > *Sent: *Monday, June 13, 2016 3:02:24 PM > *Subject: *[adegenet-forum] scaleGen error using method="binom" > > Dear All > > I am having a problem using scaleGen, so I tried going back to the > adegenet tutorial and I get the same error: > > data(microbov) > obj <- genind2genpop(microbov) > X1 <- scaleGen(obj) > X2 <- scaleGen(obj,met="bin") > Error in .local(x, ...) : unused argument (met = "bin") > > I get the same error with my own data (I also tried method = "binary", > method = "bin", etc) > > X1 is as expected, but X2 is obviously not assigned > > I have the following packages loaded: > library(ade4) > library(adegenet) > library(spdep) > library ("OpenStreetMap") > library(ape) > > Using adegenet 2.0.2 and R version 3.2.5 (2016-04-14); platform > x86_64-pc-linux-gnu > > If someone could suggest what I might have overlooked, that would be a > great help - I am probably missing a package somewhere. I thought it would > be a common problem, but I haven't found it on Google - perhaps the > solution is so simple. At the moment it is eluding me. > > Thank you. > > Stephen > > _______________________________________________ > 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 roman.lustrik at biolitika.si Wed Jun 15 09:48:12 2016 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Wed, 15 Jun 2016 09:48:12 +0200 (CEST) Subject: [adegenet-forum] scaleGen error using method="binom" In-Reply-To: <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> References: <1732222419.2075195.1465822944918.JavaMail.yahoo.ref@mail.yahoo.com> <1732222419.2075195.1465822944918.JavaMail.yahoo@mail.yahoo.com> Message-ID: <663269787.433349.1465976892309.JavaMail.zimbra@biolitika.si> Hi Stephen, along with the answer provided in this thread, there's also an answer on GitHub . What adegenet tutorial are you referring to? Cheers, Roman ---- In god we trust, all others bring data. From: "Stephen Attwood" To: adegenet-forum at lists.r-forge.r-project.org Sent: Monday, June 13, 2016 3:02:24 PM Subject: [adegenet-forum] scaleGen error using method="binom" Dear All I am having a problem using scaleGen, so I tried going back to the adegenet tutorial and I get the same error: data(microbov) obj <- genind2genpop(microbov) X1 <- scaleGen(obj) X2 <- scaleGen(obj,met="bin") Error in .local(x, ...) : unused argument (met = "bin") I get the same error with my own data (I also tried method = "binary", method = "bin", etc) X1 is as expected, but X2 is obviously not assigned I have the following packages loaded: library(ade4) library(adegenet) library(spdep) library ("OpenStreetMap") library(ape) Using adegenet 2.0.2 and R version 3.2.5 (2016-04-14); platform x86_64-pc-linux-gnu If someone could suggest what I might have overlooked, that would be a great help - I am probably missing a package somewhere. I thought it would be a common problem, but I haven't found it on Google - perhaps the solution is so simple. At the moment it is eluding me. Thank you. Stephen _______________________________________________ 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 herrmann-m at uni-landau.de Mon Jun 27 14:40:25 2016 From: herrmann-m at uni-landau.de (herrmann-m at uni-landau.de) Date: Mon, 27 Jun 2016 14:40:25 +0200 Subject: [adegenet-forum] Order of SNPs biasing DAPC results? Message-ID: <9ADA9A2CB1EF44ADAD9EE5855C826081@MaikePC> Hi! I was performing pairwise DAPCs on a data set containing > 62.000 SNPs in 4 populations. Because of a problem with my PLINK input, my SNPs were initially in a ?wrong? order. When I noticed the error, I repeated the DAPC analysis with a correctly ordered input file, primarily to get correct SNP-IDs for the allele loadings. Thereby I noticed differences between the two analyses: Individual coordinates (dapc$ind.scores) and DAPC eigenvalues (dapc$eig) differed and allele loadings (dapc$var.contr) were also slightly different. The output of find.clusters was not different between the input files. My code: > data1 <- read.PLINK("file.raw", map.file = NULL, quiet = FALSE, chunkSize = 1000, parallel = FALSE) > clust1 <- find.clusters(data1, stat="BIC", choose.n.clust=TRUE, max.n.clust=10, n.iter=1e5, n.start=10, pca.select="percVar", perc.pca=100, glPca=NULL, parallel=FALSE) > dapc1 <- dapc(data1, pop = clust1$grp, pca.select = "percVar", perc.pca = 100, parallel=FALSE) > loadings1 <- dapc1$var.contr > ld1 <- loadings1[order(loadings1[,1], decreasing = TRUE),] > write.table(ld1, file = "PW1_loadings_rc.txt") DAPC Output 1 (unsorted SNPs): $eig (eigenvalues): 8.495e+32 vector length content $ind.scores LD1 Cluster1 -8.413869e+15 #(same value for all 6 individuals in this cluster) Cluster2 8.413869e+15 #(same value for all 6 individuals in this cluster) $var.contr (in decreasing order) [line 72] "60732" 0.000171552889525985 [line 72] "2993" 0.000154678359525634 [line 72] "976" 0.000152483049214648 DAPC Output 2 (correctly sorted SNPs): $eig (eigenvalues): 4.459e+33 vector length content $ind.scores LD1 Cluster1 -1.927727e+16 #(same value for all 6 individuals in this cluster) Cluster2 1.927727e+16 #(same value for all 6 individuals in this cluster) $var.contr (in decreasing order) [line 72] "60819" 0.000171552889525985 [line 73] "42995" 0.000154678359525636 [line 74] "697" 0.000152483049214647 (-> of course the SNP-IDs don?t match, but the values in each line of the output should correspond ) I used exactly the same code and the only difference between the analyses was the sorting of SNPs. I realize that the difference in allele loadings (my main interest) is marginal but I was surprised to find differences in the first place. Is that normal? Shouldn?t these results be independent from the sorting of SNPs? Could it be because of rounding errors? Thank you for your time! Cheers, Maike -------------- next part -------------- An HTML attachment was scrubbed... URL: