<div dir="ltr"><font face="arial, sans-serif">Hello,</font><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I have a Genlight object as below:</font></div><div><br></div><div><pre tabindex="0" aria-label="Console Output" role="document" class="gmail-GND-IWGDH3B" id="gmail-rstudio_console_output" style="font-family:"Lucida Console",monospace;font-size:13.3333px;outline:none;border:none;word-break:break-all;margin-top:0px;margin-bottom:0px;line-height:1.2;color:rgb(0,0,0);white-space:pre-wrap"><span tabindex="-1" class="gmail-GND-IWGDI3B" role="document" style="outline:none"><span class="gmail-GND-IWGDO3B gmail-ace_keyword" style="color:blue;white-space:pre">> </span><span class="gmail-GND-IWGDN2B gmail-ace_keyword" style="color:blue">SNPs_Ploidy 
</span><span class="gmail-GND-IWGDH3B" style="outline:none;border:none;word-break:break-all;margin:0px"> /// GENLIGHT OBJECT /////////

 // 78 genotypes,  8,368 binary SNPs, size: 33.2 Mb
 23935 (3.67 %) missing data

 // Basic content
   @gen: list of 78 SNPbin
   <b>@ploidy: ploidy of each individual  (range: 2-2)</b>

 // Optional content
   @ind.names:  78 individual labels
   @loc.names:  8368 locus labels
   @loc.all:  8368 alleles
   @position: integer storing positions of the SNPs
   @pop: population of each individual (group size range: 3-50)
   @other: a list containing: loc.metrics  ind.metrics  loc.metrics.flags  verbose  history </span></span></pre><div><br></div><div><font face="arial, sans-serif">As you can see <span style="color:rgb(0,0,0);font-size:13.3333px;white-space:pre-wrap">@ploidy: ploidy of each individual  (range: 2-2). However the 78 individuals in my dataset have all different ploidies ranging from 2X to 6X. I tried using these commands:</span></font></div><div><span style="color:rgb(0,0,0);font-family:"Lucida Console",monospace;font-size:13.3333px;white-space:pre-wrap"><br></span></div><div><pre style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span class="gmail-gnd-iwgdo3b"><span style="font-family:"Lucida Console";color:blue">> </span></span><span class="gmail-gnd-iwgdn2b"><span style="font-family:"Lucida Console";color:blue">head(ploidy(SNPs_Ploidy), 10)</span></span></pre><pre style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span class="gmail-gnd-iwgdh3b"><span style="font-family:"Lucida Console";color:black;border:1pt none windowtext;padding:0in"><span style="outline:none;white-space:pre-wrap">  Ac-3 Ac-359  Ac-25  Ac-75 Ac-182 Ac-210 Ac-272 Ac-317 Ac-333 Ac-344 </span></span></span></pre><pre style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span class="gmail-gnd-iwgdh3b"><span style="font-family:"Lucida Console";color:black;border:1pt none windowtext;padding:0in">     2      2      2      2      2      2      2      2      2      2 </span></span><span style="font-family:"Lucida Console";color:black"></span></pre><pre style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-family:"Lucida Console";color:black"> </span></pre>

<p class="MsoNormal" style="margin:0in;line-height:normal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:"Lucida Console";color:black">> ploidy(SNPs_Ploidy) <-
paste("4", "2", "4", "4",
"4", "4", "2", "4", "4",
"4", sep=" ")</span></p><p class="MsoNormal" style="margin:0in;line-height:normal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:"Lucida Console";color:black"><br></span></p><p class="MsoNormal" style="margin:0in;line-height:normal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;font-size:11pt"><span style="font-size:10pt;color:black"><font face="arial, sans-serif">But I get this error message:</font></span></p><pre tabindex="0" aria-label="Console Output" role="document" class="gmail-GND-IWGDH3B" id="gmail-rstudio_console_output" style="font-size:13.3333px;outline:none;border:none;word-break:break-all;margin-top:0px;margin-bottom:0px;line-height:1.2;color:rgb(0,0,0);white-space:pre-wrap"><span tabindex="-1" class="gmail-GND-IWGDI3B" role="document" style="outline:none"><span class="gmail-GND-IWGDB3B gmail-ace_constant" style="color:rgb(197,6,11)"><font face="arial, sans-serif">Error in `ploidy<-`(`*tmp*`, value = "4 2 4 4 4 4 2 4 4 4") : 
  (converted from warning) NAs introduced by coercion</font></span></span></pre></div><div><font face="arial, sans-serif"><span style="color:rgb(0,0,0);font-size:13.3333px;white-space:pre-wrap">Is it possible to change the ploidy and what could be the appropriate commands?</span><br></font></div><font face="arial, sans-serif"><br></font><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="arial, sans-serif">Best Regards<br></font><div><div style="font-size:small"><font face="arial, sans-serif">Swati</font></div><div><div><div dir="ltr"><span style="font-size:12.8px"><font style="vertical-align:inherit"><font style="vertical-align:inherit">--------------------------------------------------------------- </font></font></span><span style="font-size:12.8px"><font style="vertical-align:inherit"><font style="vertical-align:inherit">_ ---------- </font></font></span><span style="font-size:12.8px"><font style="vertical-align:inherit"><font style="vertical-align:inherit">---------------------- </font></font></span><br><font color="#000000" size="2" face="arial, helvetica, sans-serif"><b><font><font style="vertical-align:inherit"><font style="vertical-align:inherit">SWATI PURANIK </font></font><font><font style="vertical-align:inherit"><font style="vertical-align:inherit">,</font></font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit">  Ph.D., </font></font></font><font style="vertical-align:inherit"><font style="vertical-align:inherit"> MSCA Fellow</font></font></b></font></div><div dir="ltr"><font size="2" color="#000000" face="arial, helvetica, sans-serif">Junior Researcher </font></div><div dir="ltr"><font color="#000000" size="2" face="arial, helvetica, sans-serif"><span style="text-align:justify">Global Change Research Institute (CzechGlobe), </span><span style="text-align:justify">Czech Academy of Sciences</span><br><span style="text-align:justify">Bělidla 986/4a, </span><span style="text-align:justify">603 00 Brno</span><font>; Czech Republic <br>E-mail: <span><a href="mailto:manoj_prasad@nipgr.ac.in" target="_blank"><font color="#000000">s</font></a><a href="mailto:watipuraanik@gmail.com" target="_blank">watipuraanik@gmail.com</a></span></font><br><a href="https://scholar.google.cz/citations?hl=en&user=QTwp1YMAAAAJ&view_op=list_works&gmla=AJsN-F4LFxJUHZv94qOgQg1ss_nyV9cNg6V6j_dF1gJ583sGeqPI69W6l7-SoBBTETQnD57xSf7SBGngfv45kzo-m7yqUWmTLP2FKlR5zx6LQ6ANEkrQ5wo" target="_blank">Google Scholar</a> | <a href="https://www.researchgate.net/profile/Swati_Puranik" target="_blank">ResearchGate</a><br></font></div><div dir="ltr"><font color="#000000" size="2" face="arial, helvetica, sans-serif">ORCID ID: <u><a href="https://orcid.org/0000-0003-1787-1550" target="_blank">https://orcid.org/0000-0003-1787-1550</a></u></font><br></div><div dir="ltr" style="font-size:12.8px"><span style="font-size:12.7273px">----------------------------------------------------------------------------------</span></div></div></div></div></div></div></div></div></div></div></div></div>