<div dir="ltr">Hi Thibaut and others,<div><br></div><div>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.  </div><div><br></div><div>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?)</div><div><br></div><div>Starting loci: M45, S29, P10, K46</div><div>Genind loci: L01, L02, L03, L04</div><div><br></div><div>Allele frequency table contains only two loci: L02, L04 because L01 and L03 are monomorphic.</div><div><br></div><div>V</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut <span dir="ltr"><<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Vikram,
<br>
<br>
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:<br>
<a href="https://github.com/thibautjombart/adegenet" target="_blank">https://github.com/thibautjombart/adegenet</a><br>
<div> <br>
Cheers<br>
Thibaut<br>
<div style="font-family:Tahoma;font-size:13px">
<div><font size="2"><span style="font-size:10pt">
<div>                <br>
==============================<br>
Dr Thibaut Jombart<br>
MRC Centre for Outbreak Analysis and Modelling<br>
Department of Infectious Disease Epidemiology<br>
Imperial College - School of Public Health<br>
Norfolk Place, London W2 1PG, UK<br>
Tel. : 0044 (0)20 7594 3658<br>
<a href="http://sites.google.com/site/thibautjombart/" target="_blank">http://sites.google.com/site/thibautjombart/</a><br>
<a href="http://sites.google.com/site/therepiproject/" target="_blank">http://sites.google.com/site/therepiproject/</a><br>
<a href="http://adegenet.r-forge.r-project.org/" target="_blank">http://adegenet.r-forge.r-project.org/</a><br>
Twitter: @thibautjombart<br>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> <a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a> [<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>] on behalf of Vikram Chhatre [<a href="mailto:crypticlineage@gmail.com" target="_blank">crypticlineage@gmail.com</a>]<br>
<b>Sent:</b> 08 April 2015 21:45<br>
<b>To:</b> <a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
<b>Subject:</b> [adegenet-forum] Keeping track of truenames<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<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>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>