[adegenet-forum] Treatment of ploidy by seploc

Aaron.Adamack Aaron.Adamack at canberra.edu.au
Mon Aug 5 11:10:14 CEST 2013

Hi Thibaut, 
Thanks for the very quick reply!

I'm running adegenet version 1.3-9 and getting this error. Is there a newer update I should be using?

I am using seploc on a genind object with only 1 locus as I have to make sure that the code I am writing works for the case where the number of loci = 1. Also, if you are testing results by hand, as you probably know, it's often easier to test the case of loci = 1 rather than loci = 5. 

-----Original Message-----
From: Jombart, Thibaut [mailto:t.jombart at imperial.ac.uk] 
Sent: Monday, 5 August 2013 6:57 PM
To: Aaron.Adamack; 'adegenet-forum at lists.r-forge.r-project.org'
Subject: RE: Treatment of ploidy by seploc


this was a documented bug, which has now been corrected. 

Why use seploc ("separate loci") if you have one locus? 

From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Aaron.Adamack [Aaron.Adamack at canberra.edu.au]
Sent: 05 August 2013 08:14
To: 'adegenet-forum at lists.r-forge.r-project.org'
Subject: [adegenet-forum] Treatment of ploidy by seploc

Hi Thibaut,
I'm working on building a function that uses the seploc function on a tetraploid genind object that has a single microsatellite locus with two alleles (e.g. A and B). I'm a bit puzzled by the function's behaviour....

If I have a genind object called "example" and type:
>example at ploidy
The output is:

However if I try:
>seploc(example)[[1]]@ ploidy
I get:

Why would the ploidy change if I separated the loci (just as a note in case it's not obvious, this is just a test case)? I obtained the same result when I duplicated the locus and repeated these steps (checking to see if it might have been due to running seploc on an individual with only one locus). I obtained a similar result when I tried seploc on genind objects with initial ploidies of 3 and 6. In the initial step I got ploidies = 3 or 6 and in the second step I got ploidy = 2.

Thanks for the help,

More information about the adegenet-forum mailing list