#3 Animals in sons/daus/unks lists not renumbered

2.0.0 Beta
closed-accepted
John B. Cole
9
2008-03-03
2005-02-24
John B. Cole
No

There is a bug in pyp_utils/renumber() such that the
offspring stored in myped[i].sons, myped[i].daus, and
myped[i].unks are not updated to reflect changes in
animal IDs when a pedigree is renumbered.

Discussion

  • John B. Cole
    John B. Cole
    2005-11-08

    Logged In: YES
    user_id=56102

    This can be fixed using the idmap and backmap dictionaries
    in the NewPedigree object. It will be fixed in 2.0.0a20.

     
  • John B. Cole
    John B. Cole
    2005-11-08

    • priority: 8 --> 9
    • status: open --> pending-accepted
     
  • John B. Cole
    John B. Cole
    2005-11-09

    Logged In: YES
    user_id=56102

    Given a pedigree object named 'example':

    example.kw['renumber'] = 1
    example.renumber()

    Will produce a renumbered pedigree with correctly renumbered
    offspring lists.

    This bug is fairly complicated and needs some explanation.
    If you load a pedigree and renumber it out-of-the-date, i.e.
    using the renumber option, there is no problem. When a
    pedigree is loaded, pyp_utils/assign_offspring is always
    called by the preprocessor, and this call is made after any
    calls to pyp_utils/renumber(). In this case, the offspring
    lists contain renumbered IDs. However, if you do not
    renumber a pedigree when you initially load it, and you call
    pyp_utils/renumber() later, the offspring lists are NOT
    updated. However, a call to pedobj.renumber() will always
    correctly renumber both the pedigree and the offspring lists.

     
  • John B. Cole
    John B. Cole
    2005-11-09

    • status: pending-accepted --> closed-accepted
     
  • John B. Cole
    John B. Cole
    2008-03-03

    • milestone: 428351 --> 2.0.0 Beta