Extended Pedigree Utilities

I have created a spreadsheet that can be used to record extended pedigrees.

Simply enter the basic calf data (DOB, Sex, color, name, registration number)

this file into your spreadsheet program (Excel or OpenOffice), copy it, and

paste it into the appropriate sire/dam page of the pedigree spreadsheet you are

using.

 

There is also a set of utilities will help you to create an

extended pedigree by retrieving the data necessary from the AHCA website. In order to

use these utilities, you will need to obtain the Python interpreter from python.org

  • python.org
  • if you do not already have it.

    Python 2.x

     

    I am currently using Python 2.7.10.

    Windows users can download Python 2.5.4 at

  • python-2.5.4.msi
  • It is recommended that Excel users also install the pywin32 extensions available at:

  • pywin32
  • You will also need a spreadsheet program, like Microsoft Excel, or LibreOffice.

    LibreOffice is available via download at:

  • LibreOffice.org
  •  

    Python 3.x

     

    If you do not already have it. This is free for download. I currently am using version 3.9.7. The Windows installer version can be downloaded from:

  • python-3.10
  • It is recommended that Excel users also install the pywin32 extensions available at:

  • pywin32
  •  

    You will also need a spreadsheet program, like Microsoft Excel, or LibreOffice.

    Libre Office is available via download at:

  • LibreOffice
  •  

     

    In order to install the pedigree generation scripts, simply unzip the file Distribution.zip

    into a temporary folder.

    Both the Python 2.x and Python 3.x folders are included in the distribution. You can

    choose the version that you wish to use and copy that folder to a location where you

    wish to create the pedigree files.

    In order to generate a pedigree, you must first retrieve the data with the

    script, getanimal.py. First, make sure that your computer is connected to

    the internet, the run the script getanimal.py


    Enter the Name or registration number for the animal at the prompt. This

    will generate a comma separated file, master_db.csv. If the file

    already exists, the data for the new animal will be added to the file.


    Once you have this file, run the script, gen_pedigree.py and enter

    the name or registration number at the prompt. This will generate a new comma separated

    file, Animal_Name.csv. You can import this file into your spreadsheet

    program (Excel or OpenOffice), copy it, and paste it into the appropriate sire/dam page

    of the pedigree spreadsheet you are using.


    Excel users can use the script genExcelPedigree.py. This will automatically

    create a pedigree and open Excel to display it.


    The .csv file that is created or updated can be used as a master database.

    When you want to generate the pedigree for an animal that is in the database file,

    you can simply run gen_pedigree.py or genExcelPedigree.py for

    the animal without first having to download the information with getanimal.py.


    Excel users can use the script genExcelPedigree.py. This will automatically

    create a pedigree and open Excel to display it.


    The .csv file that is created or updated can be used as a master database.

    When you want to generate the pedigree for an animal that is in the database file,

    you can simply run gen_pedigree.py or genExcelPedigree.py for the animal without

    first having to download the information with getanimal.py.


    An additional utility is diversity.py. Once you have built up your local database .csv

    file, you might want to see how many times the same ancestors appear in an animal's

    pedigree. Enter the name or registration number of an animal at the prompt and this

    script will show the ancestors out to the seventh generation with a count of how many

    times they appear and which generations they appear in. The information will be saved

    in a file, .txt.