piratical / Madeline_2.0_PDE

The Madeline 2.0 Pedigree Drawing Engine (PDE) is a pedigree drawing program designed to handle large and complex pedigrees with an emphasis on readability and aesthetics. The program was designed primarily for human pedigrees.
GNU General Public License v2.0
19 stars 18 forks source link

Force male partner to always render on left in relationship line #39

Closed huyhong closed 1 year ago

huyhong commented 7 years ago

Per the NSGC recommendation on the Standardized Human Pedigree Nomenclature:

If possible, male partner should be to left of female partner on relationship line

Having issues finding out how to force drawings to always render the male partner on the left. If you have any pointers where to look in the code, would much appreciate :).

Example data:

FamilyId
IndividualId
Gender
Father
Mother
Deceased
Proband
DOB
MZTwin
DZTwin
Sampled

Test U0p100 M .      .      Y . .          . . .
Test U0p101 F .      .      Y . .          . . .
Test U0m100 M .      .      Y . .          . . .
Test U0m101 F .      .      Y . .          . . .
Test U00200 M U0p100 U0p101 Y . .          . . .
Test U00201 F U0m100 U0m101 Y . .          . . .
Test U00102 M .      .      . . .          . . .
Test U00107 F U00200 U00201 . Y .          . . .
Test U00108 F U00102 U00107 . . .          . . .
Test U00109 F U00102 U00107 . . .          . . .

Resulting drawing from example data above:

screen shot 2016-11-21 at 3 19 02 pm

Example issues:

piratical commented 7 years ago

Hi, Huyhong,

You are right about the Pedigree Standardization Taskforce recommendation that the male partner always be rendered on the left. When we wrote Madeline 2.0 PDE, we were aware of Bennett et al.'s paper, but we felt certain recommendations of the Task Force were very arbitrary and did not enhance pedigree readability. Having the male always on the left is one of those arbitrary "standards" that we did not give much weight to. In the example that you provided, the nuclear family that begins with U0m100 & U0m101 is rendered first (in this case because the ID numbers sort at the beginning of the sorted list of all individual IDs) and therefore offspring U00201 is drawn on the left. U00107 is also drawn on the left because U00107 is part of the U0m100 & U0m101 descent tree, while U00102 is a married-in "founder" with no ancestors shown. The rule in Madeline 2.0 is to draw the direct descendants in a descent tree first, and then their married-in spouses after them on the right, with absolutely no regard to gender. In this way, Madeline is a bit gender "agnostic". If I have time, I'll look for the place in the code where this could be modified. If I do modify it, most likely I would implement a new switch to force "male on left" or "female on left", while the default would probably remain as it currently is ...