[adegenet-forum] Keeping track of truenames

Vikram Chhatre crypticlineage at gmail.com
Tue Apr 14 17:49:11 CEST 2015


Will do, thank you.

In the meantime, is there a quick way to get a list of markers that were
deemed 'entirely nontype' by adegenet?

Thanks
Vikram

On Tue, Apr 14, 2015 at 11:34 AM, Jombart, Thibaut <t.jombart at imperial.ac.uk
> wrote:

>  Hi there,
>
> can you please post this as an issue on github, including a reproducible
> example of the problem?
> https://github.com/thibautjombart/adegenet/issues
>
> Cheers
> Thibaut
>
>    ------------------------------
> *From:* Vikram Chhatre [crypticlineage at gmail.com]
> *Sent:* 14 April 2015 16:22
> *To:* Jombart, Thibaut; adegenet-forum at lists.r-forge.r-project.org
> *Subject:* Re: [adegenet-forum] Keeping track of truenames
>
>   Hi Thibaut and others,
>
>  After installing Adegenet 2.0, I am still seeing the generic locus and
> individual names.  I am converting vcf files to structure format before
> importing it as a genind object.  The structure file have actual locus and
> individual names which are lost in the genind object.
>
>  Although, different from 1.4, the new version appears to assign generic
> names *before* deleting entirely nontype markers, thus, the sequence of
> names (though generic) is maintained.  Still linking these generic names
> back to their actual names isn't a piece of cake (I wonder if this can be
> done within R?)
>
>  Starting loci: M45, S29, P10, K46
> Genind loci: L01, L02, L03, L04
>
>  Allele frequency table contains only two loci: L02, L04 because L01 and
> L03 are monomorphic.
>
>  V
>
> On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut <t.jombart at imperial.ac.uk
> > wrote:
>
>>  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/20150414/bbd32b76/attachment-0001.html>


More information about the adegenet-forum mailing list