I'm trying to run the function genetic_diff(): myDiff <- genetic_diff(vcf, pops = pop, method = 'nei')
But I get the following information " if(class(x) != "vcfR"){ stop(paste("Expecting an object of class vcfR, instead received", class(vcf)))"
What can I do?
Presumably you have a vcfR file. Use the
read.vcfR
command to read it as a vcfR file, then you can successfully run the genetic_diff command. An example using the vcfR example file lumpy.vcf.