Hi Vojtěch,

Great slides! The function alleles2loci in pegas can be helpful here: it does the operation suggested by Thibaut for all columns at once and you can specify the ploidy level. There is a small example in the help page and a worked example (with some complications) in the vignette:

vignette("ReadingFiles")

If there are no complication in the file (i.e., only the alleles are stores in the tabular file), then alleles2loci could be applied directly to the output of read.csv or read.delim.

HTH

Best,

Emmanuel

Le 09/12/2016 à 12:50, Vojtěch Zeisek a écrit :
Dne pátek 9. prosince 2016 11:33:21 CET, Bhuller, Ravneet napsal(a):
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.
[cid:[email protected]]

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): [cid:[email protected]]

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.

Hi,
it is well documented in the Adegent basics tutorial. Mine shortened version
is in https://trapa.cz/en/course-molecular-data-r-2016 (see PDF attachment
down the page from slide 42).
HTH,
V.



_______________________________________________
R-sig-genetics mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-genetics


_______________________________________________
R-sig-genetics mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-genetics

Reply via email to