cran / graph4lg

:exclamation: This is a read-only mirror of the CRAN R package repository. graph4lg — Build Graphs for Landscape Genetics Analysis
3 stars 3 forks source link

genind_to_genepop #2

Open dionnecargy opened 2 years ago

dionnecargy commented 2 years ago

Hi there, I keep getting this error when I try to use the function genind_to_genepop:

Error in if (as.character(loc_all[col_loc[het[1]], "allele"]) < as.character(loc_all[col_loc[het[2]], : 
missing value where TRUE/FALSE needed 

Due to the sensitivity of the work I cannot provide a test sample but I can show you the genind file details: Screen Shot 2022-02-24 at 1 43 01 pm

I am using biallellic SNP data and wish to then use the genepop format to run genetic differentiation calculations in diveRsity.

Could you please help me remedy this? Thanks!

gaborcsardi commented 2 years ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!

mariaemilyd commented 2 years ago

Hi @dionnecargy , did this issue get resolved? I have the same issue. Thanks!

LZarri commented 6 months ago

I experienced this issue as well, and it turned out to be a strangely coded locus and allele that (for some reason) passed the adegenet filters when I converted my tibble into a genind object (df2genind). When I removed this locus, genind_to_genepop worked just fine. A quick scan of your genind loci (consider using locNames(genind_name) ) and alleles (consider using genind_name@all.names ) should indicate whether this issue is impacting you as well.