ProteinsWebTeam / interpro7-api

https://www.ebi.ac.uk/interpro/api/
Apache License 2.0
17 stars 2 forks source link

How to get Pfam domain graphic feature #149

Closed lh12565 closed 3 months ago

lh12565 commented 3 months ago

Hi, I used the "http://pfam-legacy.xfam.org/protein/P53_HUMAN/graphic" api to get TP53 domain graphic feature (json like below) before, but now the "http://pfam-legacy.xfam.org" site didn't work. I tried to find the api in the interpro, but I didn't find the similar api to get the data. Can you tell me how to get the similar json. Thanks!

"ASCL1": [{
                "length": 236,
                "regions": [{
                    "modelStart": 3,
                    "modelEnd": 54,
                    "colour": "#2dcf00",
                    "endStyle": "curved",
                    "end": 171,
                    "display": true,
                    "startStyle": "curved",
                    "aliEnd": 171,
                    "modelLength": 54,
                    "text": "HLH",
                    "href": "\/family\/PF00010",
                    "type": "pfama",
                    "metadata": {
                        "scoreName": "e-value",
                        "score": "1.7e-14",
                        "description": "Helix-loop-helix DNA-binding domain",
                        "end": 171,
                        "accession": "PF00010",
                        "database": "pfam",
                        "identifier": "HLH",
                        "aliEnd": 171,
                        "type": "Domain",
                        "aliStart": 121,
                        "start": 119
                    },
                    "aliStart": 121,
                    "start": 119
                }],
                "markups": [],
                "metadata": {
                    "database": "uniprot",
                    "identifier": "ASCL1_HUMAN",
                    "organism": "Homo sapiens (Human)",
                    "description": "Achaete-scute homolog 1 {ECO:0000303|PubMed:8390674}",
                    "taxid": "9606",
                    "accession": "P50553"
                },
                "motifs": [{
                    "colour": "#00ffff",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 1, "end": 30},
                    "start": 1,
                    "end": 30,
                    "display": false
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 42, "end": 98},
                    "start": 71,
                    "end": 98,
                    "display": true
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 114, "end": 127},
                    "start": 114,
                    "end": 118,
                    "display": true
                }, {
                    "colour": "#00ffff",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 131, "end": 133},
                    "start": 131,
                    "end": 133,
                    "display": false
                }, {
                    "colour": "#00ffff",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 135, "end": 137},
                    "start": 135,
                    "end": 137,
                    "display": false
                }, {
                    "colour": "#00ffff",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 144, "end": 156},
                    "start": 144,
                    "end": 156,
                    "display": false
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 199, "end": 201},
                    "start": 199,
                    "end": 201,
                    "display": true
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 204, "end": 210},
                    "start": 204,
                    "end": 210,
                    "display": true
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 212, "end": 220},
                    "start": 212,
                    "end": 220,
                    "display": true
                }, {
                    "colour": "#cccccc",
                    "type": "disorder",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 222, "end": 223},
                    "start": 222,
                    "end": 223,
                    "display": true
                }, {
                    "colour": "#ffa500",
                    "type": "sig_p",
                    "metadata": {"database": "Phobius", "type": "sig_p", "start": 1, "end": 47},
                    "start": 1,
                    "end": 47,
                    "display": true
                }, {
                    "colour": "#32cd32",
                    "type": "coiled_coil",
                    "metadata": {"database": "ncoils", "type": "coiled_coil", "start": 40, "end": 60},
                    "start": 48,
                    "end": 60,
                    "display": true
                }, {
                    "colour": "#86bcff",
                    "type": "low_complexity",
                    "metadata": {"database": "segmasker", "type": "low_complexity", "start": 14, "end": 70},
                    "start": 61,
                    "end": 70,
                    "display": true
                }, {
                    "colour": "#00ffff",
                    "type": "low_complexity",
                    "metadata": {"database": "segmasker", "type": "low_complexity", "start": 118, "end": 131},
                    "start": 118,
                    "end": 118,
                    "display": false
                }, {
                    "colour": "#86bcff",
                    "metadata": {"database": "segmasker", "type": "low_complexity", "start": 14, "end": 70},
                    "type": "low_complexity",
                    "display": true,
                    "end": 47,
                    "start": 48
                }, {
                    "colour": "#00ffff",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 42, "end": 98},
                    "type": "disorder",
                    "display": false,
                    "end": 47,
                    "start": 48
                }, {
                    "colour": "#cccccc",
                    "metadata": {"database": "IUPred", "type": "disorder", "start": 42, "end": 98},
                    "type": "disorder",
                    "display": true,
                    "end": 60,
                    "start": 61
                }]
            }]
matthiasblum commented 3 months ago

Hi @lh12565,

The InterPro REST API does not support this format. Several values can be retrieved from the REST API, but you will have to re-structure the payload so it fits your desired JSON structure.