bwringe / hybriddetective

13 stars 7 forks source link

nh_Zcore2 and data sets with < 10 loci #8

Open davecarlon opened 5 years ago

davecarlon commented 5 years ago

The function nh_Zcore2 fails for small genetic data sets if the # of loci < 10. I changed the minimum number of digits in the the regex NumLoci string from 2 to 1 and it works fine.

SNPrep <- str_extract(string = addbackin, pattern = "NumLoci [:digit:]{1,5}")