wintermind / pypedal

2.0
GNU General Public License v2.0
12 stars 7 forks source link

Problems with pyp_metrics.mating_coi #13

Open jhagberg opened 7 years ago

jhagberg commented 7 years ago

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

jhagberg commented 7 years ago

Running Python 2.7 looks like its lots of import errors. And also some bugs in the code. I have fixed a running version that sort of works at least the mating_coi