Thank you so much for the suggestion. I should probably have added some info about my vcf and what kind of filtering I have already done (I have updated the post with this info now).
The VCF has already been filtered twice - once according to GATK’s best practices quality recommendations: QualbyDepth (QD) < 2.0, RMSMappingQuality (MQ) < 40.0, FisherStrand (FS) > 60.0, MappingQualityRankSumTest (MQRankSum) < -12.5, and ReadPosRankSumTest (ReadPosRankSum) < -8.0.
Then we also used vcftools to filter the VCF additionally by removing indels (--remove-indels), only retain bi-allelic SNPs (--min-alleles 2 --max-alleles 2), SNPs with a minimum quality of 40 (--minQ 40), maximum missingness of 0.9 (--max-missing 0.9), minimum depth > 15 (--min-meanDP 15, --minDP 15), and maximum depth < 60 (--max-meanDP 60, --maxDP 60). I think the maximum depth filtration gets read of mapping issues caused by repeats, but perhaps not paralogues.
I have been considering if I could use the --hwe flag in vcftools for something, but I guess I would have to apply it on a per population basis and not on the entire file? Or what do you think? I have been worried that the p-values does not make sense when I have a VCF with many different pops. Perhaps I could divide the VCF in to pop based VCFs, filter them using --hwe and then merge them somehow. (I only have four individuals per pop).
After posting this, I found a way to filter out SNPs that were showing patterns of fixed heterozygosity in populations. Basically I just divided my VCF into population specific VCFs and then found all SNPs with fixed heterozygosity using grep like this:
0/1 is the heterozygote pattern and 10 is the number of individuals in the pop. I concatenated all the info on fixed heterozygous SNPs from all populations, and used this to filter the main VCF using inverted grep (using the chromosome + position info).
The chr.pos.fixed.heterozous.SNPs.vcf was just a file with the two first columns of the concatenated fixed.heterozous.SNPs.vcf giving chromosome and position. Not very elegant, but it seemed to be working.
Only problem is that my populations were quite small, so I might need to come up with some better filtering criterion.