genome-one / monarch

https://genome-one.github.io/monarch/#/redoctopus
0 stars 0 forks source link

add clusters #19

Closed cmcnamara87 closed 7 years ago

cmcnamara87 commented 7 years ago

rough idea how to do it, using what we got

disease A and disease B get all their phenotypes stick them together in a set (so no duplicates)

for the first item in the set compare it, to the set (minus that item) using the owlsim api call get the results, calculate the sim scores if there are any over 85%, those can go in a cluster together

do it for the rest of the items in the set if you get matches, if any of the matched terms already exist in an existing cluster, just add those new matched terms, to the existing cluster

so, its probably about 21 api calls for skeletal abnormalities for achondroplasia example and, it might result in just in 1 big cluster, if everything in skeletal abnormalities is only like, 85% sim score away from anything else lol, but we can tweak that numbers until something shows up

for naming a cluster, you could use the LCS with the lowest information content that was used when making the cluster

cmcnamara87 commented 7 years ago

@genome-one look at these sweet clusters

for achondroplasia, and psuedoachondroplasia looking at only skeletal abnormalities (definitely has duplicates etc, but, still cool)

you can see, abnormal cranium, is solely achondroplasia, but, they both have limb and spine abnormalities

its so cool :D

abnormal cranium morphology

  • HP:0000256 - Macrocephaly, appears in: Achondroplasia

  • HP:0002645 - Wormian bones, appears in: Achondroplasia

  • HP:0002007 - Frontal bossing, appears in: Achondroplasia

  • HP:0002645 - Wormian bones, appears in: Achondroplasia

  • HP:0002645 - Wormian bones, appears in: Achondroplasia

  • HP:0002007 - Frontal bossing, appears in: Achondroplasia

Abnormality of the thorax

  • HP:0000772 - Abnormality of the ribs, appears in: Achondroplasia

  • HP:0000774 - Narrow chest, appears in: Achondroplasia

  • HP:0000774 - Narrow chest, appears in: Achondroplasia

  • HP:0000772 - Abnormality of the ribs, appears in: Achondroplasia

abnormal limb bone morphology

  • HP:0000944 - Abnormality of the metaphyses, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0002970 - Genu varum, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0002970 - Genu varum, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0006487 - Bowing of the long bones, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0005019 - Diaphyseal thickening, appears in: Achondroplasia

  • HP:0002970 - Genu varum, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0006487 - Bowing of the long bones, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0002970 - Genu varum, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0008905 - Rhizomelia, appears in: Achondroplasia

  • HP:0002970 - Genu varum, appears in: Achondroplasia Pseudoachondroplasia

abnormal joint mobility

  • HP:0001387 - Joint stiffness, appears in: Achondroplasia

  • HP:0005692 - Joint hyperflexibility, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0005692 - Joint hyperflexibility, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0001387 - Joint stiffness, appears in: Achondroplasia

abnormal spine curvature

  • HP:0002808 - Kyphosis, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0003307 - Hyperlordosis, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0003307 - Hyperlordosis, appears in: Achondroplasia Pseudoachondroplasia

  • HP:0002808 - Kyphosis, appears in: Achondroplasia Pseudoachondroplasia

dorsum phenotype

  • HP:0002867 - Abnormality of the ilium, appears in: Achondroplasia

  • HP:0008803 - Narrow sacroiliac notch, appears in: Achondroplasia

  • HP:0003312 - Abnormal form of the vertebral bodies, appears in: Achondroplasia

  • HP:0008803 - Narrow sacroiliac notch, appears in: Achondroplasia

  • HP:0003416 - Spinal canal stenosis, appears in: Achondroplasia

  • HP:0008803 - Narrow sacroiliac notch, appears in: Achondroplasia

  • HP:0008803 - Narrow sacroiliac notch, appears in: Achondroplasia

  • HP:0002867 - Abnormality of the ilium, appears in: Achondroplasia

Abnormality of the elbow

  • HP:0003042 - Elbow dislocation, appears in: Achondroplasia

  • HP:0009811 - Abnormality of the elbow, appears in: Achondroplasia

  • HP:0009811 - Abnormality of the elbow, appears in: Achondroplasia

  • HP:0003042 - Elbow dislocation, appears in: Achondroplasia

[
    {
        "lcs": {
            "IC": 3.3341696752783423,
            "id": "MP:0000438",
            "label": "abnormal cranium morphology"
        },
        "terms": [
            {
                "IC": 6.938875520482564,
                "id": "HP:0000256",
                "label": "Macrocephaly"
            },
            {
                "IC": 10.04164706092625,
                "id": "HP:0002645",
                "label": "Wormian bones"
            },
            {
                "IC": 7.564911743216829,
                "id": "HP:0002007",
                "label": "Frontal bossing"
            },
            {
                "IC": 10.04164706092625,
                "id": "HP:0002645",
                "label": "Wormian bones"
            },
            {
                "IC": 10.04164706092625,
                "id": "HP:0002645",
                "label": "Wormian bones"
            },
            {
                "IC": 7.564911743216829,
                "id": "HP:0002007",
                "label": "Frontal bossing"
            }
        ]
    },
    {
        "lcs": {
            "IC": 4.711895756883562,
            "id": "HP:0000765",
            "label": "Abnormality of the thorax"
        },
        "terms": [
            {
                "IC": 6.561561956057013,
                "id": "HP:0000772",
                "label": "Abnormality of the ribs"
            },
            {
                "IC": 8.833200919830317,
                "id": "HP:0000774",
                "label": "Narrow chest"
            },
            {
                "IC": 8.833200919830317,
                "id": "HP:0000774",
                "label": "Narrow chest"
            },
            {
                "IC": 6.561561956057013,
                "id": "HP:0000772",
                "label": "Abnormality of the ribs"
            }
        ]
    },
    {
        "lcs": {
            "IC": 4.1352133700252915,
            "id": "MP:0002115",
            "label": "abnormal limb bone morphology"
        },
        "terms": [
            {
                "IC": 6.854594178600537,
                "id": "HP:0000944",
                "label": "Abnormality of the metaphyses"
            },
            {
                "IC": 10.136935188230487,
                "id": "HP:0002970",
                "label": "Genu varum"
            },
            {
                "IC": 10.136935188230487,
                "id": "HP:0002970",
                "label": "Genu varum"
            },
            {
                "IC": 7.482661882651366,
                "id": "HP:0006487",
                "label": "Bowing of the long bones"
            },
            {
                "IC": 11.522972687509329,
                "id": "HP:0005019",
                "label": "Diaphyseal thickening"
            },
            {
                "IC": 10.136935188230487,
                "id": "HP:0002970",
                "label": "Genu varum"
            },
            {
                "IC": 7.482661882651366,
                "id": "HP:0006487",
                "label": "Bowing of the long bones"
            },
            {
                "IC": 10.136935188230487,
                "id": "HP:0002970",
                "label": "Genu varum"
            },
            {
                "IC": 9.75236510884578,
                "id": "HP:0008905",
                "label": "Rhizomelia"
            },
            {
                "IC": 10.136935188230487,
                "id": "HP:0002970",
                "label": "Genu varum"
            }
        ]
    },
    {
        "lcs": {
            "IC": 5.269070284780605,
            "id": "MP:0008069",
            "label": "abnormal joint mobility"
        },
        "terms": [
            {
                "IC": 8.344395650400454,
                "id": "HP:0001387",
                "label": "Joint stiffness"
            },
            {
                "IC": 8.721365108845779,
                "id": "HP:0005692",
                "label": "Joint hyperflexibility"
            },
            {
                "IC": 8.721365108845779,
                "id": "HP:0005692",
                "label": "Joint hyperflexibility"
            },
            {
                "IC": 8.344395650400454,
                "id": "HP:0001387",
                "label": "Joint stiffness"
            }
        ]
    },
    {
        "lcs": {
            "IC": 5.611360083332647,
            "id": "MP:0004174",
            "label": "abnormal spine curvature"
        },
        "terms": [
            {
                "IC": 6.601968477486052,
                "id": "HP:0002808",
                "label": "Kyphosis"
            },
            {
                "IC": 8.221864768316594,
                "id": "HP:0003307",
                "label": "Hyperlordosis"
            },
            {
                "IC": 8.221864768316594,
                "id": "HP:0003307",
                "label": "Hyperlordosis"
            },
            {
                "IC": 6.601968477486052,
                "id": "HP:0002808",
                "label": "Kyphosis"
            }
        ]
    },
    {
        "lcs": {
            "IC": 4.564245430640585,
            "id": "UBERON:0001137PHENOTYPE",
            "label": "dorsum phenotype"
        },
        "terms": [
            {
                "IC": 9.000775604948851,
                "id": "HP:0002867",
                "label": "Abnormality of the ilium"
            },
            {
                "IC": 14.387327609566935,
                "id": "HP:0008803",
                "label": "Narrow sacroiliac notch"
            },
            {
                "IC": 6.294111372146111,
                "id": "HP:0003312",
                "label": "Abnormal form of the vertebral bodies"
            },
            {
                "IC": 14.387327609566935,
                "id": "HP:0008803",
                "label": "Narrow sacroiliac notch"
            },
            {
                "IC": 9.90529011028809,
                "id": "HP:0003416",
                "label": "Spinal canal stenosis"
            },
            {
                "IC": 14.387327609566935,
                "id": "HP:0008803",
                "label": "Narrow sacroiliac notch"
            },
            {
                "IC": 14.387327609566935,
                "id": "HP:0008803",
                "label": "Narrow sacroiliac notch"
            },
            {
                "IC": 9.000775604948851,
                "id": "HP:0002867",
                "label": "Abnormality of the ilium"
            }
        ]
    },
    {
        "lcs": {
            "IC": 7.849007674786901,
            "id": "HP:0009811",
            "label": "Abnormality of the elbow"
        },
        "terms": [
            {
                "IC": 9.415437013958417,
                "id": "HP:0003042",
                "label": "Elbow dislocation"
            },
            {
                "IC": 7.849007674786901,
                "id": "HP:0009811",
                "label": "Abnormality of the elbow"
            },
            {
                "IC": 7.849007674786901,
                "id": "HP:0009811",
                "label": "Abnormality of the elbow"
            },
            {
                "IC": 9.415437013958417,
                "id": "HP:0003042",
                "label": "Elbow dislocation"
            }
        ]
    }
]
genome-one commented 7 years ago

@cmcnamara87 - how did you get to them?

cmcnamara87 commented 7 years ago

@genome-one basically the process i said above i take the set of all hpo terms (combined from both disorders)

for each individual term, i do the owlsim compare call, with the remaining items in the set e.g. compare "short stature" with {all phenotypes - short stature} any matches, go in a cluster, then you do it for the next term, any matches, either go into that first cluster, or into another cluster etc

i keep track of the lowest LCS for that cluster, and thats how i come up with the name

so it requires calling the owlsim compare api call N times, where N is the number of phenotypes (the example above is using the first 20 skeletal abnormalities)

jmcmurry commented 7 years ago

related to https://github.com/monarch-initiative/owlsim-v3/issues/89

davidyu85 commented 7 years ago

Have been looking into grouping the categories that shares similarity and the one doesn't

Before: image

After (see the axis that has both values > 0 are grouped): image

cmcnamara87 commented 7 years ago

So now when you are viewing Achondroplasia and Pseudoachondroplasia, and you click 'Abnormality of the Skeletal System' you will get this overview radar diagram, that shows which areas of the skeletal system are affected by which disorder.

So you can see, Achondroplasia (blue) affects your head, Pseudoachondroplasia (orange) you get osteoarthritis, but they both affect your spine, and your long bones.

Then you can look at the individual phenotypes, in the triptych.

jmcmurry commented 7 years ago

cc: @kshefchek

jmcmurry commented 7 years ago

this PoC ticket can now be closed