Difference between revisions of "Addon:DNASegmentMapGramplet"

From Gramps
Jump to: navigation, search
m (See also)
(Update DNAgramplet for change in data entry, added legend in graph, and added tooltip info)
Line 12: Line 12:
 
* Create an Association for one person (Person A) with another Person (Person B) of the type DNA.
 
* Create an Association for one person (Person A) with another Person (Person B) of the type DNA.
 
* Create a Note in the Association of Type: "Association Note" with the shared DNA segment data.
 
* Create a Note in the Association of Type: "Association Note" with the shared DNA segment data.
** The format of the Note is a comma separated list in the order: <code>Chromosome Number, Start Segment, End Segment, Flag for maternal/paternal side, shared length in cMs</code>.  
+
** The format of the Note is a comma separated list in the order: <code>Chromosome Number, Start Segment, End Segment, shared length in cMs, SNP (optional)</code>.  
** eg: <code>3,56950055,64247327,M,10.9</code> Which means; Chromosome Number: 3, Start Segment: 56950055, End Segment: 64247327, Flag for maternal/paternal side: M (for maternal side), shared length in cMs: 10.9
+
** eg: <code>3,56950055,64247327,10.9,1404</code> Which means; Chromosome Number: 3, Start Segment: 56950055, End Segment: 64247327, shared length in cMs: 10.9, matching SNPs: 1404</code>
 
** Valid entries for each are:
 
** Valid entries for each are:
  
Line 22: Line 22:
 
;End Segment: The endinging number for the segment location.
 
;End Segment: The endinging number for the segment location.
  
;Flag for maternal/paternal side: refer to the following table:
+
;Shared length in cMs: The Genetic Distance otherwise known as the number of centiMorgans in the segment.
  
{| {| {{prettytable}}
+
;SNP: optional field of the matching SNPs (Single Nucleotide Polymorphism) in the segment.
!Flag for maternal/paternal side
 
!Description
 
|-
 
|M
 
|Maternal side
 
|-
 
|P
 
|Paternal side
 
|-
 
|U
 
|Unknown side
 
|}
 
  
;Shared length in cMs: The Genetic Distance otherwise known as the number of centimorgans in the segment.
 
 
{{-}}
 
{{-}}
 
===Getting the chromosome data ===
 
===Getting the chromosome data ===
Line 44: Line 31:
  
 
===Legend===
 
===Legend===
* For each Chromosome the top portion is the P (Paternal) side and the M (Maternal) side is the bottom portion.
+
* For each Chromosome the top portion is the Paternal side and the bottom portion is the Maternal side.
* If the chromosome segment side (Paternal or Maternal) is U (Unknown side), the segment will cover both the top and bottom portions of the chromosome and be 50% transparent.
+
* The chromosome segment side (Paternal or Maternal) is determined from the Most Recent Common Ancestor. If there is no common ancestor, both sides are used.
* Hovering the cursor over a known chromosome segment will show a pop up a tooltip with the name of the associated person and the length (in cMs (centimorgans)) of the shared segment.
+
* Hovering the cursor over a painted chromosome segment will show a tooltip with the name of the associated person, ID, length in cMs (centiMorgans) of the shared segment, and matching SNPs of the segment if provided.
 
* The color code for each associated person in the DNA segment map is consistent but not user-specified. The first Association will always be the same color.
 
* The color code for each associated person in the DNA segment map is consistent but not user-specified. The first Association will always be the same color.
  
Line 54: Line 41:
 
The first is DNA Association for Robert F. Garner (I1123).
 
The first is DNA Association for Robert F. Garner (I1123).
  
  3,56950055,64247327,M,10.9
+
  3,56950055,64247327,10.9,375
9,23087926,31116823,M,10.2
+
  11,25878681,35508918,9.9,396
9,74923489,107731789,M,40.0
+
  12,129481599,133491098,12.4,304
  11,25878681,35508918,M,9.9
+
  15,35444614,64710827,33.3,1212
  12,129481599,133491098,M,12.4
+
  1,48053426,68837810,24.6,3413
  15,35444614,64710827,M,33.3
+
  1,72956037,87857969,13.4,2035
  1,48053426,68837810,M,24.6
+
  3,69656569,74563488,9.0,974
  1,72956037,87857969,M,13.4
+
  6,6179882,15400114,18.5,1994 
  3,69656569,74563488,M,9.0
 
  6,6179882,15400114,M,18.5
 
  
 
The second is for the DNA Association of Maude Garner (I0651).
 
The second is for the DNA Association of Maude Garner (I0651).
  
  1,30578594,38686908,M,11.2
+
  1,30578594,38686908,11.2,334
  1,236520701,249210707,M,29.7
+
  1,236520701,249210707,29.7,685
  3,14446545,24339734,M,12.3
+
  3,14446545,24339734,12.3,458
  3,128688499,140766208,M,11.4
+
  3,128688499,140766208,11.4,447
  4,76585823,114118650,M,33.7
+
  4,76585823,114118650,33.7,1317
  4,163973796,190915650,M,49.1
+
  4,163973796,190915650,49.1,1422
  6,4737179,9181572,M,10.3
+
  6,4737179,9181572,10.3,279
  6,39128976,49586285,M,15.8
+
  6,39128976,49586285,15.8,510
  6,150564916,156389148,M,10.2
+
  6,150564916,156389148,10.2,415
  7,18915133,37547290,M,25.8
+
  7,18915133,37547290,25.8,1038
  7,93557588,116296896,M,20.2
+
  7,93557588,116296896,20.2,821
  7,141636563,156148608,M,30.9
+
  7,141636563,156148608,30.9,787
  8,2808265,6919748,M,10.7
+
  8,2808265,6919748,10.7,436
  8,12568161,42652859,M,38.7
+
  8,12568161,42652859,38.7,1556
  8,49039681,71454529,M,20.3
+
  8,49039681,71454529,20.3,742
  8,71990280,99554231,M,21.9
+
  8,71990280,99554231,21.9,917
  9,78958599,122204804,M,55.7
+
  9,78958599,122204804,55.7,2014
  10,5608202,10769007,M,10.4
+
  10,5608202,10769007,10.4,333
  10,19365648,38434090,M,19.6
+
  10,19365648,38434090,19.6,775
  11,26722523,37020611,M,11.8
+
  11,26722523,37020611,11.8,447
  12,66412457,94422155,M,24.4
+
  12,66412457,94422155,24.4,1035
  13,19234747,23899627,M,8.7
+
  13,19234747,23899627,8.7,270
  13,74422984,91183468,M,14.2
+
  13,74422984,91183468,14.2,506
  14,23902753,33048583,M,15.5
+
  14,23902753,33048583,15.5,392
  14,88816167,106020366,M,37.8
+
  14,88816167,106020366,37.8,947
  15,23727655,27246462,M,8.2
+
  15,23727655,27246462,8.2,229
  16,22836249,32137965,M,12.6
+
  16,22836249,32137965,12.6,413
  16,46644903,54620503,M,11.7
+
  16,46644903,54620503,11.7,360
  17,13905,6613192,M,18.9
+
  17,13905,6613192,18.9,419
  17,25567080,44187492,M,19.7
+
  17,25567080,44187492,19.7,694
  17,44790203,72115774,M,39.7
+
  17,44790203,72115774,39.7,1223
  18,18714991,47726830,M,27.9
+
  18,18714991,47726830,27.9,1071
  18,69454453,77894844,M,23.5
+
  18,69454453,77894844,23.5,481
  19,1993444,11174625,M,28.1
+
  19,1993444,11174625,28.1,567
  19,54545531,59087479,M,12.7
+
  19,54545531,59087479,12.7,335
  20,9879166,26225145,M,24.3
+
  20,9879166,26225145,24.3,788
  20,30221104,43975451,M,13.5
+
  20,30221104,43975451,13.5,489
  21,14670124,18743733,M,10.8
+
  21,14670124,18743733,10.8,201
  
 
=== Example ===
 
=== Example ===
Line 130: Line 115:
 
= Issues =
 
= Issues =
 
* If the Chromosome Number is not in the range (1, 2, ..., 22, X) it is ignored.  
 
* If the Chromosome Number is not in the range (1, 2, ..., 22, X) it is ignored.  
* If there is a Most Recent Common Ancestor (MRCA), that relationship is used instead of the maternal/paternal flag. If the MRCA is thru the maternal side, then M is used independent of what is in the data file. If there are multiple paths to a common ancestor, the closest found is used.
+
* If there are multiple paths to a common ancestor, the closest found is used.
 
* To create a segment map for Person A, you need to add associations to Person A. There is no reciprocal relationship for Person B - that is, there is no segment map for Person B, only for Person A. You can execute the [[Addon:SyncAssociation]] addon to create any missing reciprocal relationships.
 
* To create a segment map for Person A, you need to add associations to Person A. There is no reciprocal relationship for Person B - that is, there is no segment map for Person B, only for Person A. You can execute the [[Addon:SyncAssociation]] addon to create any missing reciprocal relationships.
 
* Color code for each associated person in the map is consistent but not user-specified. The first Association will always be the same color.
 
* Color code for each associated person in the map is consistent but not user-specified. The first Association will always be the same color.
 
* Help link goes to https://gramps-project.org/wiki/index.php?title=Gramps_5.1_Wiki_Manual_-_Gramplets#DNA
 
* Help link goes to https://gramps-project.org/wiki/index.php?title=Gramps_5.1_Wiki_Manual_-_Gramplets#DNA
* [https://github.com/gramps-project/addons-source/tree/maintenance/gramps51/DNA Source code] - Unlisted Gramplet you need to [[5.1_Addons#Manually_installed_Addons|manually download and install]] ( include_in_listing = False ) https://github.com/gramps-project/addons/raw/master/gramps51/download/DNA.addon.tgz
 
 
* If there are overlapping segments within a maternal/paternal view of a chromosome, only the front (last drawn) will be pickable. If it is completely obscured, you will not be able to see the details of the hidden segment.
 
* If there are overlapping segments within a maternal/paternal view of a chromosome, only the front (last drawn) will be pickable. If it is completely obscured, you will not be able to see the details of the hidden segment.
  

Revision as of 23:35, 17 October 2020

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.

Example DNA Gramplet

The DNA Gramplet shows a DNA segment map as a graph.

Usage

You can install the DNA Gramplet on the bottombar of one of the people category list views.

Create a DNA Association

To specify shared DNA segments between 2 people,

  • Create an Association for one person (Person A) with another Person (Person B) of the type DNA.
  • Create a Note in the Association of Type: "Association Note" with the shared DNA segment data.
    • The format of the Note is a comma separated list in the order: Chromosome Number, Start Segment, End Segment, shared length in cMs, SNP (optional).
    • eg: 3,56950055,64247327,10.9,1404 Which means; Chromosome Number: 3, Start Segment: 56950055, End Segment: 64247327, shared length in cMs: 10.9, matching SNPs: 1404
    • Valid entries for each are:
Chromosome Number
number between 1-22 or X
Start Segment
The starting number for the segment location.
End Segment
The endinging number for the segment location.
Shared length in cMs
The Genetic Distance otherwise known as the number of centiMorgans in the segment.
SNP
optional field of the matching SNPs (Single Nucleotide Polymorphism) in the segment.


Getting the chromosome data

Sites like GEDmatch make this shared chromosome data available. There can be additional Associations between Person A and Person C et cetera as known.

Legend

  • For each Chromosome the top portion is the Paternal side and the bottom portion is the Maternal side.
  • The chromosome segment side (Paternal or Maternal) is determined from the Most Recent Common Ancestor. If there is no common ancestor, both sides are used.
  • Hovering the cursor over a painted chromosome segment will show a tooltip with the name of the associated person, ID, length in cMs (centiMorgans) of the shared segment, and matching SNPs of the segment if provided.
  • The color code for each associated person in the DNA segment map is consistent but not user-specified. The first Association will always be the same color.

DNA Example data

To reproduce the illustration with the Example.gramps dataset, create two Associations of type DNA for Luther Robinson(I0656).

The first is DNA Association for Robert F. Garner (I1123).

3,56950055,64247327,10.9,375
11,25878681,35508918,9.9,396
12,129481599,133491098,12.4,304
15,35444614,64710827,33.3,1212
1,48053426,68837810,24.6,3413
1,72956037,87857969,13.4,2035
3,69656569,74563488,9.0,974
6,6179882,15400114,18.5,1994  

The second is for the DNA Association of Maude Garner (I0651).

1,30578594,38686908,11.2,334
1,236520701,249210707,29.7,685
3,14446545,24339734,12.3,458
3,128688499,140766208,11.4,447
4,76585823,114118650,33.7,1317
4,163973796,190915650,49.1,1422
6,4737179,9181572,10.3,279
6,39128976,49586285,15.8,510
6,150564916,156389148,10.2,415
7,18915133,37547290,25.8,1038
7,93557588,116296896,20.2,821
7,141636563,156148608,30.9,787
8,2808265,6919748,10.7,436
8,12568161,42652859,38.7,1556
8,49039681,71454529,20.3,742
8,71990280,99554231,21.9,917
9,78958599,122204804,55.7,2014
10,5608202,10769007,10.4,333
10,19365648,38434090,19.6,775
11,26722523,37020611,11.8,447
12,66412457,94422155,24.4,1035
13,19234747,23899627,8.7,270
13,74422984,91183468,14.2,506
14,23902753,33048583,15.5,392
14,88816167,106020366,37.8,947
15,23727655,27246462,8.2,229
16,22836249,32137965,12.6,413
16,46644903,54620503,11.7,360
17,13905,6613192,18.9,419
17,25567080,44187492,19.7,694
17,44790203,72115774,39.7,1223
18,18714991,47726830,27.9,1071
18,69454453,77894844,23.5,481
19,1993444,11174625,28.1,567
19,54545531,59087479,12.7,335
20,9879166,26225145,24.3,788
20,30221104,43975451,13.5,489
21,14670124,18743733,10.8,201

Example

Addon-DNA-Note-Example.png

Create an Association of type DNA as described in the Association page to Person A. Add a Note with the DNA shared segment data. Set the Note private if you do not want the data printed in reports.


Addon-DNA-Association-Example.png

Save the Association.

Addon-DNA-Associations-Example.png

Add more associations as known. Each would be associated to a different person and have a different Note.

Addon-DNA-SegmentMap.png

Add the DNA gramplet to the Person view. Select the DNA tab. The segment map will be color coded by associated person. For each Chromosome the top portion is the P (Paternal) side and the M (Maternal) side is the bottom portion. If the chromosome segment side (Paternal or Maternal) is unknown, the segment will cover both the top and bottom portions of the chromosome and be 50% transparent.

Addon-DNA-SegmentMap-with-Tooltip.jpg

Hovering the cursor over a known segment will pop up the name of the associated person and the length (in cMs) of the shared segment.

Issues

  • If the Chromosome Number is not in the range (1, 2, ..., 22, X) it is ignored.
  • If there are multiple paths to a common ancestor, the closest found is used.
  • To create a segment map for Person A, you need to add associations to Person A. There is no reciprocal relationship for Person B - that is, there is no segment map for Person B, only for Person A. You can execute the Addon:SyncAssociation addon to create any missing reciprocal relationships.
  • Color code for each associated person in the map is consistent but not user-specified. The first Association will always be the same color.
  • Help link goes to https://gramps-project.org/wiki/index.php?title=Gramps_5.1_Wiki_Manual_-_Gramplets#DNA
  • If there are overlapping segments within a maternal/paternal view of a chromosome, only the front (last drawn) will be pickable. If it is completely obscured, you will not be able to see the details of the hidden segment.

See also