EricArcher / strataG

strataG is a toolkit for haploid sequence and multilocus genetic data summaries, and analyses of population structure.
25 stars 12 forks source link

Error message trying to run ldNe() on microsatellites data. #43

Closed GiulianoColosimo closed 4 years ago

GiulianoColosimo commented 4 years ago

Dear Eric,

My name is Giuliano. I am writing because I am having an issue while trying to run the ldNe() function from strataG.

I am using R 4.0.2 and RStudio 1.3.959 on a macOS 10.15.6

I downloaded and installed the dev version of strataG 2.4.910.

I am able to load and read my data (microsats from a diploid species) as gtypes object and I can run functions to calculate allele frequencies and such.

When I try to run ldNe() this is what I get:

> ldNe(jt.ldne.gtype, maf.threshold = 0, by.strata = FALSE,
+   ci = 0.95, drop.missing = FALSE, num.cores = 4)
Error in .local(x, ...) : 
  Can't code SNPs because some loci have more than 2 alleles.

I tried using the example data set that comes with the package, but I get the same error. I am guessing the function works only with snps data? If not, any thought on how I could fix the problem?

Thanks in advance

EricArcher commented 4 years ago

This particular Ne methodology is only appropriate for balletic loci, hence the error message. I will update the help page to clarify that.