More than 400 children taken from a ranch run by a polygamous sect will stay in state custody and be subject to genetic testing, a judge ruled Friday. State District Judge Barbara Walther heard 21 hours of testimony over two days before ruling that the children be kept by the state. Individual hearings will be set for the children over the next several weeks. She ordered that all 416 children and parents be given genetic testing. Child welfare officials say they have had difficulty determining how the children and adults are related because of evasive or changing answers. The raid was prompted by a call from someone identifying herself as a 16-year-old girl with the Fundamentalist Church of Jesus Christ of Latter Day Saints, which operates the ranch. She claimed her 50-year-old husband beat and raped her.