dyerlab / gstudio

An R package for the spatial analysis of population genetic data.
19 stars 6 forks source link

Blank first line in genepop file causes issues #8

Open andrewmarx opened 5 years ago

andrewmarx commented 5 years ago

A friend working with genepop output from PGDspider approached me for help with an error loading her genepop files. Working through the .read_genepop() function, it appears that gstudio drops any blank lines at the beginning of the file and uses the first non-blank line for the description. According to the genepop reference manual, the first line (description) can be anything, which presumably includes a blank line. For my friend's files, this means that the actual (albeit blank) description line is being dropped by gstudio and the first locus name is being used as the description, which triggers the if statement that checks the number of loci