<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 12pt; color: #000000"><div>The function `read.genepop` does that for you. You didn't provide a fully working genepop example, but here's a demonstration using nancycats dataset:</div><div><br data-mce-bogus="1"></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">> xy <- system.file("files/nancycats.gen", package = "adegenet")</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">> system(sprintf("cat %s", xy))</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Genotypes of cats from 17 colonies of Nancy (France)</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca8</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca23</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca43</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca45</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca77</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca78</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca90</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca96</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">fca37</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">Pop</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">1, 0000 0409 0404 0103 0909 0306 0909 0808 1010</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">1, 0000 0909 0407 0305 0909 0306 0209 0808 1010</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">1, 0913 0409 0505 0101 0709 0303 0808 0808 1111</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">1, 0809 0505 0405 0105 0606 0306 0909 0104 1010</span></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">...</span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">> xy <- read.genepop(xy)</span></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">...</span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">> tab(xy)[1:10, 1:10]</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;"> fca8.09 fca8.13 fca8.08 fca8.10 fca8.12 fca8.06 fca8.07</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">001 NA NA NA NA NA NA NA</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">002 NA NA NA NA NA NA NA</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">003 1 1 0 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">004 1 0 1 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">005 1 0 1 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">006 1 1 0 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">007 2 0 0 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">008 1 1 0 0 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">009 0 1 0 1 0 0 0</span><br><span style="font-family: "courier new", courier, monaco, monospace, sans-serif;" data-mce-style="font-family: 'courier new', courier, monaco, monospace, sans-serif;">010 2 0 0 0 0 0 0</span></div><div><br data-mce-bogus="1"></div><div>Is this what you're after?</div><div><br data-mce-bogus="1"></div><div>Cheers,</div><div>Roman</div><div><br></div><div data-marker="__SIG_PRE__">----<br>In god we trust, all others bring data.<br>> Zahtevaj IJZ na https://kurc.biolitika.si</div><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>mbzandi@znu.ac.ir<br><b>To: </b>adegenet-forum@lists.r-forge.r-project.org<br><b>Cc: </b>adegenet-forum@lists.r-forge.r-project.org<br><b>Sent: </b>Monday, May 22, 2017 10:33:54 PM<br><b>Subject: </b>Re: [adegenet-forum] How we can convert the genotyping result of SSR marker to binary cod<br></div><br><div data-marker="__QUOTED_TEXT__"><div style="font-family: Tahoma; font-size: 16px; direction: ltr;" data-mce-style="font-family: Tahoma; font-size: 16px; direction: ltr;"><div><div>
<div style="direction: ltr;" data-mce-style="direction: ltr;"><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"></div><span face="Tahoma" data-mce-style="font-family: Tahoma;" style="font-family: Tahoma;">Dear all,</span><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;">I am a new member of this forum, I’m trying to use adegenet to define </span><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;">genetic clusters and genetic diversity </span></span><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;">between two groups. </span></div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;">As mentioned in user guide the SSR data converted to binary code like "data(microbov)". I have raw genotyping result in Genepop format as copied below:</span></div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;"><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"><br></div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">============================</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">pop</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">77568 , 0308 0506 0205 0404 0405 0105 0103 0405 0406 0103 0505 0506 0306</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">77571 , 0108 0104 0207 0607 0505 0202 0505 0101 0104 0104 0606 0404 0108</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">77575 , 0103 0102 0608 0104 0210 0203 0202 0103 0406 0404 0202 0406 0104</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">77579 , 0303 0102 0407 0406 0405 0203 0305 0107 0406 0103 0505 0405 0304</div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;">77580 , 0104 0105 0105 0406 0305 0304 0305 0203 0202 0303 0606 0405 0304</div><div>....</div><div>=====================================</div></span></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;">My question is: How I can convert the genotyping result of SSR marker to binary code in adegenet? </span></span><br></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;">Is it possible with other packages or other software in this regards?</span></span></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;"><br></span></span></div><div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;">Has anyone come across this and be able to overcome it?</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14.6667px;"></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;"><br></span></span></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;">Best regards, </span></span></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;">Mohammad</span></span></div><div><span face="Helvetica, Tahoma, Arial, sans-serif" data-mce-style="font-family: Helvetica, Tahoma, Arial, sans-serif;" style="font-family: Helvetica, Tahoma, Arial, sans-serif;"><span style="font-size: 14.6667px;" data-mce-style="font-size: 14.6667px;"><br></span></span></div><div style="font-family: Tahoma; font-size: 16px;" data-mce-style="font-family: Tahoma; font-size: 16px;"><br><div><div style="font-family: Tahoma; font-size: 16px; direction: ltr;" data-mce-style="font-family: Tahoma; font-size: 16px; direction: ltr;"><div><span size="2" data-mce-style="font-size: small;" style="font-size: small;">==================================</span></div><div><b><span size="2" data-mce-style="font-size: small;" style="font-size: small;">Mohammad Bagher Zandi B.M.</span></b></div><div><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;"><span style="font-size: small;" data-mce-style="font-size: small;">Genetics</span><span style="font-size: small;" data-mce-style="font-size: small;"> and </span><span size="2" data-mce-style="font-size: small;" style="font-size: small;">Animal Breeding(PhD)</span></span></div><div><span size="2" data-mce-style="font-size: small;" style="font-size: small;">Associate Professor</span></div><div><span size="2" data-mce-style="font-size: small;" style="font-size: small;">Faculty of Agriculture</span></div><div><b><span size="2" data-mce-style="font-size: small;" style="font-size: small;">Department of Animal Science</span></b></div><div><span size="2" data-mce-style="font-size: small;" style="font-size: small;">University of Zanjan, Zanjan, Iran</span></div><br></div></div></div></div>
</div></div></div>
<br>_______________________________________________<br>adegenet-forum mailing list<br>adegenet-forum@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum<br></div></div></body></html>