[adegenet-forum] convert genlight into genind
Pauline OLIVIER
pauline.olivier1 at etu.univ-nantes.fr
Fri May 30 18:23:44 CEST 2014
Hello,
i would like to convert a genlight object into a genind object.
I obtained a genlight object using "Mygenlihgt =read.PLINK("Myfile.raw")"
where Myfile.raw looks like this :
IID rs3934834_T rs6687776_T rs9651273_A rs9729550_C rs2887286_C
1 611518 0 0 0
1 0
2 611515 0 0 1
1 0
3 611514 1 0 1
0 0
4 611513 1 1 0
1 1
5 611512 0 0 0
0 1
then i try :
mydf<-do.call(rbind, lapply(Mygenlihgt at gen, as.integer))
mygenind<-df2genind(mydf)
But it does not work, i have this message :
Error in df2genind(mydf) :
2 alleles cannot be coded by a total of 1 characters
Can you help me please.
Thank you, Pauline.
More information about the adegenet-forum
mailing list