|
Sorry for any disruption and loss of service whilst these pages are migrated to the new site Brought to you by the National Gerbil Societywww.gerbils.co.ukPlease navigate using the menus above. If you prefer, there is a text listing of NGS pages available. |
|
The following program asks you for color information about a pair of gerbils, then predicts the colors of the offspring. This is a csh script. It runs on Unix. You don't have to compile it or anything; just get it onto your system somehow and modify the permissions to make it executable. It will not run on Windows or DOS, but would probably work on Linux. This program takes a simplified approach to gerbil color genetics, only taking into consideration 4 of the known color loci:
This is not the "official" designation for the gene locus; it is probably supposed to be Sp, but I find that hard to read. This is the only known color mutation that is genetically dominant. The E and G genes are not considered in this program. That means that you will get misleading answers for gerbils that are Nutmeg, Honey, Argente Nutmeg, Grey Agouti, Slate, and variants of those colors. This program may be freely distributed and used by anybody, but not sold. If anyone enhances or extends the program, I would appreciate it if they would send me a copy of the enhanced version. If you make any changes, please add a dated comment at the top describing the change, and update the version string. Thanks. #! /bin/csh -f
### gerb
### Sharon Kahn Copyright March, 1997
#####################################
set NUMVAR = $#argv ### number of variables
set COMMAND = "gerb"
set VER = "Ver1.3 Mar 1997"
############
switch ($1) ### switch on first variable
case h: ### help
case -h:
echo ""
echo "$COMMAND $VER"
echo "------------------------------"
echo "This program asks you for color information about a pair"
echo "of gerbils, then predicts the colors of the offspring."
echo ""
exit 1
breaksw
#
#
default:
echo ""
echo "$COMMAND $VER"
echo "------------------------------"
echo "This program asks you for color information about a pair"
echo "of gerbils, then predicts the colors of the offspring."
echo " d stands for dominant, r stands for recessive"
echo " if you don't answer or answer with an illegal value, "
echo " the non-mutated 'wild color' is taken as the default"
echo ""
echo "Type q at any time to quit program"
echo ""
############################
### set up default values
############################
set FBASE = "A-"; set MBASE = "A-" ## Agouti
set FPASTEL = "P-"; set MPASTEL = "P-" ## Dark-Eyed
set FTICK = "E-"; set MTICK = "E-" ## Ticking normal
set FWHITE = "ww"; set MWHITE = "ww" ## No white-factoring
set FALBINO = "C-"; set MALBINO = "C-" ## Not albino
####################################
###### QUERY COLOR OF FEMALE ####
####################################
#======== prompt (Base color) ==========#
echo -n "FEMALE: base color [d=Agouti, Cinnamon, or Honey; r=Black or Silver; w=white]: "
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "r") set FBASE = "aa"
if ($INPUT == "w") then
set FBASE = "--"; set FPASTEL = "--";
set FWHITE = "--"; set FTICK = "--"
set FALBINO = "chch"
goto querymale
endif
#======== prompt (Pastel? ) ==========#
echo -n "FEMALE: eye color [d=Black, r=Red or Pink]: "
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "r") then
if ($FALBINO == "chch") then
set FBASE = "--"; set FPASTEL = "--"; set FWHITE = "--"
goto querymale
else
set FPASTEL = "pp"
endif
endif
#======== prompt (White marking) ==========#
echo -n "FEMALE: white markings on head or neck?[d=yes, r=no]"
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "d") set FWHITE = "Ww"
##################################
###### QUERY COLOR OF MALE ####
##################################
querymale:
echo ""
#======== prompt (Base color) ==========#
echo -n "MALE: base color [d=Agouti, Cinnamon, or Honey; r=Black or Silver; w=white]: "
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "r") set MBASE = "aa"
if ($INPUT == "w") then
set MBASE = "--"; set MPASTEL = "--";
set MWHITE = "--"; set MTICK = "--"
set MALBINO = "chch"
goto report
endif
#======== prompt (Pastel? ) ==========#
echo -n "MALE: eye color [d=Black, r=Red or Pink]: "
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "r") then
if ($MALBINO == "chch") then
set MBASE = "--"; set MPASTEL = "--"; set MWHITE = "--"
goto report
else
set MPASTEL = "pp"
endif
endif
#======== prompt (White marking) ==========#
echo -n "MALE: White markings on head or neck?[d=yes, r=no]"
set INPUT = $<
if ($INPUT == "q") goto cleanup
if ($INPUT == "d") set MWHITE = "Ww"
breaksw
endsw
################ report colors
report:
echo ""
set FEMALE = "$FBASE $FPASTEL $FALBINO $FWHITE"
echo "Female is probably: $FEMALE"
set MALE = "$MBASE $MPASTEL $MALBINO $MWHITE"
echo "Male is probably: $MALE"
echo ""
echo "Expected offspring"
echo "------------------"
##### Albino?
if (($MALBINO == "chch") && ($FALBINO == "chch")) then
echo "White with ruby or pink eyes"
goto cleanup
endif
if (($MALBINO == "chch") || ($FALBINO == "chch")) then
echo "Practically any color is possible."
goto cleanup
endif
#### Black or Silver
if (($MBASE == "aa") && ($FBASE == "aa")) then
if (($MPASTEL == "P-") || ($FPASTEL == "P-")) then
echo "Black, and possibly Silver"
else
echo "Silver "
endif
goto whitespot
### at least one parent is Agouti variant
else
if (($MPASTEL == "P-") || ($FPASTEL == "P-")) then
echo "Agouti, and possibly Cinnamon"
echo "Black & Silver are also possible, depending on recessives"
else
echo "Cinnamon"
echo "Silver is also possible, depending on recessives"
endif
endif
#### White-marked?
whitespot:
if (($MWHITE == "Ww") || ($FWHITE == "Ww")) then
echo "Some with white markings"
endif
misc:
echo "You might even see some albino-like colors"
################ clean up and exit program
cleanup:
echo ""
echo "************ bye now! ***************"
Return to the NGS Homepage? The views presented on this page are not necessarily those of the National Gerbil Society. Please note that the material on these webpages is covered by copyright law. If you wish to use any pictures etc for anything other than your personal private use, such as publishing material on a website, then This page has been constructed by Julian Barker.
Last updated 03 September 2003 |
|
|