Beispiel #1
0
        private GenomeOrganization genereateDrosophila(GenomeOrganization go, int nChr)
        {
            //see https://en.wikipedia.org/wiki/Drosophila_melanogaster
            //we consider only siple case (like in human):
            //    diploid,
            //    first chromosome is X (male has only one, he has also Y),
            //    no recombination in males,
            //    three chromosomes: X, 2, 3 (short fouth is ignored)
            //indeed, drosophyla can be triploid and tetraploid (with XXX and XXXX (may also 1 or more Y) for females; X and XX)
            double     coef = 1;
            int        drosophilaConst1 = 75, drosophilaConst2 = 107, drosophilaConst3 = 110;
            Chromosome ch = new Chromosome
            {
                Name          = "1",
                LenGenetcM    = drosophilaConst1 * coef,
                BRecInFemales = true,
                BGender       = false
            };

            go.addChr(ch);

            Chromosome ch1 = new Chromosome
            {
                Id            = 1,
                Name          = "2",
                LenGenetcM    = drosophilaConst2 * coef,
                BRecInFemales = true,
                BGender       = false
            };

            go.addChr(ch1);

            Chromosome ch2 = new Chromosome
            {
                Id            = 2,
                Name          = "3",
                LenGenetcM    = drosophilaConst3 * coef,
                BRecInFemales = true,
                BGender       = false
            };

            go.addChr(ch2);



            return(go);
        }
Beispiel #2
0
        private GenomeOrganization randomOrganism(GenomeOrganization go, int nChr)
        {
            double     coef      = 1;
            List <int> chrLength = new List <int>();

            foreach (Dictionary <int, string> dic in rawGeneticData)
            {
                chrLength.Add(Convert.ToInt32(dic[1]));
            }

            for (int i = 0; i < nChr; i++)
            {
                Chromosome ch = new Chromosome();
                ch.Name       = Convert.ToString(i);
                ch.LenGenetcM = coef * chrLength[i];
                go.addChr(ch);
            }

            return(go);
        }