Detection of markers for discrete phenotypes