Jump to content

WildAshe

Members
  • Posts

    5
  • Joined

  • Last visited

WildAshe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks guys! These are awesome solutions and I will work through the code to see what works best.
  2. That may just do the trick! I'll have to try it. Thankfully it allows me to set a parameter for the length of the split - meaning, I can split the locus no matter how many letters in each allele.
  3. I haven't started the breeding script yet, but here's a screenshot of what the database tables look like with the genes. So, essentially what I'd need to do is determine a random combination for the offspring from the genes of the parents (parents being shown as one row).
  4. There's no separation by space or character, sadly - if it was, it'd be easy enough to use an explode. :/
  5. I am currently developing an online horse game where players can breed horses using real-to-life genetics. In the past, I have distributed the alleles in separate columns (allele 1 and allele two, for each locus), but this time I'm having to work with another developer's code which places the two alleles under one table column (so at the locus agouti, for example [which is a column], it displays two alleles in the form of AA). I've now come to having to code the breeding script, which combines the genetics for both the sire and the dam of the resulting foal. But, I've run into a problem - since I could in the past pull each half of the gene from each parent, and combine randomly to come up with genetically accurate offspring, I'm not to sure how to go about it with this new database structure. If all the genes had one letter alleles it would be fine - however, some genes have two, or even three characters in the allele code (For example, Rnr is one allele variety for the Roan gene and). How, then, can I combine the genes of the parents, explode them (like I normally would) into separate strings, then recombine them into one? I cannot clear the database and start over - there are paying members already training and showing their horses and it would be unfair to delete and start over. Hopefully that's somewhat clear - I'm sorry if there's too much technical genetics jargon!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.