<div dir="ltr">When importing from Structure format, if the data contains entirely non-type markers, the import2genind function will remove such sites.  The remaining sites, as it appears, are then sequentially named from L001 to L00n.  Thus the identity of loci is lost.<div><br></div><div>But it is possible to restore the original site names i.e. truenames in either genind or genpop objects.</div><div><br></div><div>mygenind_tn <- truenames(mygenind)</div><div>mygenpop_tn <- truenames(mygenpop)</div><div><br></div><div>At least that's how I am interpreting this. Please correct me if I am wrong.</div><div><br></div><div>A couple of observations, based on this:</div><div><br></div><div>1. After you apply truenames to the genpop object, contents of mygenpop$tab == mygenpop_tn.  In other words, mygenpop_tn$table will not yield anything.  Instead mygenpop_tn itself yields the allele count table.</div><div><br></div><div>2. If you apply truenames to a genind object, it is no longer recognized as a genind object.</div><div>mygenpop_tn2 <- genind2genpop(mygenind_tn)</div><div>Error in genind2genpop(mygenind_tn): x is not a valid genind object.</div><div><br></div><div>3. Likewise, mygenpop_tn isn't a valid genpop object either anymore.  For example:</div><div>myfreq <- makefreq(mygenpop_tn)</div><div>Error in makefreq(mygenpop_tn): x is not a valid genpop object.</div><div><br></div><div>So my question is how can I restore truenames for sites and samples without breaking the genind and genpop objects?</div><div><br></div><div>Thanks</div><div>Vikram</div><div><br></div><div><br></div><div><br></div></div>