<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Adegenet can already read genalex format.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This is what you do<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The microsatellite data and the coordinate data separately as separate text files.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The microsatellite data is exported from GenAlex as ‘genclass’ file (x.gen) and read into R using read.genepop.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The coordinates are read in as regular tab delimited file and then added to the genindtype object.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">df<-read.genepop("Microsatellites.gen", missing="mean")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">x<-as.matrix(read.table("coordinates.txt"))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">df@other<-list(xy=x)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D">Regards<br>
Roy Mathew Francis</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> adegenet-forum-bounces@lists.r-forge.r-project.org [mailto:adegenet-forum-bounces@lists.r-forge.r-project.org]
<b>On Behalf Of </b>Zhian Kamvar<br>
<b>Sent:</b> 26 March 2013 18:23<br>
<b>To:</b> adegenet-forum@lists.r-forge.r-project.org; rita.castil@gmail.com<br>
<b>Subject:</b> Re: [adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Rita,<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I am actually writing an R package that uses the genind format and I have written a function that will import genalex formatted files called read.genalex. You can find instructions for installation here:
<a href="https://github.com/poppr/poppr">https://github.com/poppr/poppr</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">If you want to just use the raw code, you can download it here (the function starts at line 180 and finishes at line 319):
<a href="https://github.com/poppr/poppr/blob/master/R/file_handling.r">https://github.com/poppr/poppr/blob/master/R/file_handling.r</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Once you have the package installed or the source code in your R session, you can import your genalex file using:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">read.genalex("myfile.csv", geo=TRUE)<br>
Hope that helps!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<br>
Zhian<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Mar 26, 2013 at 4:00 AM, <<a href="mailto:adegenet-forum-request@lists.r-forge.r-project.org" target="_blank">adegenet-forum-request@lists.r-forge.r-project.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Send adegenet-forum mailing list submissions to<br>
<a 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 href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">
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 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 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. inexperienced user (Rita Castilho)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 25 Mar 2013 16:15:13 +0000<br>
From: Rita Castilho <<a href="mailto:rita.castil@gmail.com">rita.castil@gmail.com</a>><br>
To: <a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br>
Subject: [adegenet-forum] inexperienced user<br>
Message-ID: <<a href="mailto:51507811.7060804@gmail.com">51507811.7060804@gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
<br>
Hi!<br>
I have a simple question. Most of us have our microsatellite data in an<br>
excel file to start with. The ones how use GenAlex even have the<br>
geographic coordinates in the last two rows. We can easily convert the<br>
data in the sheet into several formats. How can I convert an easily<br>
obtained csv file with headers (1sr row = individual id, 2nd =<br>
population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1,<br>
etc, 17th row = latitude, 18th row = longitude) nto a genind object that<br>
can be used in sPCA? I get an error that coordinates are repeated, but<br>
that is normal as there are multiple individuals in the same pop.<br>
<br>
If this question was answered previously, I will appreciate if you could<br>
direct me to it.<br>
Many thanks<br>
Rita<br>
<br>
first 5 rows of test.csv file<br>
ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long<br>
FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62<br>
FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62<br>
FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62<br>
FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130325/afbfe735/attachment-0001.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130325/afbfe735/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br>
<br>
End of adegenet-forum Digest, Vol 55, Issue 2<br>
*********************************************<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>