[adegenet-forum] Keeping track of truenames

Vikram Chhatre crypticlineage at gmail.com
Wed Apr 8 22:45:28 CEST 2015


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.

But it is possible to restore the original site names i.e. truenames in
either genind or genpop objects.

mygenind_tn <- truenames(mygenind)
mygenpop_tn <- truenames(mygenpop)

At least that's how I am interpreting this. Please correct me if I am wrong.

A couple of observations, based on this:

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.

2. If you apply truenames to a genind object, it is no longer recognized as
a genind object.
mygenpop_tn2 <- genind2genpop(mygenind_tn)
Error in genind2genpop(mygenind_tn): x is not a valid genind object.

3. Likewise, mygenpop_tn isn't a valid genpop object either anymore.  For
example:
myfreq <- makefreq(mygenpop_tn)
Error in makefreq(mygenpop_tn): x is not a valid genpop object.

So my question is how can I restore truenames for sites and samples without
breaking the genind and genpop objects?

Thanks
Vikram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150408/d53cfa3c/attachment.html>


More information about the adegenet-forum mailing list