Detecting lateral genetic material transfer