SNP discovery and genotyping with resequencing