<div dir="ltr">Hello All,<div><br></div><div>I am trying to run a DAPC on some microsatellite data, and have had no problems going through the tutorial using the tutorial data, but I am immediately running into problems after converting my STRUCTURE file to a genind object. Given that as a first step I would like to identify clusters using my entire data set, I do the following, and receive the following error message:</div>
<div><br></div><div><div><font color="#0000ff">> x <- obj1</font></div><div><font color="#0000ff">> x</font></div><div><br></div><div> #####################</div><div> ### Genind object ### </div><div> #####################</div>
<div>- genotypes of individuals - </div><div><br></div><div>S4 class: genind</div><div>@call: read.structure(file = file, missing = missing, quiet = quiet)</div><div><br></div><div>@tab: 990 x 118 matrix of genotypes</div>
<div><br></div><div>@ind.names: vector of 990 individual names</div><div>@loc.names: vector of 11 locus names</div><div>@loc.nall: number of alleles per locus</div><div>@loc.fac: locus factor for the 118 columns of @tab</div>
<div>@all.names: list of 11 components yielding allele names for each locus</div><div>@ploidy: 2</div><div>@type: codom</div><div><br></div><div>Optional contents: </div><div>@pop: - empty -</div><div>@pop.names: - empty -</div>
<div><br></div><div>@other: - empty -</div><div><br></div><div><font color="#0000ff">> grp <- find.clusters(x, max.n.clust=41)</font></div><div><font color="#ff0000">Error in `row.names<-.data.frame`(`*tmp*`, value = c("001", "003", "005", : </font></div>
<div><font color="#ff0000"> duplicate 'row.names' are not allowed</font></div><div><font color="#ff0000">In addition: Warning messages:</font></div><div><font color="#ff0000">1: In data.row.names(row.names, rowsi, i) :</font></div>
<div><font color="#ff0000"> some row.names duplicated: 497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,7 [... truncated]</font></div>
<div><font color="#ff0000">2: non-unique values when setting 'row.names': </font></div></div><div><br></div><div><br></div><div>This is what my original data set looks like in the STRUCTURE file (a first row of loci names, and then 2 rows of fragment lengths for each individual with no labels):</div>
<div><br></div><div><div>SfoB52<span class="" style="white-space:pre"> </span>SfoC24<span class="" style="white-space:pre"> </span>SfoC28<span class="" style="white-space:pre"> </span>SfoC38<span class="" style="white-space:pre"> </span>SfoC86<span class="" style="white-space:pre"> </span>SfoC88<span class="" style="white-space:pre"> </span>SfoC113<span class="" style="white-space:pre"> </span>SfoC129<span class="" style="white-space:pre"> </span>SfoD75<span class="" style="white-space:pre"> </span>SfoD91<span class="" style="white-space:pre"> </span>SfoD100</div>
<div>203<span class="" style="white-space:pre"> </span>113<span class="" style="white-space:pre"> </span>179<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>101<span class="" style="white-space:pre"> </span>181<span class="" style="white-space:pre"> </span>133<span class="" style="white-space:pre"> </span>221<span class="" style="white-space:pre"> </span>188<span class="" style="white-space:pre"> </span>228<span class="" style="white-space:pre"> </span>230</div>
<div>225<span class="" style="white-space:pre"> </span>113<span class="" style="white-space:pre"> </span>191<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>116<span class="" style="white-space:pre"> </span>184<span class="" style="white-space:pre"> </span>139<span class="" style="white-space:pre"> </span>230<span class="" style="white-space:pre"> </span>208<span class="" style="white-space:pre"> </span>236<span class="" style="white-space:pre"> </span>238</div>
<div>215<span class="" style="white-space:pre"> </span>113<span class="" style="white-space:pre"> </span>183<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>110<span class="" style="white-space:pre"> </span>184<span class="" style="white-space:pre"> </span>133<span class="" style="white-space:pre"> </span>230<span class="" style="white-space:pre"> </span>180<span class="" style="white-space:pre"> </span>212<span class="" style="white-space:pre"> </span>214</div>
<div>219<span class="" style="white-space:pre"> </span>122<span class="" style="white-space:pre"> </span>191<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>116<span class="" style="white-space:pre"> </span>184<span class="" style="white-space:pre"> </span>139<span class="" style="white-space:pre"> </span>230<span class="" style="white-space:pre"> </span>188<span class="" style="white-space:pre"> </span>220<span class="" style="white-space:pre"> </span>214</div>
<div>211<span class="" style="white-space:pre"> </span>113<span class="" style="white-space:pre"> </span>179<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>101<span class="" style="white-space:pre"> </span>184<span class="" style="white-space:pre"> </span>142<span class="" style="white-space:pre"> </span>230<span class="" style="white-space:pre"> </span>180<span class="" style="white-space:pre"> </span>212<span class="" style="white-space:pre"> </span>214</div>
<div>219<span class="" style="white-space:pre"> </span>113<span class="" style="white-space:pre"> </span>191<span class="" style="white-space:pre"> </span>143<span class="" style="white-space:pre"> </span>110<span class="" style="white-space:pre"> </span>190<span class="" style="white-space:pre"> </span>151<span class="" style="white-space:pre"> </span>230<span class="" style="white-space:pre"> </span>204<span class="" style="white-space:pre"> </span>228<span class="" style="white-space:pre"> </span>214</div>
</div><div>etc.</div><div><br></div><div>Any help would be very greatly appreciated, as I'm new to using R, but am excited about the possibilities!</div><div><br></div><div>Best,</div><div>Spencer</div><div><br clear="all">
<div><br></div>-- <br>Spencer A Bruce<div>200 Washington St. </div><div>Troy, NY 12180<br>518 225 0787</div>
</div></div>