[adegenet-forum] adegenet-forum Digest, Vol 55, Issue 2
Zhian Kamvar
kamvarz at science.oregonstate.edu
Tue Mar 26 18:22:30 CET 2013
Hi Rita,
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:
https://github.com/poppr/poppr
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):
https://github.com/poppr/poppr/blob/master/R/file_handling.r
Once you have the package installed or the source code in your R session,
you can import your genalex file using:
read.genalex("myfile.csv", geo=TRUE)
Hope that helps!
Cheers,
Zhian
On Tue, Mar 26, 2013 at 4:00 AM, <
adegenet-forum-request at lists.r-forge.r-project.org> wrote:
> Send adegenet-forum mailing list submissions to
> adegenet-forum at lists.r-forge.r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>
> or, via email, send a message with subject or body 'help' to
> adegenet-forum-request at lists.r-forge.r-project.org
>
> You can reach the person managing the list at
> adegenet-forum-owner at lists.r-forge.r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of adegenet-forum digest..."
>
>
> Today's Topics:
>
> 1. inexperienced user (Rita Castilho)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 25 Mar 2013 16:15:13 +0000
> From: Rita Castilho <rita.castil at gmail.com>
> To: adegenet-forum at lists.r-forge.r-project.org
> Subject: [adegenet-forum] inexperienced user
> Message-ID: <51507811.7060804 at gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi!
> I have a simple question. Most of us have our microsatellite data in an
> excel file to start with. The ones how use GenAlex even have the
> geographic coordinates in the last two rows. We can easily convert the
> data in the sheet into several formats. How can I convert an easily
> obtained csv file with headers (1sr row = individual id, 2nd =
> population id, 3rd row= allele 1, locus 1, 4th row= allele 2, locus 1,
> etc, 17th row = latitude, 18th row = longitude) nto a genind object that
> can be used in sPCA? I get an error that coordinates are repeated, but
> that is normal as there are multiple individuals in the same pop.
>
> If this question was answered previously, I will appreciate if you could
> direct me to it.
> Many thanks
> Rita
>
> first 5 rows of test.csv file
>
> ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long
>
> FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62
>
> FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62
>
> FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62
>
> FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130325/afbfe735/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> 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
>
> End of adegenet-forum Digest, Vol 55, Issue 2
> *********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20130326/ed013a85/attachment.html>
More information about the adegenet-forum
mailing list