<div dir="ltr"><div><div>Hi Caitlin and Thibaut,<br>Thanks for your answers.<br>I did used the sep argument. My code to generate the genind object is :<br><br>>myData_genid <- df2genind(myData, sep="/")<br>
<br>The weird thing is that when I try the same code with a test object that I created:<br><br>>dat = data.frame(loc1=c("A/A","T/A","T/A","T/T","T/A","A/T"), loc2=c("C/G","G/C","C/C","G/G","C/G","G/C"))<br>
>x=df2genind(dat, sep="/")<br><br>I get the two columns per loci (as Thibaut does):<br><br>>truenames(x)<br>loc1.A loc1.T loc2.C loc2.G<br>1 1.0 0.0 0.5 0.5<br>2 0.5 0.5 0.5 0.5<br>
3 0.5 0.5 1.0 0.0<br>4 0.0 1.0 0.0 1.0<br>5 0.5 0.5 0.5 0.5<br>6 0.5 0.5 0.5 0.5<br><br>But when I test a subset of my data<br><br>>test<-myData[1:10,1:10]<br></div>
>test<br></div> loc_29 loc_7 loc_43 etc...<br><div>1 "G / A" "C / T" "T / T" <br>2 "G / G" "C / T" "T/ T" <br></div><div>
etc...<br></div><br><div>> test_genid <- df2genind(test,sep="/")<br><br>I get again three or four columns:<br><br>>truenames(test_genid)<br> loc_29.A loc_29.G loc_29.G loc_7.C loc_7.T loc_7.C loc_43.C loc_43.T loc_43.C loc_43.T etc..<br>
1
0.5 0.0 0.5 0.0 0.5
0.5 0.0 0.5 0.0 0.5 <br>2
0.0 0.5 0.5 0.0 0.5
0.5 0.0 0.5 0.0 0.5<br>etc...<br><br>When I carry my PCA analysis with all my data:<br><br>>X <- scaleGen(myData_genid, scale=F, missing="mean") <br>>pca_myData<-dudi.pca(X,center=F,scale=F)<br>
<br>I get the following message:<br>In data.row.names(row.names, rowsi, i) :<br> some row.names duplicated: 3,4,...<br><br>I really don't understand what is causing that, is there a hiden
character in my data file that makes the df2genind divide my columns? Does that affect the results I get thereafter?<br><br>By
the way, I tried the scale=F and scale=T in the scaleGen function but I
get two radically different results. With scale=T my individuals get
separated into only two groups; while with scale=F, individuals get more
"harmoniously" distributed over the 2 axis. Which one would be more
appropriate according to my data type? Because both seemed in agreement
with the origin of individuals, I'm not sure which one represents the
"real picture".<br><br></div><div>Thanks for your comments<br></div>Andrea</div>