joshuaharia / AncestreeGP

1 stars 1 forks source link

Pedigree structuring of the family tree #5

Open joshuaharia opened 1 month ago

joshuaharia commented 1 month ago

Currently, the family tree structure shows as a network where each sibling of the same two parents is linked with one line to the father and one line to the mother, meaning that there are multiple lines coming off of each parent.

If we want this to look like a pedigree diagram, I think we would need to either find a way of handling the data in this way, or maybe we could create a separate invisible intermediary node.

Sort of like this where the unfilled circles are the invisible nodes: image

I will have a ponder about this and see if I can come up with any solutions 🧐

joshuaharia commented 1 month ago

I have a look at graphviz and using this website for quickly visualising graphviz, I drafted what I think the logic should be. So connecting both parents to a dummy node and connecting the dummy node to all children.

This is an example of what I mean.

Unfortunately I don't know if graphviz supports the straight lines that a pedigree diagram has.

Example below: image

Also I think with multiple children, new dummy nodes will also need to be created.

I wonder if there is a way to do it using something else other than graphviz.

Lynd148 commented 1 month ago

Hi

Watching this with interest. Unfortunately having to juggle some fairly urgent family business at the same time.

Over the week end we clearly had very limited time and so quite reasonably adopted a quickly constructed graphical representation to display what we were trying to do. However, if we really want to be impactful I believe that we should find a way to display pedigrees in the way that people working in the field would expect.

So for instance, it would be good if we could emulate the symbols and structuring showed here https://www.genome.gov/genetics-glossary/Pedigree#:~:text=A%20pedigree%2C%20as%20related%20to,trait(s)%20of%20interest. . You will see that this makes males and females distinct and also makes it easy to determine who is in what generation. If we could do this then I think that a whole community would immediately relate to what we are trying to do. Apologies if I am being an awkward clinician and stating a requirement rather than being prepared to bend / distort the requirement to match the solution. Surely there must already be code somewhere to support this kind of graphical representation? Have also found this https://www.genome.gov/Pages/Education/Modules/YourFamilyHealthHistory.pdf which amongst other things usefully presents the symbols that are commonly used when representing pedigrees.

And this wiki usefully defines precisely what is meant by 1st and 2nd degree relatives here https://en.wikipedia.org/wiki/Coefficient_of_relationship#:~:text=A%20first%2Ddegree%20relative%20(FDR,child%20(son%20or%20daughter). . I thought that we had got that pretty much right. As you will see, spouses are not considered to be related in the context of pedigrees.

Happy to add the above to github if that would be helpful?

Over the weekend I thought that I had found a graphic that nicely showed all relatives who are first degree. Sadly I can’t find that today

Hope this helps

Best wishes

John W

John Williams

@.> @.

From: Joshua Haria @.> Sent: 16 October 2024 23:12 To: joshuaharia/AncestreeGP @.> Cc: Subscribed @.***> Subject: Re: [joshuaharia/AncestreeGP] Pedigree structuring of the family tree (Issue #5)

I have a look at graphviz and using this website for quickly visualising graphviz, I drafted what I think the logic should be. So connecting both parents to a dummy node and connecting the dummy node to all children.

This is an example of what I mean.

Unfortunately I don't know if graphviz supports the straight lines that a pedigree diagram has.

Example below: image.png (view on web) https://github.com/user-attachments/assets/7ce3bd1e-63bb-4051-a0e5-51587155dfc0

Also I think with multiple children, new dummy nodes will also need to be created.

I wonder if there is a way to do it using something else other than graphviz.

— Reply to this email directly, view it on GitHub https://github.com/joshuaharia/AncestreeGP/issues/5#issuecomment-2418057437 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGBIIGAXNUUPOKST4WKADZ33QC5AVCNFSM6AAAAABQCFZ4B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGA2TONBTG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

joshuaharia commented 1 month ago

Hi Watching this with interest. Unfortunately having to juggle some fairly urgent family business at the same time. Over the week end we clearly had very limited time and so quite reasonably adopted a quickly constructed graphical representation to display what we were trying to do. However, if we really want to be impactful I believe that we should find a way to display pedigrees in the way that people working in the field would expect. So for instance, it would be good if we could emulate the symbols and structuring showed here https://www.genome.gov/genetics-glossary/Pedigree#:~:text=A%20pedigree%2C%20as%20related%20to,trait(s)%20of%20interest. . You will see that this makes males and females distinct and also makes it easy to determine who is in what generation. If we could do this then I think that a whole community would immediately relate to what we are trying to do. Apologies if I am being an awkward clinician and stating a requirement rather than being prepared to bend / distort the requirement to match the solution. Surely there must already be code somewhere to support this kind of graphical representation? Have also found this https://www.genome.gov/Pages/Education/Modules/YourFamilyHealthHistory.pdf which amongst other things usefully presents the symbols that are commonly used when representing pedigrees. And this wiki usefully defines precisely what is meant by 1st and 2nd degree relatives here https://en.wikipedia.org/wiki/Coefficient_of_relationship#:~:text=A%20first%2Ddegree%20relative%20(FDR,child%20(son%20or%20daughter). . I thought that we had got that pretty much right. As you will see, spouses are not considered to be related in the context of pedigrees. Happy to add the above to github if that would be helpful? Over the weekend I thought that I had found a graphic that nicely showed all relatives who are first degree. Sadly I can’t find that today Hope this helps Best wishes John W John Williams @.> @. From: Joshua Haria @.> Sent: 16 October 2024 23:12 To: joshuaharia/AncestreeGP @.> Cc: Subscribed @.> Subject: Re: [joshuaharia/AncestreeGP] Pedigree structuring of the family tree (Issue #5) I have a look at graphviz and using this website for quickly visualising graphviz, I drafted what I think the logic should be. So connecting both parents to a dummy node and connecting the dummy node to all children. This is an example of what I mean. Unfortunately I don't know if graphviz supports the straight lines that a pedigree diagram has. Example below: image.png (view on web) https://github.com/user-attachments/assets/7ce3bd1e-63bb-4051-a0e5-51587155dfc0 Also I think with multiple children, new dummy nodes will also need to be created. I wonder if there is a way to do it using something else other than graphviz. — Reply to this email directly, view it on GitHub <#5 (comment)> , or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGBIIGAXNUUPOKST4WKADZ33QC5AVCNFSM6AAAAABQCFZ4B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGA2TONBTG4 . You are receiving this because you are subscribed to this thread.Message ID: @.>

Good afternoon John

Thank you for sending the graphics. I agree, I definitely think it would be the most intuitive way to show the relations and also make it clear to clinicians. I think there exists modules to display a family tree in a pedigree diagram, however, I am not sure if it is interactive. I think it just creates a bog standard image (jpeg/png ect) which you can view only. I think if we can find a way to utilise the mechanism and apply it to our demo that would be ideal.

With regards to the details on what is described as a first/second degree relationship, please do add to the github (I assume you mean the readme?) with details about this as I think it would be helpful :)

Thank you John

ps I have redacted some info from your message as it was showing your phone number! Hope you don't mind

Josh

Lynd148 commented 1 month ago

Thanks Josh

In the past used RStudio for research and so went looking to see what packages exist and found this: README https://cran.r-project.org/web/packages/pedsuite/readme/README.html and also this The kinship2 R Package for Pedigree Data - PMC https://pmc.ncbi.nlm.nih.gov/articles/PMC4154601/ . It looks as if they should be freely available from CRAN. Unfortunately right now I don’t have access to a working RStudio platform. These packages seem to utilise the icons and layouts that we seek and I would expect them to be able to access data from a range of databases including SQL

John Williams

From: Joshua Haria @.> Sent: 18 October 2024 12:44 To: joshuaharia/AncestreeGP @.> Cc: Lynd148 @.>; Comment @.> Subject: Re: [joshuaharia/AncestreeGP] Pedigree structuring of the family tree (Issue #5)

Hi Watching this with interest. Unfortunately having to juggle some fairly urgent family business at the same time. Over the week end we clearly had very limited time and so quite reasonably adopted a quickly constructed graphical representation to display what we were trying to do. However, if we really want to be impactful I believe that we should find a way to display pedigrees in the way that people working in the field would expect. So for instance, it would be good if we could emulate the symbols and structuring showed here https://www.genome.gov/genetics-glossary/Pedigree#:~:text=A%20pedigree%2C%20as%20related%20to,trait(s)%20of%20interest. . You will see that this makes males and females distinct and also makes it easy to determine who is in what generation. If we could do this then I think that a whole community would immediately relate to what we are trying to do. Apologies if I am being an awkward clinician and stating a requirement rather than being prepared to bend / distort the requirement to match the solution. Surely there must already be code somewhere to support this kind of graphical representation? Have also found this https://www.genome.gov/Pages/Education/Modules/YourFamilyHealthHistory.pdf which amongst other things usefully presents the symbols that are commonly used when representing pedigrees. And this wiki usefully defines precisely what is meant by 1st and 2nd degree relatives here https://en.wikipedia.org/wiki/Coefficient_of_relationship#:~:text=A%20first%2Ddegree%20relative%20(FDR,child%20(son%20or%20daughter). . I thought that we had got that pretty much right. As you will see, spouses are not considered to be related in the context of pedigrees. Happy to add the above to github if that would be helpful? Over the weekend I thought that I had found a graphic that nicely showed all relatives who are first degree. Sadly I can’t find that today Hope this helps Best wishes John W John Williams @.> @. From: Joshua Haria @.> Sent: 16 October 2024 23:12 To: joshuaharia/AncestreeGP @.> Cc: Subscribed @.> Subject: Re: [joshuaharia/AncestreeGP] Pedigree structuring of the family tree (Issue #5 https://github.com/joshuaharia/AncestreeGP/issues/5 ) I have a look at graphviz and using this website for quickly visualising graphviz, I drafted what I think the logic should be. So connecting both parents to a dummy node and connecting the dummy node to all children. This is an example of what I mean. Unfortunately I don't know if graphviz supports the straight lines that a pedigree diagram has. Example below: image.png (view on web) https://github.com/user-attachments/assets/7ce3bd1e-63bb-4051-a0e5-51587155dfc0 Also I think with multiple children, new dummy nodes will also need to be created. I wonder if there is a way to do it using something else other than graphviz. — Reply to this email directly, view it on GitHub <#5 (comment) https://github.com/joshuaharia/AncestreeGP/issues/5#issuecomment-2418057437 > , or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGBIIGAXNUUPOKST4WKADZ33QC5AVCNFSM6AAAAABQCFZ4B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGA2TONBTG4 . You are receiving this because you are subscribed to this thread.Message ID: @.>

Good afternoon John

Thank you for sending the graphics. I agree, I definitely think it would be the most intuitive way to show the relations and also make it clear to clinicians. I think there exists modules to display a family tree in a pedigree diagram, however, I am not sure if it is interactive. I think it just creates a bog standard image (jpeg/png ect) which you can view only. I think if we can find a way to utilise the mechanism and apply it to our demo that would be ideal.

With regards to the details on what is described as a first/second degree relationship, please do add to the github (I assume you mean the readme?) with details about this as I think it would be helpful :)

Thank you John

ps I have redacted some info from your message as it was showing your phone number! Hope you don't mind

Josh

— Reply to this email directly, view it on GitHub https://github.com/joshuaharia/AncestreeGP/issues/5#issuecomment-2422277150 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AETGBINK67TIAUOAVKKHBE3Z4DX6NAVCNFSM6AAAAABQCFZ4B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRSGI3TOMJVGA . You are receiving this because you commented. https://github.com/notifications/beacon/AETGBILKQWTPRIJCGCCQLSLZ4DX6NA5CNFSM6AAAAABQCFZ4B6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUQMECB4.gif Message ID: @. @.> >