Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFO: add xref details to node data #21

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

bfoltyn
Copy link
Contributor

@bfoltyn bfoltyn commented Nov 9, 2023

#18

@bfoltyn bfoltyn changed the title Add xref details to node data EFO: add xref details to node data Nov 9, 2023
@bfoltyn bfoltyn marked this pull request as ready for review November 9, 2023 14:13
@bfoltyn
Copy link
Contributor Author

bfoltyn commented Nov 9, 2023

@dhimmel I don't know why, but I can't add add you as a reviewer.

image

Could you please review this PR?

Copy link
Member

@dhimmel dhimmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I'm thinking we should possibly not write the xref sources and mapping properties tables to output anymore as this PR will give the majority of users what they want.

return {
k: v[["xref_id", "sources", "relation"]].to_dict(orient="records")
for k, v in xref_details.groupby("efo_id")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you paste a couple examples of xref_details values here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EFO:0000479
"xref_details": [
        {
          "xref_id": "cohd:438383",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": null
        },
        {
          "xref_id": "DOID:2224",
          "sources": [
            "EFO:0000479",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "gard:0006594",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": null
        },
        {
          "xref_id": "icd10:D47.3",
          "sources": [
            "DOID:2224",
            "ORDO:3318/e",
            "Orphanet:3318"
          ],
          "relation": null
        },
        {
          "xref_id": "icd9:238.71",
          "sources": [
            "DOID:2224",
            "EFO:0000479",
            "MONDO:equivalentTo",
            "MONDO:i2s",
            "i2s"
          ],
          "relation": null
        },
        {
          "xref_id": "icdo:9962/3",
          "sources": [
            "NCIT:C3407"
          ],
          "relation": null
        },
        {
          "xref_id": "mesh:D013920",
          "sources": [
            "DOID:2224",
            "EFO:0000479",
            "MONDO:equivalentTo",
            "ORDO:3318/e",
            "Orphanet:3318",
            "Orphanet:3318/e"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "MONDO:0005029",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "meddra:10015493",
          "sources": [
            "ORDO:3318/e",
            "Orphanet:3318",
            "Orphanet:3318/e"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "NCIT:C3407",
          "sources": [
            "DOID:2224",
            "EFO:0000479",
            "MONDO:equivalentTo",
            "MONDO:exact-label-match",
            "exact-label-match"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "omim:187950",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "omim:601977",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "omim:614521",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "oncotree:ET",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": null
        },
        {
          "xref_id": "orphanet:3318",
          "sources": [
            "DOID:2224",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "orphanet:71493",
          "sources": [
            "DOID:2224",
            "MONDO:relatedTo"
          ],
          "relation": null
        },
        {
          "xref_id": "snomedct:109994006",
          "sources": [
            "DOID:2224",
            "EFO:0000479",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:C0040028",
          "sources": [
            "DOID:2224",
            "MONDO:equivalentTo",
            "NCIT:C3407",
            "ORDO:3318/e",
            "Orphanet:3318",
            "Orphanet:3318/e"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "snomedct:128844009",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:189508006",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:189513005",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:189514004",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:191333009",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:234499005",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:307652003",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "snomedct:65471002",
          "sources": null,
          "relation": "skos:closeMatch"
        }
      ],
EFO:0000489
"xref_details": [
        {
          "xref_id": "DOID:0050936",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "MONDO:0000550",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "NCIT:C48576",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "NCIT:C48576",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:C1257877",
          "sources": [
            "MONDO:equivalentTo",
            "NCIT:C48576"
          ],
          "relation": "skos:exactMatch"
        }
      ],
EFO:0000640
"xref_details": [
        {
          "xref_id": "DOID:4465",
          "sources": [
            "EFO:0000640",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "gard:0009572",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": null
        },
        {
          "xref_id": "gard:0009575",
          "sources": [
            "MONDO:equivalentTo",
            "shared-umls-xref"
          ],
          "relation": null
        },
        {
          "xref_id": "icd10:C64",
          "sources": [
            "ORDO:319298/ntbt",
            "ORDO:47044/attributed",
            "ORDO:47044/ntbt",
            "Orphanet:319298",
            "Orphanet:47044"
          ],
          "relation": null
        },
        {
          "xref_id": "MONDO:0017884",
          "sources": null,
          "relation": null
        },
        {
          "xref_id": "mesh:C538614",
          "sources": null,
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "NCIT:C6975",
          "sources": [
            "DOID:4465",
            "EFO:0000640",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "omim:605074",
          "sources": [
            "DOID:4465",
            "EFO:0000640",
            "MONDO:equivalentTo",
            "ORDO:47044/e",
            "Orphanet:47044"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "oncotree:PRCC",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": null
        },
        {
          "xref_id": "orphanet:319298",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "orphanet:47044",
          "sources": [
            "MONDO:equivalentTo",
            "OMIM:605074"
          ],
          "relation": null
        },
        {
          "xref_id": "snomedct:733608000",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:C1306837",
          "sources": [
            "DOID:4465",
            "MONDO:equivalentTo",
            "NCIT:C6975",
            "ORDO:319298/e",
            "Orphanet:319298",
            "Orphanet:319298/e"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:C1336078",
          "sources": [
            "DOID:4465",
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:C2931899",
          "sources": null,
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "umls:CN205129",
          "sources": [
            "MONDO:equivalentTo"
          ],
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "NCIT:C27890",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "Orphanet:47044",
          "sources": null,
          "relation": "skos:exactMatch"
        },
        {
          "xref_id": "snomedct:4797003",
          "sources": null,
          "relation": "skos:closeMatch"
        },
        {
          "xref_id": "umls:C1336839",
          "sources": null,
          "relation": "skos:closeMatch"
        }
      ],

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

One note for future investigation is that it'd be nice to understand what the MONDO:equivalentTo source refers to (i.e. where it originates and how) and whether it implies (or should imply) a skos:exactMatch relation.

)

return {
k: v[["xref_id", "sources", "relation"]].to_dict(orient="records")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be nicest to have relation come before sources, since relation is generally of greater interest and information content per character? Not a strong preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done

Copy link
Member

@dhimmel dhimmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Will merge and then kick off an EFO export

@bfoltyn
Copy link
Contributor Author

bfoltyn commented Nov 9, 2023

I'm thinking we should possibly not write the xref sources and mapping properties tables to output anymore

@dhimmel Ok, I removed it

@dhimmel dhimmel merged commit c8e0502 into related-sciences:main Nov 9, 2023
1 check passed
@bfoltyn bfoltyn deleted the xref-properties branch November 9, 2023 16:27
@dhimmel
Copy link
Member

dhimmel commented Nov 9, 2023

kick off an EFO export

Output in 7201f20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants