[R-sig-genetics] Microsatellite data query: Data frame to genind conversion using adegent in R

Thibaut Jombart thibautjombart at gmail.com
Fri Dec 9 12:36:16 CET 2016


Hi,

you need to have one column per locus. You can use something along the
lines of paste(a,b, sep = "/") to concatenate two columns.

I think this has been documented on the adegenet forum. It may be useful to
search the archives.

Best
Thibaut


--
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology, Imperial College
London
Head of RECON: repidemicsconsortium.org
sites.google.com/site/thibautjombart/
github.com/thibautjombart
Twitter: @TeebzR <http://twitter.com/TeebzR>
+44(0)20 7594 3658

On 9 December 2016 at 11:33, Bhuller, Ravneet <
ravneet.bhuller13 at imperial.ac.uk> wrote:

> Hello R-sig-genetics community members,
>
> I am using microsatellite data for the first time. It is in csv format.
> Individual ids (1314 in total) are in the first column of the file (a
> snapshot attached below) and the allelic information of each loci (17 loci)
>  is in duplicate columns.
>
> When I convert this data.frame into genind object using adegent, it is
> considering first column as a locus and calculates number of loci as 35
> (see below):
>
> Please if anyone can guide me what is going wrong here. The actual number
> of loci is 17 and first column is not a locus.
>
>
> Many thanks for your time.
>
> Kind regards,
>
> Rav
> PhD student
>
>
> _______________________________________________
> R-sig-genetics mailing list
> R-sig-genetics at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-genetics
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-genetics/attachments/20161209/7fac2679/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: microsatellite data.png
Type: image/png
Size: 219990 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-genetics/attachments/20161209/7fac2679/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: genind object.png
Type: image/png
Size: 72971 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-genetics/attachments/20161209/7fac2679/attachment-0003.png>


More information about the R-sig-genetics mailing list