[adegenet-forum] Keeping track of truenames

Jombart, Thibaut t.jombart at imperial.ac.uk
Thu Apr 9 11:27:12 CEST 2015


Hi Vikram,

you are right. This is one of the many reasons behind the changes in adegenet 2.0-0, in which we drop the generic names altogether. We plan to release this new version over the month to come. Meanwhile, it can be installed easily from github:
https://github.com/thibautjombart/adegenet

Cheers
Thibaut

==============================
Dr Thibaut Jombart
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
Norfolk Place, London W2 1PG, UK
Tel. : 0044 (0)20 7594 3658
http://sites.google.com/site/thibautjombart/
http://sites.google.com/site/therepiproject/
http://adegenet.r-forge.r-project.org/
Twitter: @thibautjombart


________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram Chhatre [crypticlineage at gmail.com]
Sent: 08 April 2015 21:45
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] Keeping track of truenames

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/20150409/b64d1c3f/attachment.html>


More information about the adegenet-forum mailing list