Git Product home page Git Product logo

pypedal's Issues

Python 3 compatibility

I thought that this project was dead (from sourceforge) and was happy to find it on github. However, no release has been made since 2012 and python setup.py install failed under Python 3.8.

If this package is no longer maintained, perhaps @wintermind can put the repo in archive mode.

Shortcut for computing inbreeding when creating/loading pedigree

Right now, the only way to do this is using the form_nrm keyword. That's fine for small pedigrees, and really slow for large ones. It would be nice if you could tell PyPedal to load the pedigree, and as part of the loading process compute the CoI and store them in the pedigree. Note that it is important that the method for computing inbreeding be user-specifiable.

The downside is that this will require some work, and will save only one line of code for the user.

Problems with pyp_metrics.mating_coi

Here you got a bug report.

I am using your program for our old homestead rabbits Gotlandskanin here in Sweden.
I would like to calculate inbreed. But I got the following error.


File "gottis.py", line 32, in <module>
    print pyp_metrics.mating_coi(test.idmap[test.namemap['1158-1624']],test.idmap[test.namemap['1115-1528']],test)
  File "build/bdist.linux-x86_64/egg/PyPedal/pyp_metrics.py", line 1574, in mating_coi
TypeError: cannot concatenate 'str' and 'int' objects

I basically just load the pedigree and then try to calculate.

     test = pyp_newclasses.loadPedigree(options)
    print test
    print pyp_metrics.mating_coi(test.idmap[test.namemap['1158-1624']],test.idmap[test.namemap['1115-1528']],test)

Running the git version from main branch

Confusion regarding loading pedigree from database

I'm struggling to get my head around how I can load a pedigree from sqlite.
Where do I enter the name of the animal I want to retrieve from the database?

Lets say I want to run the below script, I'm looking for a horse in my database called Verve (there is more than one horse with this name also).

from PyPedal import pyp_newclasses

options = {}
options['messages'] = 'verbose'
options['pedfile'] = 'Verve.ped'
options['pedformat'] = 'ASDx'
options['database_name'] = 'pypedal'
options['dbtable_name'] = 'horses_pp'
options['database_type'] = 'sqlite'

if __name__ == '__main__':

    example = pyp_newclasses.loadPedigree(options,pedsource='db') 
    example.metadata.printme()

I have imported my data into the default sqlite database for PyPedal

animalID        integer UNIQUE,                 animalName      varchar(128),                 sireID          integer,                 damID           integer,                 generation      real,                 infGeneration   real,                 birthyear       integer,                 sex             char(1),                 coi             real,                 founder         char(1),                 ancestor        char(1),                 originalID      text,                 renumberedID    integer,                 pedgreeComp     real,                 breed           text,                 age             real,                 alive           char(1),                 num_sons        integer,                 num_daus        integer,                 num_unk         integer

    "122499"	"164141"	"Verve"	"41674"	"103037"	"NULL"	"NULL"	"2001"	"D"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"	"NULL"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.