• Hello!

    Either you have not registered on this site yet, or you are registered but have not logged in. In either case, you will not be able to use the full functionality of this site until you have registered, and then logged in after your registration has been approved.

    Registration is FREE, so please register so you can participate instead of remaining a lurker....

    Please be certain that the location field is correctly filled out when you register. All registrations that appear to be bogus will be rejected. Which means that if your location field does NOT match the actual location of your registration IP address, then your registration will be rejected.

    Sorry about the strictness of this requirement, but it is necessary to block spammers and scammers at the door as much as possible.

Mick's Cornsnake Progeny Predictor - perhaps time to update

Mick

New member
I get a lot of requests to update my program, and I see some folks are trying to do it for me, 'borrowing' the look and feel for their own programs. :) Anyway, most of the requests are to add 'morphs' (like Okeetee or 'Sunglow' or Miami) that can't be quantitatively predicted.

But what about the new hypo genes? I apologize for being out of the loop for a while, but could someone with direct experience with these hypo genes ("B" and "C"?) define what exactly is known about them? And if they've been combined with other genes, what did the result look like and what did the breeder name the result?

I also get a lot of requests for Bloodred... to the point that I'm considering adding it as a user configurable option... i.e. treat it a simple recessive if you want, or ignore it (i.e. program won't show it). Good idea or dangerous?

So I'm open to ideas, but need 'the facts' for any new genes added. Thanks.

Regards,
Mick
 
It would strike me as a good idea to include Sunglow, Okeetee and Miami as special cases... for example, allow someone to check sunglow as a name, but treat it as if they'd checked 'amel', with a note in the report to the effect that sunglow is just a pretty amel? That way people who just want to know what they'd get (without knowing what a sunglow IS) can still plug it in.

As for bloodred... well... it kind of acts as a recessive, kind of not... the plainbelly part of it should probably be in there, atleast.

Things are still under test in the hypo department... HypoA is HypoA, and Sunkissed (hypoB) is definitely it's own trait. I'd say there's a good case for Lava/Transparent (hypoC), but not enough is known about Ultrahypo (HypoD?) to be sure on that one. My guess is that it will be proven to be another gene, but only time will tell. HypoA, Sunkissed, and Lava all appear to be straight recessive.

You also ought to add new morph combo names (Opal, for example). Too bad Rich hasn't named hypo lavs yet. (Yeah, I'm always on his case about it, but I think they ought to be named, and he hasn't given an official answer...)

-Kat
 
I think any referrence to Bloodred ought to show the recessive characteristic of the pattern mutation (ie: plain belly, with color creeping in on the sides; side blotches fading), but explain that the coloration issue is a linebred trait that will not be reproduceable in predictable ways. Then you could easily see what an animal that is homozygous for Anery A and Bloodred would be (Anery A with a pattern mutation).
 
Hi Mick,

I used your program as inspiration for my program ;) The only thing that bothered me in yours was that you have to switch between a result panel and input panel. I need to put in some more morphs aswell. But I also do not really know about Lava and other special Hypo genes.. I am still working on it..

GenWiz-01.jpg


GenWiz-02.jpg


Download page
 
I like Kat's idea of adding selectively bred morphs (such as sunglow) and letting people know that they are actually selectively bred amels. Maybe add a note about how it works; try to make them think just a little about the different kinds of traits they are working with.
 
Mick said:
I get a lot of requests to update my program, and I see some folks are trying to do it for me, 'borrowing' the look and feel for their own programs. :)

Ahm - I don't think that I have to borrow something from you.
But, please explain to me how a calculator for cornsnakes genetics should look significant different programmed in HTML?

And I don't understand what you mean by feel? Sorry, I'm not a native english speaker.
In the complete version of my online calculator, there will be an explanation to the Motley-Stripe thing, which I think is wrong in the predictor, and also to the Morphs under the heading "Special" like Bloodred, Aztec/ZigZag and so on.

Sorry, I spend lots of time for an algorithm that can run fast on a webserver in PHP and tried also to solve harder problems like the Motley-Stripe thing and all I hear is that I borrowd something from you...

the Menhir
 
Re: Re: Mick's Cornsnake Progeny Predictor - perhaps time to update

Menhir said:
Ahm - I don't think that I have to borrow something from you.

I did completely read over the 'Borrow' sentence. Mick, do I need to read between the lines and read that you feel stuff has been stolen from you?
 
Re: Re: Mick's Cornsnake Progeny Predictor - perhaps time to update

Menhir said:
Sorry, I spend lots of time for an algorithm that can run fast on a webserver in PHP and tried also to solve harder problems like the Motley-Stripe thing and all I hear is that I borrowd something from you...

Menhir,
I don't think I've seen your program. I'm sure it's very nice though.
Regards,
Mick
 
Re: Re: Re: Mick's Cornsnake Progeny Predictor - perhaps time to update

Marcel Poots said:
I did completely read over the 'Borrow' sentence. Mick, do I need to read between the lines and read that you feel stuff has been stolen from you?

Marcel,
Please note the smiley face in my original post. Some of the similarities are striking, but as long as nobody lifts any actual code, I'm certainly not going to worry about it. It's freeware, and as they say... 'imitation is the sincerest form of flattery', or something like that! :)
Regards,
Mick
 
Re: Re: Re: Re: Mick's Cornsnake Progeny Predictor - perhaps time to update

Mick said:
Marcel,
Please note the smiley face in my original post. Some of the similarities are striking, but as long as nobody lifts any actual code, I'm certainly not going to worry about it. It's freeware, and as they say... 'imitation is the sincerest form of flattery', or something like that! :)
Regards,
Mick

Ahhh, ok, I could not imagion you feeling that way. About 'stolen' I mean.. I liked your predictor a lot and have used for for many years.. It was just that I wanted to built one to suit my own needs.. ;)
 
OK,

I've postet it in "Betatesters needed".
http://www.kornnatterlexikon.de/menhir/calculator/calculatorbeta.php

I was very upset because of your post, and I will tell you why, before you think I've borrowd something.

There are a few things I really dislike in the predictor:
- I have to install a program on my desktop
- runs only on Windows and is heavily bound to some dll's
- calculates Motley-Stripe in the wrong way
- no clear distinction between proven dominant-recessive traits and things like Aztec/ZigZag

And the things that I "updated" in my program:
- No installation needed
- usable for everyone with a browser (all you see is HTML) no matter if Linux, Unix, Apple or whatever is used
- calculates Motley&Stripe in the way that, at least to me, seems to be correct
- clear distinction beetwen proven morphs and Special Morphs (Bloodred, Aztec/ZigZag)

And now - when I need an Input from the User, so that he can choose homo-het-normal(not selected) for every Morph - please tell me how such an Input or INterface should look significant different?! (....also think of the limited possibilities HTML gives to me)

I just felt angry, because your post sounded like: "I did the whole work and some guys steal half of my program, update some things in 5 minutes and want all the fame now".
And be sure, doing the Interface and the algorithm is a little harder in a script language like PHP, then in an comfortable OO language like VB or Delphi... and so, please tell me in detail, what I should have borrowd from your program!

Greetings

the Menhir

P.S.: Please rember, I'm trying to form correct english sentences and I am not that good in knowing how my posts sound in the ear of a native speaker. :)
 
Hey Mick,

Special request...

Would it be possible to allow your program to be run from the commandline and to have arguments that allow the user to output the stuff to a file?

That is, could you modify it so I could go to a DOS prompt and type something like:

cornprog.exe -m L -f HL -o results.txt

I know, I know, it's more work to parse... but I can think of much usefulness for commandline execution and textfile output.

-Kat
 
Originally posted by Mick
as they say... 'imitation is the sincerest form of flattery',
I don't think it's imitation as much as the reality that there are not many other ways to handle such input from a UI. :p

IMO a better UI would use dropdown comboboxes (instead of a huge array of checkboxes) to input the parents. This would allow them to be populated by a config.txt file (could be made/edited with notepad) and not get all cluttered if there are a whole lot of traits in the species to be dealt with.

It would also allow people to use their own names for traits/combos... your predictor does do bloodred breedings.. if one uses a hex editor to change all the instances of the strings "zigzag" and "zig zag" in the exe. hehe

It would also make it "portable" to other species, assuming you also include a way to determine phenotypes based on relative dom/recessive relationships between alleles. ;)
 
Serpwidgets said:


IMO a better UI would use dropdown comboboxes (instead of a huge array of checkboxes) to input the parents.

I think that would not be practical. Since you will need a combobox for each morph you will add to your male and female... That can be done by asking the user how many morphs the female and male consist off but it would make the program so much more difficult to use for normal users.. I think checkboxes are the best way to go but morphs in a text file would be an option.. I will cook on it for a while and maybe implement it for you..
 
Kat, I haven't tried this, but couldn't one just copy the program output and paste it into a word processor window?

One way to determine relative dominant/recessive relations is to make a list of alleles starting with the most dominant and ending with the most recessive. That works with two alleles that are dominant/recessive. I've thought about adding a number with the bits twiddled so that 0 means dominant/recessive and 1 means codominant.

Example from mice:
normal 0 (bits = 000)
chinchilla 1 (bits = 001)
albino 2 (bits = 010)

This indicates that normal is dominant to the others, chinchilla is recessive to normal and codominant to albino, and albino is recessive to normal and codominant to albino.
 
I'd like to be able to import the output into another program, rather than having to manually copy and paste.

-Kat
 
Marcel Poots said:
I think that would not be practical. Since you will need a combobox for each morph you will add to your male and female...
No, what I mean is you have:
::Combobox::
::Add morph (male):: ::Add morph (female)::
::Add Het (male):: ::Add Het (female)::

So you start with a 100% wild-type, and then pick the morph/gene (in the combobox) to add to the parent's genotype, and click either of the "add" buttons. This changes the genotype one or two loci at a time, which is shown in a label/textbox.

For example, you have a normal het amel/caramel/anery X pewter. You could pick "snow" and press "father het." Then pick "butter" or "Caramel" and press "father het." Then pick "pewter" and press "mother morph." Etc... and your labels look like this:

---father----------------------------------
Normal, het amel, anery, caramel
---------------------------------------------

---mother---------------------------------
Pewter
---------------------------------------------

Heh, it's a lot more simple in practice than it is to explain.

The point is you always have exactly the same layout, so you don't have to hardcode the locations of 200 potential checkboxes (or be unable to fit them all on an 800 X 600 window) if someone wants to have that many traits. ;)

Your program is then very easily expandable (IOW, no re-coding, and no redseigning the UI) whenever another trait appears in the population, or if someone (I don't know why they would, but... if someone) wants to breed kingsnakes, boas, petunias, mice, or fruit flies. ;)
 
Kat, to do mass combos, it only takes a little code. Following is the entire VB code from a macro I use in excel, which only took me about 90 minutes to code from scratch... this macro determines all possible male/female crosses, and outputs only the "best case" and "definite outcome" cases into 6 columns... (see attached image)

IOW "Pewter het snow and caramel" X "Snow het Pewter and caramel" gives two results:
For sure = Het amel/anery/blood/charcoal, 66% het caramel
Best case = amel/anery/blood/charcoal/caramel.

You could do the same thing in VB itself starting with a textfile and populating a string array for the input instead of using "cells." VB easily spits out textfiles, too, so it's not like this would be hard work to make it happen. :)

Code:
Option Explicit

Sub Meh_MakeWithTheCrosses_See()
Dim nx As Integer, ny As Integer
Dim FemIndex As Integer, MalIndex As Integer
Dim LocusIndex As Integer, LocusGenotype As Integer
Dim FemList() As Integer, MalList() As Integer
Dim FemName() As String, MalName() As String
Dim Numfemales As Integer, NumMales As Integer
Dim NumLoci As Integer

    
    Sheet3.UsedRange.ClearContents
    
    Sheet3.Cells(1, 2) = "Best case scenario"
    Sheet3.Cells(1, 7) = "Worst case scenario"
    
    Sheet3.Cells(2, 1) = "Cross"
    Sheet3.Cells(2, 2) = "Homo Genes"
    Sheet3.Cells(2, 3) = "Het Genes"
    Sheet3.Cells(2, 4) = "Poss Hets"
    Sheet3.Cells(2, 5) = ""
    Sheet3.Cells(2, 6) = "Comments"
    Sheet3.Cells(2, 7) = "Homo Genes"
    Sheet3.Cells(2, 8) = "Het Genes"
    Sheet3.Cells(2, 9) = "Poss Hets"

    For nx = 3 To Cells(1, 2) 'determine male/female list
        If UCase(Cells(nx, 2)) = "F" Then
            Numfemales = Numfemales + 1
            ReDim Preserve FemList(Numfemales)
            ReDim Preserve FemName(Numfemales)
            FemList(Numfemales) = nx
            FemName(Numfemales) = Cells(nx, 1)
        Else
            If UCase(Cells(nx, 2)) = "M" Then
                NumMales = NumMales + 1
                ReDim Preserve MalList(NumMales)
                ReDim Preserve MalName(NumMales)
                MalList(NumMales) = nx
                MalName(NumMales) = Cells(nx, 1)
            End If
        End If
    Next nx
    'all males/females are listed

    Dim femGenes() As Integer, malGenes() As Integer
    NumLoci = Sheet2.Cells(1, 2)
    ReDim femGenes(Numfemales, NumLoci)
    ReDim malGenes(NumMales, NumLoci)
    
    Dim LocCode() As String
    ReDim LocCode(NumLoci, 2)
    
    'get locus codes
    For nx = 3 To NumLoci + 2
        LocCode(nx - 2, 0) = Sheet2.Cells(nx, 2) 'dominant
        LocCode(nx - 2, 1) = Sheet2.Cells(nx, 3) 'recessive
        LocCode(nx - 2, 2) = Sheet2.Cells(nx, 1) 'Trait Name
    Next nx
    
    Dim ts As String
    
    'get genotypes in calculatable forms
    For nx = 1 To Numfemales
        For ny = 1 To NumLoci
            'for each locus, check for that code in this animal's genotype
            ts = Cells(FemList(nx), 3)
            If InStr(1, ts, LocCode(ny, 0), vbTextCompare) > 0 Then
                femGenes(nx, ny) = 2
            Else
                ts = Cells(FemList(nx), 4)
                If InStr(1, ts, LocCode(ny, 0), vbTextCompare) > 0 Then
                    femGenes(nx, ny) = 1
                Else
                    femGenes(nx, ny) = 0
                End If
            End If
        Next ny
    Next nx

    For nx = 1 To NumMales
        For ny = 1 To NumLoci
            'for each locus, check for that code in this animal's genotype
            ts = Cells(MalList(nx), 3)
            If InStr(1, ts, LocCode(ny, 0), vbTextCompare) > 0 Then
                malGenes(nx, ny) = 2
            Else
                ts = Cells(MalList(nx), 4)
                If InStr(1, ts, LocCode(ny, 0), vbTextCompare) > 0 Then
                    malGenes(nx, ny) = 1
                Else
                    malGenes(nx, ny) = 0
                End If
            End If
        Next ny
    Next nx

    'all males and females are in memory with genotypes
    'do crosses
    Dim ColInd As Integer, nz As Integer

    For nz = 1 To NumLoci
        Debug.Print malGenes(1, nz)
    Next nz
    
    ColInd = 3
    For ny = 1 To Numfemales
        'clear the row
        For nz = 1 To 9
            Sheet3.Cells(ColInd, nz) = ""
        Next nz
        
        For nx = 1 To NumMales
            Sheet3.Cells(ColInd, 1) = FemName(ny) & " X " & MalName(nx)
            'for each gene, see what matches
            'results are: Homo, Het, 66%, 50%, non
            For nz = 1 To NumLoci
                If femGenes(ny, nz) = 0 Then
                    If malGenes(nx, nz) = 0 Then
                        'do nothing
                    ElseIf malGenes(nx, nz) = 1 Then
                        ' 50% poss het, add to "Best" and "worst"
                        Sheet3.Cells(ColInd, 4) = Sheet3.Cells(ColInd, 4) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 9) = Sheet3.Cells(ColInd, 9) & LocCode(nz, 2) & ", "
                    Else 'malgenes = 2
                        ' positive het
                        Sheet3.Cells(ColInd, 3) = Sheet3.Cells(ColInd, 3) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 8) = Sheet3.Cells(ColInd, 8) & LocCode(nz, 2) & ", "
                    End If
                ElseIf femGenes(ny, nz) = 1 Then
                    If malGenes(nx, nz) = 0 Then
                        ' 50% poss het
                        Sheet3.Cells(ColInd, 4) = Sheet3.Cells(ColInd, 4) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 9) = Sheet3.Cells(ColInd, 9) & LocCode(nz, 2) & ", "
                    ElseIf malGenes(nx, nz) = 1 Then
                        'poss morph, 66% het
                        Sheet3.Cells(ColInd, 2) = Sheet3.Cells(ColInd, 2) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 9) = Sheet3.Cells(ColInd, 9) & LocCode(nz, 2) & ", "
                    Else 'malgenes = 2
                        'poss morph, positive het
                        Sheet3.Cells(ColInd, 2) = Sheet3.Cells(ColInd, 2) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 8) = Sheet3.Cells(ColInd, 8) & LocCode(nz, 2) & ", "
                    End If
                Else 'femgenes = 2
                    If malGenes(nx, nz) = 0 Then
                        ' positive het
                        Sheet3.Cells(ColInd, 3) = Sheet3.Cells(ColInd, 3) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 8) = Sheet3.Cells(ColInd, 8) & LocCode(nz, 2) & ", "
                    ElseIf malGenes(nx, nz) = 1 Then
                        'poss morph, positive het
                        Sheet3.Cells(ColInd, 2) = Sheet3.Cells(ColInd, 2) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 8) = Sheet3.Cells(ColInd, 8) & LocCode(nz, 2) & ", "
                    Else 'malgenes = 2
                        'overlap: all morphs
                        Sheet3.Cells(ColInd, 2) = Sheet3.Cells(ColInd, 2) & LocCode(nz, 2) & ", "
                        Sheet3.Cells(ColInd, 7) = Sheet3.Cells(ColInd, 7) & LocCode(nz, 2) & ", "
                    End If
                End If
            Next nz
        ColInd = ColInd + 1
        Next nx
        For nz = 1 To 9
            Sheet3.Cells(ColInd, nz) = ""
        Next nz
        ColInd = ColInd + 1

    Next ny
    
    With Sheet3
    For ny = 3 To ColInd
        For nx = 2 To 4
            ts = .Cells(ny, nx)
            If Len(ts) > 0 Then
                If Right$(ts, 2) = ", " Then
                    ts = Left$(ts, Len(ts) - 2)
                    .Cells(ny, nx) = ts
                End If
            End If
        Next nx
        
        For nx = 7 To 9
            ts = .Cells(ny, nx)
            If Len(ts) > 0 Then
                If Right$(ts, 2) = ", " Then
                    ts = Left$(ts, Len(ts) - 2)
                    .Cells(ny, nx) = ts
                End If
            End If
        Next nx

    Next ny
    End With
    'set auto column widths:
    'Sheet3.Range("A1", "I1").AutoFit
    
    Sheet3.Activate
    
    'all done
    MsgBox "Done, switching to 'results' Sheet."

End Sub
ExcelCombinator.gif
 
Serpwidgets said:
No, what I mean is you have:
::Combobox::
::Add morph (male):: ::Add morph (female)::
::Add Het (male):: ::Add Het (female)::

(snip)

Heh, it's a lot more simple in practice than it is to explain.

(snip)

Your program is then very easily expandable (IOW, no re-coding, and no redseigning the UI) whenever another trait appears in the population, or if someone (I don't know why they would, but... if someone) wants to breed kingsnakes, boas, petunias, mice, or fruit flies. ;)

I encourage you guys to program for mice or fruit flies. They are the best known organisms used in genetics. And their genetics are complex enough that a program that works for either should be easy to use for snakes.

For example, either mice or flies have multiple alleles. Not just 3 alleles, either. And if x is the number of alleles, the male might have any one of 2^x combinations of alleles, and the female could have a different set of alleles out of those 2^x. Can radio buttons will handle selecting one combination out of 16, if there are 4 alleles? How about one combination out of 256 if there are 8 alleles?
 
Back
Top