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

parents from an inbreeding line were not sticked together #46

Closed jiunyanding closed 5 years ago

jiunyanding commented 5 years ago

Hi there,

I'm trying to draw some pedigree maps with madeline PDE and most of them are related to inbreeding program. I found a problem and don't know how to solve it:

parents from an inbreeding line were not stuck together, they were connected by dashed lines

it looks like this inbreeding f1_005 and f1_006 looks good, but the others are not.

How can I make the madeline to draw all parent pairs in the same manner as the f1_005Xf1_006?

Thank you.

piratical commented 5 years ago

Hi, Jiunyanding,

Madeline was unfortunately not designed to handle the kind of inbred pedigrees such as the one that you have provided as an example in your email. The main reason for this is that Madeline was mainly designed to handle human pedigrees where such a pedigree as your example would not occur.

To fix the problem probably requires writing a new sorting algorithm that is only used in the case of inbred pedigrees such as the one in your example.

The place where one would start to look in the code would be in the NuclearFamily class, and specifically you would want to take a look at the PRIVATE method in that class called _rearrangeIndividualsBasedOnTwins and probably various things related to that method:

https://github.com/piratical/Madeline_2.0_PDE/blob/master/src/NuclearFamily.cpp line 109 and following.

The original goal of _rearrangeIndividualsBasedOnTwins was only to sort all of the twins together to separate them from any non-twin siblings that remain. The algorithm does not pay attention to any additional sorting factors. Therefore, one would probably want to add additional criteria to make the software look at who was mated with whom and then group those together as well. That would go a very long way toward supporting your example pedigree and, more generally, would make Madeline much more useful for animal breeding studies in general.

If I have time, I will take a look at this myself. However, the reality is that I have moved on to a new job an have very little free time to work on Madeline. So unfortunately, I may not have time to look at this myself.

In any case, do keep an eye out for new commits to the github repository.

Best Wishes -- Ed Trager

On Tue, May 28, 2019 at 7:55 AM jiunyanding notifications@github.com wrote:

Hi there,

I'm trying to draw some pedigree maps with madeline PDE and most of them are related to inbreeding program. I found a problem and don't know how to solve it:

parents from an inbreeding line were not stuck together, they were connected by dashed lines

it looks like this [image: inbreeding] https://user-images.githubusercontent.com/44456360/58475960-fc968d00-8181-11e9-97f9-1f6098e2b200.jpg f1_005 and f1_006 looks good, but the others are not.

How can I make the madeline to draw all parent pairs in the same manner as the f1_005Xf1_006?

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/piratical/Madeline_2.0_PDE/issues/46?email_source=notifications&email_token=ADPQPTFHASEKVSUAMGBBSQDPXUMSVA5CNFSM4HQCT4D2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWGU63A, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPQPTGMCCVLTU42MB6JNUDPXUMSVANCNFSM4HQCT4DQ .

jiunyanding commented 5 years ago

Dear Ed,

Because I'm not a pro coder, it is barely impossible for me to modify the source code. I'll take a look at that part of codes you mentioned and see if I can do anything.

I totally can understand your situation now but I still hope to see if you can have time to improve madeline.

Thank you.

Best regards,

Jiun-Yan Ding