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

Bhuller, Ravneet ravneet.bhuller13 at imperial.ac.uk
Fri Dec 9 12:49:06 CET 2016


Many thanks, Thibaut.

I will try that.

Kind regards,

Rav


On 9 Dec 2016, at 11:36, Thibaut Jombart <thibautjombart at gmail.com<mailto:thibautjombart at gmail.com>> wrote:

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<http://repidemicsconsortium.org/>
sites.google.com/site/thibautjombart/<http://sites.google.com/site/thibautjombart/>
github.com/thibautjombart<http://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<mailto: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.
<microsatellite data.png>

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):
<genind object.png>

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<mailto:R-sig-genetics at r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-genetics



	[[alternative HTML version deleted]]



More information about the R-sig-genetics mailing list