@GaryGriffin by the way, is there a specific reason why the paternal chromosomes are pink and the maternal ones blue by default? It confused me at first but perhaps Iām too conservative
No reason. I probably switched them by mistake long ago and never noticed. I will switch them.
1 Like
Added a DNA segment endpoint to Gramps Web API
gramps-project:master
ā DavidMStraub:dna
opened 09:58AM - 12 Sep 23 UTC
This PR adds a new endpoint `/api/people/<handle>/dna/matches` that returns matc⦠hing DNA segments between the person and any other person. It is based on notes with CSVs/TSVs as described in the [DNA Segment Map Gramplet Wiki page](https://gramps-project.org/wiki/index.php/Addon:DNASegmentMapGramplet). The code copies heavily from that Gramplet written by @Nick-Hall and @GaryGriffin, which means that the Gramplet and the API endpoint are compatible with each other; data that works with one will work with the other as well.
This is just a `GET` endpoint as data can be added simply using existing endpoints for notes and people.
Example response:
```json
[
{
"ancestor_handles": [
"ce338b9b-73ff-48c5-8981-444819ec132c"
],
"handle": "d7ddbdbf-cfbe-4fc6-b054-2f10faa99b2c",
"relation": "le premier cousin",
"segments": [
{
"SNPs": 1404,
"cM": 10.9,
"chromosome": "1",
"comment": "",
"side": "P",
"start": 56950055,
"stop": 64247327
},
{
"SNPs": 1700,
"cM": 12.0,
"chromosome": "5",
"comment": "",
"side": "P",
"start": 850055,
"stop": 950055
},
{
"SNPs": 1404,
"cM": 10.9,
"chromosome": "2",
"comment": "",
"side": "M",
"start": 56950055,
"stop": 64247327
},
{
"SNPs": 0,
"cM": 10.9,
"chromosome": "X",
"comment": "",
"side": "P",
"start": 56950055,
"stop": 64247327
}
]
}
]
```
Unit tests are added and API specs updated.
2 Likes
system
Closed
October 12, 2023, 10:04am
24
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.