From r.das at cgiar.org Sat Sep 12 08:17:54 2020 From: r.das at cgiar.org (Das, Roma (ICRISAT-IN)) Date: Sat, 12 Sep 2020 06:17:54 +0000 Subject: [adegenet-forum] Change color in scatter.dapc() Message-ID: Hello, I have a scatter plot with 20 groups (using on find.cluster() using 1200 individuals). However I want to use only two color for individuals in same scatter plot with 20 groups. Thanks in advance. Regards, Roma -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.lustrik at biolitika.si Sat Sep 12 08:57:58 2020 From: roman.lustrik at biolitika.si (=?UTF-8?Q?Roman_Lu=C5=A1trik?=) Date: Sat, 12 Sep 2020 08:57:58 +0200 Subject: [adegenet-forum] Change color in scatter.dapc() In-Reply-To: References: Message-ID: <174811b3836.10a580c07122139.4636754489430228479@biolitika.si> By now you probably know the membership of each individual. Just assign them colors and pass that to the `col` parameter. library(adegenet) data(H3N2) dapc1 <- dapc(H3N2, pop=H3N2$other$epid, n.pca=30,n.da=6) custom.cols <- sample(c("red", "black"),                       size = nInd(H3N2),                       prob = c(0.2, 0.8),                       replace = TRUE) scatter(dapc1, col = custom.cols) Cheers, Roman ---  “If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale ---- On Sat, 12 Sep 2020 08:17:54 +0200 Das, Roma (ICRISAT-IN) wrote ---- Hello, I have a scatter plot with 20 groups (using on find.cluster() using 1200 individuals). However I want to use only two color for individuals in same scatter plot with 20 groups.   Thanks in advance.   Regards, Roma _______________________________________________ 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 Sat Sep 12 12:26:54 2020 From: roman.lustrik at biolitika.si (=?UTF-8?Q?Roman_Lu=C5=A1trik?=) Date: Sat, 12 Sep 2020 12:26:54 +0200 Subject: [adegenet-forum] Change color in scatter.dapc() In-Reply-To: <174811b3836.10a580c07122139.4636754489430228479@biolitika.si> References: <174811b3836.10a580c07122139.4636754489430228479@biolitika.si> Message-ID: <17481da805f.f9169df3125374.1689857254710732361@biolitika.si> It would seem it is currently impossible to color points individually. To do that, you'll have to either make a new version of the plot or draw the figure anew. https://github.com/thibautjombart/adegenet/blob/e7e57ac38132e3104035c386310d7b571e1d2c42/R/dapc.R#L584 Cheers, Roman ---  “If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale ---- On Sat, 12 Sep 2020 08:57:58 +0200 Roman Luštrik wrote ---- By now you probably know the membership of each individual. Just assign them colors and pass that to the `col` parameter. library(adegenet) data(H3N2) dapc1 <- dapc(H3N2, pop=H3N2$other$epid, n.pca=30,n.da=6) custom.cols <- sample(c("red", "black"),                       size = nInd(H3N2),                       prob = c(0.2, 0.8),                       replace = TRUE) scatter(dapc1, col = custom.cols) Cheers, Roman ---  “If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale ---- On Sat, 12 Sep 2020 08:17:54 +0200 Das, Roma (ICRISAT-IN) wrote ---- Hello, I have a scatter plot with 20 groups (using on find.cluster() using 1200 individuals). However I want to use only two color for individuals in same scatter plot with 20 groups.   Thanks in advance.   Regards, Roma _______________________________________________ adegenet-forum mailing list mailto: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 said_wali at hotmail.com Wed Sep 30 10:28:47 2020 From: said_wali at hotmail.com (Said D.) Date: Wed, 30 Sep 2020 08:28:47 +0000 Subject: [adegenet-forum] DAPC axes Message-ID: Hi everyone, I googled a lot (Maybe I was not lucky enough) but I could not find a real explanation out the axes of the DAPC scatter plot. Should I call them PC1 and PC2 or LD1 and LD2? Here they call the axes LD1 and LD2 https://grunwaldlab.github.io/Population_Genetics_in_R/clustering_plot.html It is also a pity that the original DAPC scatter plot is not showing the scale. Thank you. Said -------------- next part -------------- An HTML attachment was scrubbed... URL: From burtoand at oregonstate.edu Wed Sep 23 21:17:50 2020 From: burtoand at oregonstate.edu (Burton, Andrea Rae) Date: Wed, 23 Sep 2020 12:17:50 -0700 Subject: [adegenet-forum] DAPC Loading Message-ID: Hello, I was wondering how important the absolute value of loading is. Compared to other papers and the tutorial, the loading values I get are very low (~0.00015). Does this indicate that there isn't much variation between loads for my data set, or do things like large sample size attribute? Thank you, Andrea -- PhD Candidate Integrative Biology Department Oregon State University Pronouns: she/her/hers _,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_ Oregon State University in Corvallis, OR, is located within the traditional homelands of the Mary's River or Ampinefu Band of the Kalapuya. Following the Willamette Valley Treaty of 1855 (Kalapuya etc. Treaty), Kalapuya people were forcibly removed to reservations in Western Oregon. Today, living descendants of the Kalapuya are a part of the Confederated Tribes of Grand Ronde Community of Oregon and the Confederated Tribes of the Siletz Indians. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jboyd46 at gmail.com Wed Sep 23 21:44:42 2020 From: jboyd46 at gmail.com (Janice Boyd) Date: Wed, 23 Sep 2020 14:44:42 -0500 Subject: [adegenet-forum] using snapclust Message-ID: Hi: When I went looking for information on snapclust, I found this warning: (https://rdrr.io/cran/adegenet/man/snapclust.html) DESCRIPTION Do not use. We work on that stuff. Contact us if interested. How should I interpret this? Does it mean don't use snapclust? Janice Boyd Texas A&M -------------- next part -------------- An HTML attachment was scrubbed... URL: From cathy.bouffartigue at inrae.fr Wed Sep 30 10:34:37 2020 From: cathy.bouffartigue at inrae.fr (Cathy Bouffartigue) Date: Wed, 30 Sep 2020 08:34:37 +0000 Subject: [adegenet-forum] DAPC axes In-Reply-To: References: Message-ID: Hi Said, DAPC is a PCA on which you do a discriminant analysis. So the PCA gives you PCs (axes) on which you apply a discriminant analysis (LDs axes). The basic plot of the DAPC is the result of the discriminant analyses on the PCs. Therefore the axes of the basic plot are LDs Good luck Cathy De : adegenet-forum De la part de Said D. Envoyé : mercredi 30 septembre 2020 10:29 À : adegenet-forum at lists.r-forge.r-project.org Objet : [adegenet-forum] DAPC axes Hi everyone, I googled a lot (Maybe I was not lucky enough) but I could not find a real explanation out the axes of the DAPC scatter plot. Should I call them PC1 and PC2 or LD1 and LD2? Here they call the axes LD1 and LD2 https://grunwaldlab.github.io/Population_Genetics_in_R/clustering_plot.html It is also a pity that the original DAPC scatter plot is not showing the scale. Thank you. Said -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Wed Sep 30 11:16:45 2020 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Wed, 30 Sep 2020 10:16:45 +0100 Subject: [adegenet-forum] DAPC Loading In-Reply-To: References: Message-ID: Hi there the squared loadings sum to 1, which should give you a scale for the contributions of individual loadings. From what you describe, it seems that indeed no specific allele has a strong contribution to the diversity highlighted by DAPC. Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London UK Public Health Rapid Support Team President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Wed, 30 Sep 2020 at 10:14, Burton, Andrea Rae wrote: > Hello, > > I was wondering how important the absolute value of loading is. Compared > to other papers and the tutorial, the loading values I get are very low > (~0.00015). Does this indicate that there isn't much variation between > loads for my data set, or do things like large sample size attribute? > > Thank you, > > Andrea > > -- > PhD Candidate > Integrative Biology Department > Oregon State University > Pronouns: she/her/hers > _,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_,~"(_ > Oregon State University in Corvallis, OR, is located within the > traditional homelands of the Mary's River or Ampinefu Band of the Kalapuya. > Following the Willamette Valley Treaty of 1855 (Kalapuya etc. Treaty), > Kalapuya people were forcibly removed to reservations in Western Oregon. > Today, living descendants of the Kalapuya are a part of the Confederated > Tribes of Grand Ronde Community of Oregon and > the Confederated Tribes of the Siletz Indians. > _______________________________________________ > 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 Wed Sep 30 11:21:37 2020 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Wed, 30 Sep 2020 10:21:37 +0100 Subject: [adegenet-forum] DAPC axes In-Reply-To: References: Message-ID: Dear Said, both terminologies are correct: LDs are merely PCs of a discriminant analysis. But as DAPC has 2 sets of PCs, one of the initial PCA, then one for the follow-up discriminant analysis, LDs will be less ambiguous. As for the scale on scatterplots of DAPC: it is disabled by default as not usually used, but you can add a grid using grid = TRUE. See ?scatter.dapc for further options. Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London UK Public Health Rapid Support Team President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Wed, 30 Sep 2020 at 09:29, Said D. wrote: > Hi everyone, > I googled a lot (Maybe I was not lucky enough) but I could not find a real > explanation out the axes of the DAPC scatter plot. > Should I call them PC1 and PC2 or LD1 and LD2? > Here they call the axes LD1 and LD2 > https://grunwaldlab.github.io/Population_Genetics_in_R/clustering_plot.html > > It is also a pity that the original DAPC scatter plot is not showing the > scale. > Thank you. > Said > > > _______________________________________________ > 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 Wed Sep 30 11:26:42 2020 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Wed, 30 Sep 2020 10:26:42 +0100 Subject: [adegenet-forum] using snapclust In-Reply-To: References: Message-ID: Dear Janice this was entirely my fault. After spending time developing the method, getting it published, documenting it in a separate vignette, I managed to miss that warning in the manpage of the method. I have sent a PR to fix this in the devel version of adegenet back in June: https://github.com/thibautjombart/adegenet/pull/287 It has not gone through (some automated tests errored), will check why. Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London UK Public Health Rapid Support Team President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Wed, 30 Sep 2020 at 10:14, Janice Boyd wrote: > Hi: When I went looking for information on snapclust, I found this > warning: (https://rdrr.io/cran/adegenet/man/snapclust.html) > DESCRIPTION > Do not use. We work on that stuff. Contact us if interested. > > How should I interpret this? Does it mean don't use snapclust? > > Janice Boyd > Texas A&M > _______________________________________________ > 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 said_wali at hotmail.com Wed Sep 30 12:43:25 2020 From: said_wali at hotmail.com (Said D.) Date: Wed, 30 Sep 2020 10:43:25 +0000 Subject: [adegenet-forum] DAPC axes In-Reply-To: References: , Message-ID: Dear Thibaut, dear Cathy, thank you for the quick reply. Now it is clear to me. With respect to "grid = TRUE", it is only showing the grid but not the labels of the axis ticks. Till now I was not able to find it. Thank you. Said ________________________________ Von: Thibaut Jombart Gesendet: Mittwoch, 30. September 2020 11:21 An: Said D. Cc: adegenet-forum at lists.r-forge.r-project.org Betreff: Re: [adegenet-forum] DAPC axes Dear Said, both terminologies are correct: LDs are merely PCs of a discriminant analysis. But as DAPC has 2 sets of PCs, one of the initial PCA, then one for the follow-up discriminant analysis, LDs will be less ambiguous. As for the scale on scatterplots of DAPC: it is disabled by default as not usually used, but you can add a grid using grid = TRUE. See ?scatter.dapc for further options. Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London UK Public Health Rapid Support Team President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Wed, 30 Sep 2020 at 09:29, Said D. > wrote: Hi everyone, I googled a lot (Maybe I was not lucky enough) but I could not find a real explanation out the axes of the DAPC scatter plot. Should I call them PC1 and PC2 or LD1 and LD2? Here they call the axes LD1 and LD2 https://grunwaldlab.github.io/Population_Genetics_in_R/clustering_plot.html It is also a pity that the original DAPC scatter plot is not showing the scale. Thank you. Said _______________________________________________ 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 Wed Sep 30 13:02:36 2020 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Wed, 30 Sep 2020 12:02:36 +0100 Subject: [adegenet-forum] DAPC axes In-Reply-To: References: Message-ID: Re the grid: it was a choice in the plotting design of ade4 to display the mesh of the grid at the top right corner of the graph, rather than annotations + tick marks. You can always make custom graphs e.g. using ggplot2. Best of luck in your analyses Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London UK Public Health Rapid Support Team President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Wed, 30 Sep 2020 at 11:43, Said D. wrote: > Dear Thibaut, dear Cathy, > thank you for the quick reply. > Now it is clear to me. > With respect to "grid = TRUE", it is only showing the grid but not the > labels of the axis ticks. > Till now I was not able to find it. > Thank you. > Said > > > > ------------------------------ > *Von:* Thibaut Jombart > *Gesendet:* Mittwoch, 30. September 2020 11:21 > *An:* Said D. > *Cc:* adegenet-forum at lists.r-forge.r-project.org < > adegenet-forum at lists.r-forge.r-project.org> > *Betreff:* Re: [adegenet-forum] DAPC axes > > Dear Said, > > both terminologies are correct: LDs are merely PCs of a discriminant > analysis. But as DAPC has 2 sets of PCs, one of the initial PCA, then one > for the follow-up discriminant analysis, LDs will be less ambiguous. > > As for the scale on scatterplots of DAPC: it is disabled by default as not > usually used, but you can add a grid using grid = TRUE. See ?scatter.dapc > for further options. > > Best > Thibaut > > -- > Dr Thibaut Jombart > Associate Professor in Outbreak Analytics, London School of Hygiene and > Tropical Medicine > Senior Lecturer in Genetic Analysis, Imperial College London > UK Public Health Rapid Support Team > President of RECON: repidemicsconsortium.org > > https://thibautjombart.netlify.com > > Twitter: @TeebzR > > > On Wed, 30 Sep 2020 at 09:29, Said D. wrote: > > Hi everyone, > I googled a lot (Maybe I was not lucky enough) but I could not find a real > explanation out the axes of the DAPC scatter plot. > Should I call them PC1 and PC2 or LD1 and LD2? > Here they call the axes LD1 and LD2 > https://grunwaldlab.github.io/Population_Genetics_in_R/clustering_plot.html > > > It is also a pity that the original DAPC scatter plot is not showing the > scale. > Thank you. > Said > > > _______________________________________________ > 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: