RDA - need to produce a data set with minor allele counts

54 views
Skip to first unread message

Alice Atikessé

unread,
Sep 13, 2022, 10:11:07 AM9/13/22
to dartR
Hi all,

My goal is to produce an RDA. And to do so, I first need to convert my genomic data set into minor allele counts; 0 represents an individual homozygous for the major allele, 1 represents a heterozygote, and 2 is homozygous for the alternative allele.

Is there someone that has done that before and have a R code for this type of procedure ?

Thank you very much,

Alice

Jose Luis Mijangos

unread,
Sep 13, 2022, 8:45:44 PM9/13/22
to dartR
Hi Alice,

Could you please specify the input and output formats from which you want to make the conversion.

The genlight object (dartR input) is already in the format you mentioned. You can check this using the code below. For more information check our data input tutorial using the link below.


You can save and load a genlight object as RDA using the code example below.

library(dartR)
# checking genotypes format in a genlight object
as.matrix(platypus.gl[1:10,1:10])
# saving as RDA (R Data File)
gl.save(platypus.gl,file = "test.RDA")
# loading RDA
test <- gl.load("test.RDA")

Cheers,
Luis
Reply all
Reply to author
Forward
0 new messages