Texas District Judge Barbara Walther late Friday ordered thatto help sort out family relationships that have confounded authorities since 416 children were taken into state custody two weeks ago.
Sampling is to begin Monday and will probably take several days to complete, said Darrell Azar, a spokesman for Child Protective Services. Results could take more than a month.
Once sampling is complete, the agency will begin moving the children from the San Angelo coliseum and fairgrounds to other sites.
Child welfare officials allowed adult mothers with children ages 4 and younger to stay together when the state took custody of the rest of the children from the ranch. Now, only mothers younger than 18 will be allowed to remain with their children once the sampling is complete. The welfare agency will also try to keep siblings together, he said.
"We're going to make these transitions as easy as possible," Azar said. "We want to keep them together as much as possible so they don't feel they're completely isolated from their culture or the people they know."
DNA testing was ordered to help determine how the children and adults of the compound are related. Child welfare officials say solving those relationships has been difficult because of evasive or changing answers.
Other challenges are families with half brothers and sisters, as well as reports of marriages between first cousins. Dr. Arthur Beaudet, chairman of the Department of Molecular and Human Genetics at Baylor College of Medicine in Houston, said DNA testing can easily deal with these types of complexities.
"It's reasonable to say the information (from testing) will give full proof documentation" as to which parents belong to which children, he said.
Although the many unique family ties found in the sect will probably add a level of difficulty for DNA analysts in determining parentage, Beaudet said the added complexity is still "not a significant concern."
A certain number of DNA markers - segments of the DNA with specific genetic characteristics - are tested to determine if two people are related. Beaudet said that if any uncertainties arise, analysts simply test additional markers.
While more than 400 children will be tested, officials have not said how many adults will also be tested. Such a considerable amount of DNA testing is not new but is usually associated with trying to identify the victims of mass violence or natural disasters.
Walther on Friday continued an emergency order giving the state custody of the children after a sometimes chaotic two-day hearing in which the state argued that the teachings of the Fundamentalist Church of Jesus Christ of Latter Day Saints jeopardized children.
The child welfare agency has said that the sect encourages adolescent girls to marry older men and have children, and that boys are groomed to become future perpetrators. Sect members deny the allegations.
Individual hearings will be set for the children over the next several weeks, and the judge will determine whether they are moved into permanent foster care or can be returned to their parents. All of the hearings must be held by June 5.
The custody case is one of the nation's largest and most complicated. The ruling Friday capped two days of testimony that sometimes became disorderly as hundreds of lawyers for children and parents competed to defend their clients in two rooms linked by a video feed.
The April 3 raid on the Yearning For Zion Ranch was prompted by a call made to a family violence shelter, purportedly by a 16-year-old girl who said her 50-year-old husband beat and raped her. That girl has never been identified.
Rod Parker, one of the attorneys representing the sect, told CBS News that he doubts she even exists.
CBS News correspondent Hari Sreenivasanreports that Texas Rangers and police in Colorado Springs, Colo. are investigating a possible link between the call to the shelter and Rozita Swinton, a 33-year-old Colorado woman who was arrested on a misdemeanor charge of false reporting to authorities.