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

Emmanuel Paradis Emmanuel.Paradis at ird.fr
Fri Dec 9 14:36:40 CET 2016


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:F92F6AA3-0C16-4642-843F-476A5B1D6839 at nhm.ac.uk]
>>
>> 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:423CE768-65F3-4B01-9E38-63CA0FD5ABF1 at nhm.ac.uk]
>>
>> 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
> R-sig-genetics at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-genetics
>



More information about the R-sig-genetics mailing list