<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:13px"><div id="yiv9268970583"><div id="yui_3_16_0_ym19_1_1508369539247_14296"><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:13px;" id="yui_3_16_0_ym19_1_1508369539247_14295"><div class="yiv9268970583qtdSeparateBR" id="yui_3_16_0_ym19_1_1508369539247_14436" dir="ltr">Dear all,<br id="yui_3_16_0_ym19_1_1508369539247_14597">Good news!! I did it making a little change in the s.class command. Oliver, your tip helped me a lot. Thanks all.<br id="yui_3_16_0_ym19_1_1508369539247_14598"><br id="yui_3_16_0_ym19_1_1508369539247_14599">Best regards,<br id="yui_3_16_0_ym19_1_1508369539247_14600">Lucas Veiga Ayres Pimenta<br id="yui_3_16_0_ym19_1_1508369539247_14601"><br></div></div><div id="yiv9268970583DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #D3D4DE;" id="yui_3_16_0_ym19_1_1508369539247_14429">
<tbody id="yui_3_16_0_ym19_1_1508369539247_14428"><tr id="yui_3_16_0_ym19_1_1508369539247_14427">
<td style="width:55px;padding-top:18px;"><a rel="nofollow" target="_blank" href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width:46px;min-height:29px;" data-id="ff2bd12b-9a94-4762-45da-f54baf1f6f49"></a></td>
<td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial, Helvetica, sans-serif;line-height:18px;" id="yui_3_16_0_ym19_1_1508369539247_14426">Livre de vírus. <a rel="nofollow" target="_blank" href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea;" id="yui_3_16_0_ym19_1_1508369539247_14682">www.avg.com</a>. </td>
</tr>
</tbody></table>
<a rel="nofollow" href="https://mail.yahoo.com/?.intl=br&.lang=pt-BR&.partner=none&.src=fp&soc_src=mail&soc_trk=ma#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"></a></div></div></div><div class=".yiv9268970583yahoo_quoted"> <div style="font-family:times new roman, new york, times, serif;font-size:13px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"><font size="2" face="Arial"> Em Terça-feira, 17 de Outubro de 2017 8:23, Shannon O'Leary <shannon.j.oleary@gmail.com> escreveu:<br></font></div> <br><br> <div class="yiv9268970583y_msg_container"><div id="yiv9268970583"><div dir="ltr">Hi Lucas,<div><br></div><div>Try this on for size: </div><div><br></div><div>From your description it looks like you have a data set for which you have the following information:</div><div><br></div><div>SAMPLE-ID | POPULATION (CROP) | GENOTYPES</div><div><br></div><div>you read in the genotypes as a genind object (gen) and your can read in your sample information as a dataframe containing Sample_ID and POP information (SampleInfo)</div><div><br></div><div>You then ran k-means clustering/DAPC on your data set, something like this</div><div><br></div><div><div>grp <- find.clusters.genind(gen, n.pca = 200,</div><div> stat = "BIC", choose.n.clust = FALSE, criterion = "min",</div><div> max.n.clust = 40)</div></div><div><br></div><div><div>dapc <-dapc(gen, grp$grp, n.pca = 50, n.da = 2)</div></div><div><br></div><div>You can pull the information on which sample was assigned to which cluster like so:<br></div><div><br></div><div><div>clusters <- as.data.frame(grp$grp) %>%</div><div> rownames_to_column("SAMPLE_ID") %>%</div><div> rename(CLUSTER = `grp$grp`)</div><div><br></div><div>You can add this information to your SampleInfo dataframe using dplyr::left_join()</div><div><br></div><div>SampleInfo <- left_join(SampleInfo, clusters, by = "SAMPLE_ID")</div><div><br></div><div>resulting in a dataframe with 3 columns: SAMPLE_ID | CROP | CLUSTER.</div><div><br></div><div>Now you can pull the coordinates from the dapc and also add them to that data frame as well:</div><div><br></div><div><div>DAPC_Ind <- as.data.frame(dapc$ind.coord) %>%</div><div> rownames_to_column("SAMPLE_ID")</div><div><br></div><div>SampleInfo <- left_join(SampleInfo, DAPC_Ind, by = "SAMPLE_ID")</div></div><div><br></div><div>Now you have a data frame that should look something like this</div><div><br></div><div>SAMPLE_ID | CROP | CLUSTER | LD1 | LD2 ...</div><div><br></div><div>Now you can plot your data using ggplot and you can adjust the shape and color of your data points as you please, for example:</div><div><br></div><div>ggplot(SampleInfo, aes(x = LD1, y = LD2), color = CROP, shape = CLUSTER) +</div><div>geom_point()</div><div><br></div><div>Is this what you are trying to achieve? You'll have to tweak the "code" I've thrown in here to fit your data (column names etc).</div><div><br></div><div><br></div><div>Shannon</div><div class="yiv9268970583gmail_extra"><br clear="all"><div><div class="yiv9268970583gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font face="arial, helvetica, sans-serif" size="1"><span style="color:rgb(84,84,84);">><(((jº> </span><span style="color:rgb(84,84,84);">><(((jº> </span><span style="color:rgb(84,84,84);">><(((jº> </span><span style="color:rgb(84,84,84);">><(((jº> </span></font><span style="color:rgb(84,84,84);font-family:arial, helvetica, sans-serif;font-size:x-small;">><(((jº> </span><span style="color:rgb(84,84,84);font-family:arial, helvetica, sans-serif;font-size:x-small;">><(((jº> </span><span style="color:rgb(84,84,84);font-family:arial, helvetica, sans-serif;font-size:x-small;"> </span><span style="color:rgb(84,84,84);font-family:arial, helvetica, sans-serif;font-size:x-small;">><(((jº></span><span style="color:rgb(84,84,84);font-family:arial, helvetica, sans-serif;font-size:x-small;"> </span></div><div><span style="color:rgb(84,84,84);font-family:Helvetica, arial, sans-serif;font-size:16px;"><br></span></div><div><span style="font-size:12.8px;">Shannon J. O'Leary</span><br></div><div>Postdoctoral Research Associate</div><div>Marine Genomics Lab</div><div>Life Science Department</div><div>Texas A&M Corpus Christi</div></div></div></div></div></div></div></div>
<br><div class="yiv9268970583gmail_quote">On Mon, Oct 16, 2017 at 12:11 PM, <span dir="ltr"><<a rel="nofollow" ymailto="mailto:adegenet-forum-request@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-request@lists.r-forge.r-project.org">adegenet-forum-request@lists.r-forge.r-project.org</a>></span> wrote:<br><blockquote class="yiv9268970583gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">Send adegenet-forum mailing list submissions to<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum-request@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-request@lists.r-forge.r-project.org">adegenet-forum-request@lists. r-forge.r-project.org</a><br>
<br>
You can reach the person managing the list at<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum-owner@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-owner@lists.r-forge.r-project.org">adegenet-forum-owner@lists.r- forge.r-project.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of adegenet-forum digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Dots in the DAPC graphic (Lucas Veiga)<br>
<br>
<br>
------------------------------ ------------------------------ ----------<br>
<br>
Message: 1<br>
Date: Mon, 16 Oct 2017 17:10:49 +0000 (UTC)<br>
From: Lucas Veiga <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: Zhian Kamvar <<a rel="nofollow" ymailto="mailto:zkamvar@gmail.com" target="_blank" href="mailto:zkamvar@gmail.com">zkamvar@gmail.com</a>>,<br>
"<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>"<br>
<<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>><br>
Subject: Re: [adegenet-forum] Dots in the DAPC graphic<br>
Message-ID: <<a rel="nofollow" ymailto="mailto:1729769391.894921.1508173849615@mail.yahoo.com" target="_blank" href="mailto:1729769391.894921.1508173849615@mail.yahoo.com">1729769391.894921. 1508173849615@mail.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear All (Kamvar, Jombart and Roman),First, I would like to thank you all for spending a little of your time on my problem. Unfortunely, it was not possible to do what I want with commands that you showed me. I think that I will have to write very? carefully my work to explain my groups and my dots (haployd individuals) inside of the groups formed by DAPC analysis.?Obs: Kamvar, your command is very useful, but it was not possible to have dots with different colors or forms inside of the same group.<br>
<br>
Best regards,Lucas Veiga Ayres Pimenta<br>
<br>
Em Sexta-feira, 13 de Outubro de 2017 12:48, Zhian Kamvar <<a rel="nofollow" ymailto="mailto:zkamvar@gmail.com" target="_blank" href="mailto:zkamvar@gmail.com">zkamvar@gmail.com</a>> escreveu:<br>
<br>
<br>
Hi,<br>
The individual coordinates are in the @ind.coord slot of the DAPC object. You can use those to plot and color them with your desired population factor.<br>
I have recently come up with a ggplot2 solution for this:?<a rel="nofollow" target="_blank" href="https://github.com/everhartlab/sclerotinia-366/blame/v1.0/results/by-year.md#L508-L558">https://github.com/ everhartlab/sclerotinia-366/ blame/v1.0/results/by-year.md# L508-L558</a>, the results of which look like so:?<a rel="nofollow" target="_blank" href="https://github.com/everhartlab/sclerotinia-366/blob/v1.0/results/figures/by-year/dapc_plot-2.png">https://github.com/ everhartlab/sclerotinia-366/ blob/v1.0/results/figures/by- year/dapc_plot-2.png</a><br>
Hope that helps,Zhian<br>
-----Zhian N. Kamvar, Ph. D.Postdoctoral Researcher (Everhart Lab)Department of Plant PathologyUniversity of Nebraska-LincolnORCID:?0000- 0003-1458-7108<br>
<br>
<br>
<br>
<br>
On Oct 13, 2017, at 03:39 , <a rel="nofollow" ymailto="mailto:adegenet-forum-request@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-request@lists.r-forge.r-project.org">adegenet-forum-request@lists. r-forge.r-project.org</a> wrote:<br>
Send adegenet-forum mailing list submissions to<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum-request@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-request@lists.r-forge.r-project.org">adegenet-forum-request@lists. r-forge.r-project.org</a><br>
<br>
You can reach the person managing the list at<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum-owner@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum-owner@lists.r-forge.r-project.org">adegenet-forum-owner@lists.r- forge.r-project.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of adegenet-forum digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
??1. Re: Dots in the DAPC graphic (Lucas Veiga)<br>
??2. Re: Dots in the DAPC graphic (Lucas Veiga)<br>
??3. Re: Dots in the DAPC graphic (Roman Lu?trik)<br>
<br>
<br>
------------------------------ ------------------------------ ----------<br>
<br>
Message: 1<br>
Date: Thu, 12 Oct 2017 12:03:35 +0000 (UTC)<br>
From: Lucas Veiga <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>><br>
Cc: "<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>"<br>
<<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>><br>
Subject: Re: [adegenet-forum] Dots in the DAPC graphic<br>
Message-ID: <<a rel="nofollow" ymailto="mailto:1994389766.433362.1507809815326@mail.yahoo.com" target="_blank" href="mailto:1994389766.433362.1507809815326@mail.yahoo.com">1994389766.433362. 1507809815326@mail.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Roman,First, thank you for the help. Unfortunaly, apparently your command not worked for me. I will try explain better my situation. I work with phytopathology and the fungus that I work affects different crops (I have put in my input file .csv the crops as my populations, different crops are different populations). Due the migration of genotypes of the fungus between the crops, inside of one group formed by DAPC there are genotypes obtained of different crops (populations) and for better viewing of this migration I want to plot the dots according of the hosts and not according of the groups formed by DAPC analysis. So, inside of one group there will are dots of different colors.?I hope have explain better my situation and that you can help me.<br>
Best regards,Lucas Veiga Ayres pimenta<br>
<br>
???Em Quinta-feira, 12 de Outubro de 2017 5:49, Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>> escreveu:<br>
<br>
<br>
Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying.<br>
By default, coloring is done on grouping (see here). See this example:<br>
library(adegenet)<br>
<br>
data(H3N2)<br>
pop(H3N2) <- factor(H3N2$other$epid)<br>
dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)<br>
<br>
data.frame(dapc1$grp, pop(H3N2)) # they are matching<br>
<br>
Cheers,Roman<br>
<br>
<br>
----<br>
In god we trust, all others bring data.<br>
<br>
Zahtevaj IJZ na <a rel="nofollow" target="_blank" href="https://kurc.biolitika.si/">https://kurc.biolitika.si</a><br>
<br>
From: "Lucas Veiga" <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: <a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
Sent: Thursday, October 12, 2017 1:34:19 AM<br>
Subject: [adegenet-forum] Dots in the DAPC graphic<br>
<br>
Dear all,I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups?<br>
<br>
Best regards,<br>
Lucas Veiga Ayres Pimenta<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a rel="nofollow" target="_blank" href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171012/c5b29746/attachment-0001.html">http://lists.r-forge.r- project.org/pipermail/ adegenet-forum/attachments/ 20171012/c5b29746/attachment- 0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 12 Oct 2017 12:10:28 +0000 (UTC)<br>
From: Lucas Veiga <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>><br>
Cc: "<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>"<br>
<<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a>><br>
Subject: Re: [adegenet-forum] Dots in the DAPC graphic<br>
Message-ID: <<a rel="nofollow" ymailto="mailto:342879047.415645.1507810228644@mail.yahoo.com" target="_blank" href="mailto:342879047.415645.1507810228644@mail.yahoo.com">342879047.415645. 1507810228644@mail.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Roman,First, thank you for the help. Unfortunaly, apparently your command not worked for me. I will try explain better my situation. I work with phytopathology and the fungus that I work affects different crops (I have put in my input file .csv the crops as my populations, different crops are different populations). Due the migration of genotypes of the fungus between the crops, inside of one group formed by DAPC there are genotypes obtained of different crops (populations) and for better viewing of this migration I want to plot the dots according to the hosts and not according to the groups formed by DAPC analysis. So, inside of one group there will are dots of different colors.?I hope I have explained better my situation and that you can help me.<br>
Best regards,Lucas Veiga Ayres pimenta<br>
<br>
???Em Quinta-feira, 12 de Outubro de 2017 9:03, Lucas Veiga <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>> escreveu:<br>
<br>
<br>
Dear Roman,First, thank you for the help. Unfortunaly, apparently your command not worked for me. I will try explain better my situation. I work with phytopathology and the fungus that I work affects different crops (I have put in my input file .csv the crops as my populations, different crops are different populations). Due the migration of genotypes of the fungus between the crops, inside of one group formed by DAPC there are genotypes obtained of different crops (populations) and for better viewing of this migration I want to plot the dots according of the hosts and not according of the groups formed by DAPC analysis. So, inside of one group there will are dots of different colors.?I hope have explain better my situation and that you can help me.<br>
Best regards,Lucas Veiga Ayres pimenta<br>
<br>
???Em Quinta-feira, 12 de Outubro de 2017 5:49, Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>> escreveu:<br>
<br>
<br>
Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying.<br>
By default, coloring is done on grouping (see here). See this example:<br>
library(adegenet)<br>
<br>
data(H3N2)<br>
pop(H3N2) <- factor(H3N2$other$epid)<br>
dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)<br>
<br>
data.frame(dapc1$grp, pop(H3N2)) # they are matching<br>
<br>
Cheers,Roman<br>
<br>
<br>
----<br>
In god we trust, all others bring data.<br>
<br>
Zahtevaj IJZ na <a rel="nofollow" target="_blank" href="https://kurc.biolitika.si/">https://kurc.biolitika.si</a><br>
<br>
From: "Lucas Veiga" <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: <a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
Sent: Thursday, October 12, 2017 1:34:19 AM<br>
Subject: [adegenet-forum] Dots in the DAPC graphic<br>
<br>
Dear all,I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups?<br>
<br>
Best regards,<br>
Lucas Veiga Ayres Pimenta<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a rel="nofollow" target="_blank" href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171012/32d4d4d6/attachment-0001.html">http://lists.r-forge.r- project.org/pipermail/ adegenet-forum/attachments/ 20171012/32d4d4d6/attachment- 0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 13 Oct 2017 10:38:57 +0200 (CEST)<br>
From: Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>><br>
To: Lucas Veiga <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
Cc: <a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
Subject: Re: [adegenet-forum] Dots in the DAPC graphic<br>
Message-ID:<br>
<<a rel="nofollow" ymailto="mailto:181441774.286421.1507883937636.JavaMail.zimbra@biolitika.si" target="_blank" href="mailto:181441774.286421.1507883937636.JavaMail.zimbra@biolitika.si">181441774.286421. 1507883937636.JavaMail.zimbra@ biolitika.si</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
A-ha, I think I see where you're getting at. Right now I'm not sure it's possible to have DAPC groups with samples colored by some specific variable. Perhaps Thibaut will be able to chime in. If I'm right, this is something we could think about in the upcoming releases.<br>
<br>
In the mean time, you can construct your own plot, taking bits and pieces from <a rel="nofollow" target="_blank" href="https://github.com/thibautjombart/adegenet/blob/master/R/dapc.R#L539">https://github.com/ thibautjombart/adegenet/blob/ master/R/dapc.R#L539</a><br>
<br>
<br>
<br>
Cheers,<br>
Roman<br>
<br>
----<br>
In god we trust, all others bring data.<br>
<br>
Zahtevaj IJZ na <a rel="nofollow" target="_blank" href="https://kurc.biolitika.si/">https://kurc.biolitika.si</a><br>
<br>
<br>
<br>
From: "Lucas Veiga" <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: "Roman Lu?trik" <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>><br>
Cc: <a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
Sent: Thursday, October 12, 2017 2:03:35 PM<br>
Subject: Re: [adegenet-forum] Dots in the DAPC graphic<br>
<br>
Dear Roman,<br>
First, thank you for the help. Unfortunaly, apparently your command not worked for me. I will try explain better my situation. I work with phytopathology and the fungus that I work affects different crops (I have put in my input file .csv the crops as my populations, different crops are different populations). Due the migration of genotypes of the fungus between the crops, inside of one group formed by DAPC there are genotypes obtained of different crops (populations) and for better viewing of this migration I want to plot the dots according of the hosts and not according of the groups formed by DAPC analysis. So, inside of one group there will are dots of different colors.<br>
I hope have explain better my situation and that you can help me.<br>
<br>
Best regards,<br>
Lucas Veiga Ayres pimenta<br>
<br>
<br>
Em Quinta-feira, 12 de Outubro de 2017 5:49, Roman Lu?trik <<a rel="nofollow" ymailto="mailto:roman.lustrik@biolitika.si" target="_blank" href="mailto:roman.lustrik@biolitika.si">roman.lustrik@biolitika.si</a>> escreveu:<br>
<br>
<br>
Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying.<br>
By default, coloring is done on grouping ( see here ). See this example:<br>
<br>
library(adegenet)<br>
<br>
data(H3N2)<br>
pop(H3N2) <- factor(H3N2$other$epid)<br>
dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)<br>
<br>
data.frame(dapc1$grp, pop(H3N2)) # they are matching<br>
<br>
Cheers,<br>
Roman<br>
<br>
<br>
<br>
----<br>
In god we trust, all others bring data.<br>
<br>
Zahtevaj IJZ na <a rel="nofollow" target="_blank" href="https://kurc.biolitika.si/">https://kurc.biolitika.si</a><br>
<br>
<br>
<br>
From: "Lucas Veiga" <<a rel="nofollow" ymailto="mailto:lucasfip@yahoo.com.br" target="_blank" href="mailto:lucasfip@yahoo.com.br">lucasfip@yahoo.com.br</a>><br>
To: <a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
Sent: Thursday, October 12, 2017 1:34:19 AM<br>
Subject: [adegenet-forum] Dots in the DAPC graphic<br>
<br>
Dear all,<br>
I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups?<br>
<br>
Best regards,<br>
Lucas Veiga Ayres Pimenta<br>
<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a rel="nofollow" target="_blank" href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171013/aedaf8eb/attachment.html">http://lists.r-forge.r- project.org/pipermail/ adegenet-forum/attachments/ 20171013/aedaf8eb/attachment. html</a>><br>
<br>
------------------------------<br>
<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
End of adegenet-forum Digest, Vol 110, Issue 11<br>
****************************** *****************<br>
<br>
<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a rel="nofollow" target="_blank" href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171016/4437dedc/attachment.html">http://lists.r-forge.r- project.org/pipermail/ adegenet-forum/attachments/ 20171016/4437dedc/attachment. html</a>><br>
<br>
------------------------------<br>
<br>
______________________________ _________________<br>
adegenet-forum mailing list<br>
<a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge. r-project.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r- project.org/cgi-bin/mailman/ listinfo/adegenet-forum</a><br>
<br>
End of adegenet-forum Digest, Vol 110, Issue 13<br>
****************************** *****************<br>
</blockquote></div><br></div></div></div></div>_______________________________________________<br>adegenet-forum mailing list<br><a rel="nofollow" ymailto="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank" href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br><a rel="nofollow" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br><br></div> </div> </div> </div></div></body></html>