[adegenet-forum] Identifying clusters / Error in row names

Spencer Bruce goatsrunfaster at gmail.com
Sat Jun 14 15:11:55 CEST 2014


Hello All,

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:

> x <- obj1
> x

   #####################
   ### Genind object ###
   #####################
- genotypes of individuals -

S4 class:  genind
@call: read.structure(file = file, missing = missing, quiet = quiet)

@tab:  990 x 118 matrix of genotypes

@ind.names: vector of  990 individual names
@loc.names: vector of  11 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the  118 columns of @tab
@all.names: list of  11 components yielding allele names for each locus
@ploidy:  2
@type:  codom

Optional contents:
@pop:  - empty -
@pop.names:  - empty -

@other: - empty -

> grp <- find.clusters(x, max.n.clust=41)
Error in `row.names<-.data.frame`(`*tmp*`, value = c("001", "003", "005",
 :
  duplicate 'row.names' are not allowed
In addition: Warning messages:
1: In data.row.names(row.names, rowsi, i) :
  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]
2: non-unique values when setting 'row.names':


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):

SfoB52 SfoC24 SfoC28 SfoC38 SfoC86 SfoC88 SfoC113 SfoC129 SfoD75 SfoD91
SfoD100
203 113 179 143 101 181 133 221 188 228 230
225 113 191 143 116 184 139 230 208 236 238
215 113 183 143 110 184 133 230 180 212 214
219 122 191 143 116 184 139 230 188 220 214
211 113 179 143 101 184 142 230 180 212 214
219 113 191 143 110 190 151 230 204 228 214
etc.

Any help would be very greatly appreciated, as I'm new to using R, but am
excited about the possibilities!

Best,
Spencer


-- 
Spencer A Bruce
200 Washington St.
Troy, NY 12180
518 225 0787
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140614/4b83f534/attachment.html>


More information about the adegenet-forum mailing list