Hi everyone,
I want to report two ‘bugs’ I found while running scripts to query target-disease associations.
- The first one regards the protein KDM4C (lysine demethylase 4C, UniProt ID: Q9H3R0). While running a query (see the code below), I noticed that the information about its association with diseases appears to be wrongly formatted (or formatted differently compared to all the other proteins). In fact the information about diseases associated with this target are not stored in [‘data’][‘mapIds’][‘mappings’][0][‘hits’][0] as all the others protein, but instead are stored in [‘data’][‘mapIds’][‘mappings’][0][‘hits’][1]
I have included the piece of code below for you to try and see the problem:
query UniprotID_to_diseases {
mapIds(queryTerms: [“Q9H3R0”]) {
mappings {
hits {
id
name
object {
… on Target {
id
approvedSymbol
approvedName
associatedDiseases{
count
rows {
disease {
id
name
}
score
}
}
}
}
}
}
}
}
2)The second issue regards the Disease_ID and Disease_Name association. As I understand it, each Disease_Name should be associated with a unique Disease_ID. However, while running some code for my research, I noticed that two different Disease_IDs (‘MONDO_0001836’ and ‘EFO_0010269’) are associated with diseases having the same name (amenorrhea). My question is, are these diseases different? And if so, why do they have the same name?
Thank you so much
Vittorio
Hi @Vittorio_lembo,
Thank you so much for pointing these out. We will look into it.
Best,
Prashant
Hi Vittorio,
I can offer some help with question 1. It’s because the query term “Q9H3R0” maps to more than one target. The API is designed to map a query term to one of the entities (so here I would recommend adding the argument entityNames: ["target"]
if you only want to query targets and not map to diseases and drugs as well) and return everything that matches, which is often more than one hit. Once you have your response, you will likely need to cherry-pick the hits of interest because the hit of interest is not always at index 0.
I hope that helps,
James
1 Like
Hi James,
Thank you for your help; it’s much clearer now how the mapIds function works. By the way, I tried adding the entityNames: [“target”] line to my code, but the results look the same.
Here I include the my code :
query diseases_from_target($queryTerms:String!) {
mapIds(queryTerms: [$queryTerms]
entityNames: [“target”]) {
mappings {
hits {
id
name
object {
… on Target {
id
approvedSymbol
approvedName
associatedDiseases(
page: { index: 0, size: 50}
orderByScore: “score”
BFilter: “”
aggregationFilters:
enableIndirect: false
){
count
rows {
disease {
id
name
}
score
}
}
}
}
}
}
}
}
Query variables:
{“queryTerms”: “Q9H3R0”}
This is the result, which is the same as I got without the line entityNames: ["target"]
:
{
“data”: {
“mapIds”: {
“mappings”: [
{
“hits”: [
** {**
** “id”: “ENSG00000293552”,**
** “name”: “ENSG00000293552”,**
** “object”: {**
** “id”: “ENSG00000293552”,**
** “approvedSymbol”: “ENSG00000293552”,**
** “approvedName”: “novel protein”,**
** “associatedDiseases”: {**
** “count”: 0,**
** “rows”: **
** }**
}
},
{
“id”: “ENSG00000107077”,
“name”: “KDM4C”,
“object”: {
“id”: “ENSG00000107077”,
“approvedSymbol”: “KDM4C”,
“approvedName”: “lysine demethylase 4C”,
“associatedDiseases”: {
“count”: 177,
“rows”: [
{
“disease”: {
“id”: “EFO_0004703”,
“name”: “age at menarche”
},
“score”: 0.4390582174360332
}, TRONCATED
It is also not clear to me why the target id (ENSG00000293552) is the argument of most of the keys in [‘data’][‘mapIds’][‘mappings’][0][‘hits’][0]
Thank you so much for your help
Vittorio