Uploaded image for project: 'PhenoTips'
  1. PT-3881

Pedigree editor may fail to load some pedigrees with multi-generation relationships

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4.1, 1.5-milestone-1
    • Component/s: Pedigree
    • Labels:
      None

      Description

      Note: there is no data loss unless the user overwrites the pedigree after failing to load the existing one

      The problem is that after some layout changes come nodes may get coordinates which have a fractional part (as opposed to being an integer). Pedigree editor mistakenly identifies those are incorrect coordinates (which is bug #1), and fails to correctly ignore those as designed (which is bug #2) and display the pedigree using the rest of the data

      Both bugs are in the _generateOrdersAndPositionsFromLayout() method in import.js


      How to reproduce:

      1) draw any pedigree with a multi-generation edge, and save
      (e.g mother-father-child, then make the child a partner of one of the parents)

      2) go to the family page and view the family as an object (http://localhost:8080/edit/Families/FAM0000001?editor=object)

      3) edit "pedigree data" in "PedigreeClass 0", and modiy the "x" value of some relationship to a non-integer value (depending on layout, may need to modify "x" values of only certain relationships. For the example above - mother-father-child-who-is-a-partner the very first relationship works):

      e.g.

      {"layout":{"relationships":{"3":{"x":21, ...

      ->

      {"layout":{"relationships":{"3":{"x":21.5, ...

      (the same can happen via UI, but only for a more complicated pedigree)

      ...or just replace pedigree data with the pedigree below:

      {"layout":{"relationships":{"3":{"x":21.5,"order":2},"5":{"x":7,"order":1}},"members":{"0":{"generation":3,"x":21,"order":2},"1":{"generation":1,"x":33,"order":3},"2":{"generation":1,"x":9,"order":1},"7":{"generation":5,"x":7,"order":0}},"longedges":{"5":{"path":[{"x":-3,"order":0},{"x":-3,"order":0},{"x":-3,"order":0}],"member":2}}},"relationships":[{"children":[{"id":0}],"members":[1,2],"id":3},{"children":[{"id":7}],"members":[0,2],"id":5}],"settings":{"legendSettings":{"preferences":{"style":"multisector"},"abnormalities":{"disorders":{},"phenotypes":{},"causalGenes":{},"cancers":{},"candidateGenes":{},"carrierGenes":{}}}},"members":[{"id":0,"properties":{"date":"2018-11-08T19:31:08.000Z","parental_names":{"paternal_first_name":"","maternal_first_name":"","paternal_last_name":"","maternal_last_name":""},"apgar":{},"notes":{"family_history":"","prenatal_development":"","indication_for_referral":"","genetic_notes":"","medical_history":"","diagnosis_notes":""},"ethnicity":{"maternal_ethnicity":[],"paternal_ethnicity":[]},"date_of_birth":{},"solved":{"pubmed_id":[""],"status":"unsolved"},"external_id":"","clinicalStatus":"affected","phenotips_version":"1.4-SNAPSHOT","disorders":[],"features":[],"date_of_death":{},"contact":[{"institution":"http://phenotips.org/","name":"Administrator","id":"xwiki:XWiki.Admin","email":"support@phenotips.org"}],"last_modification_date":"2018-11-08T20:07:57.000Z","patient_name":{"last_name":"","first_name":""},"specificity":{"date":"2018-11-08T19:29:27.118Z","score":0,"server":"monarchinitiative.org"},"nonstandard_features":[],"id":"P0000010","prenatal_perinatal_history":{"gestation":null},"genes":[],"life_status":"alive","sex":"F","clinical-diagnosis":[],"reporter":"Admin","last_modified_by":"Admin","report_id":"P0000010","meta":{"hgnc_version":"2017-07-18T13:03:51.594Z","omim_version":"2017-07-18T18:53:21.802Z","ordo_version":"2.3","hpo_version":"releases/2017-06-30","phenotips_version":"1.4-SNAPSHOT"}}},{"id":1,"properties":{"features":[],"disorders":[],"date_of_death":{},"genes":[],"life_status":"alive","date_of_birth":{},"sex":"F","patient_name":{"last_name":"","first_name":""},"external_id":"","nonstandard_features":[],"phenotips_version":"1.4-SNAPSHOT"}},{"id":2,"properties":{"features":[],"disorders":[],"date_of_death":{},"genes":[],"life_status":"alive","date_of_birth":{},"sex":"M","patient_name":{"last_name":"","first_name":""},"external_id":"","nonstandard_features":[],"phenotips_version":"1.4-SNAPSHOT"}},{"id":7,"properties":{"features":[],"disorders":[],"family_history":{"consanguinity":true},"date_of_death":{},"genes":[],"life_status":"alive","date_of_birth":{},"sex":"U","patient_name":{"last_name":"","first_name":""},"external_id":"","nonstandard_features":[],"phenotips_version":"1.4-SNAPSHOT"}}],"JSON_version":"1.0","proband":0}
      

        Attachments

          Activity

            People

            • Assignee:
              asm Andriy Misyura
              Reporter:
              asm Andriy Misyura
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: