A method to detect individuals with different genetic background in case-control studies