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

Error when using mat_gen_dist() #3

Open eryntw opened 2 years ago

eryntw commented 2 years ago

Hi,

Thank you for the great package. I encountered a strange error when using mat_gen_dist() function. The function works well with my genind object (transformed from genlight using gl2gi() function) except when the genetic distance options were set to "FST" and "GST".

My code:

mat_fst <- mat_gen_dist(x = gi.neutral, dist = "FST")

The verbose:

Finding allelic frequencies from a genpop object... 

...done.

 Converting data from a genind to a genpop object... 

...done.

 Finding allelic frequencies from a genpop object... 

...done.

Individuals in the input data were not ordered, they have
          been ordered by populations and populations in alphabetic order
          for the conversion.
Your dataset is treated as a SNP dataset.
            Alleles initially coded A, T, C, G were respectively coded
            01, 02, 03 and 04
Error in genind_to_genepop(x, output = tmp) : 
  The columns' names of x@tab must be of form 'locus.allele' with only 1
         '.' between locus and allele

I tried to change the locus-allele names to different format with ".", but none of them work. It's also confusing why the other options (DPS, basic, weight, etc.) work but these two cannot. Do you maybe know how to solve the issues? Thank you in advance!

Eryn

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!