[adegenet-forum] problem to import data with read.structure

Stéphanie Manel stephanie.manel at ujf-grenoble.fr
Wed Jul 23 09:26:58 CEST 2008


Dear all,

My question is about the data importation and the use of read.structure 
command.

In the tutorial I read:
"In all cases, it should be possible to store data in an individuals x 
markers table where each element is a character string coding 2  alleles
Such data are interpretable when all strings contain 2,4 or 6 characters."

In  my case the allele are  not  stored together and should *not be 
coded  with two character(*s)?

In more detail:
In fact I  have a problem for importing data with adegent using 
read.structure (which is the most convenient when the two alleles of 
each loci are not stored together   but in two different colon). When in 
my data to import, I have allele coded with 2 and 1 characters , I have 
no probleme to import the data. However when I have all the alleles 
coded with only one characters, I cannot import the file and I have the 
following error message:
_I used the following command:_
dataadegenet<-read.structure(nameoffilebis,n.ind=200,n.loc=20, 
onerowperind=T,col.lab=1,col.pop=0,col.other=c(2,3),row.marknames=0,NA.char="-9")
_Error message:_
Error in df2genind(X = X, pop = pop, missing = missing) :
        Invalid number of coding characters (should be 2, 4, or 6)

_My questions are:_
- is the error message due to the fact that the alleles are coded with 
only one character?
-when in a dataset alleles are coded with two and one character, R read 
all with two characters?
-what is the best way to import such data (file text with allele not 
together?)
-one allele is coded by 0 : is it a problem ?

Thank you for your attention
Stéphanie




___________________________________
Stéphanie Manel
Université Joseph Fourier,
Laboratoire d'Ecologie Alpine, Equipe GPB
UMR-CNRS 5553, BPX53 Grenoble 38041
tél: 04 76 51 41 15
http://www-leca.ujf-grenoble.fr/membres/manel.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20080723/874693aa/attachment.htm 


More information about the adegenet-forum mailing list