Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Store custom proteins

New custom proteins will need to be stored in the 3DM custom protein storage first. This can be achieved with a request to the customproteindata API. Submit a HTTP POST request to https://api.bio-prodict.nl/customproteindata/customProteinDocument/doc with a custom protein document input as body. Add HTTP headers to set the data format using 'Content-type: application/json' and the credentials using 'Authorization: Bearer {token}'. Systems to align the custom protein to can be specified using the optional systems array. For any systems containing multiple subtrees/families these can be specified after the system separated by a colon, eg. sfamid1,sfamid2,sfamid2:4. Default subtree/family is used if left unspecified.

Example protein in custom protein input format (json):

Custom Protein Document Input Format
{
    "customId" : "test_3",
    "genename" : "HTR4",
    "description" : "Panel hit 4X",
    "sequence" : "MDELDANVSAKEGFKSVEKVVLLTFLSAVILMAILGNLDRQLRKI...",
    "taxonomyid" : 9940,
    "species" : "Ovis aries (Sheep)",

    "sharedWith" : 101,

	"systems": [ "sys1", "sys2", "sys3:2" ]
}

Custom proteins by default are only visible to the user that submitted the protein. To ensure all users of your group can access the custom protein set sharedWith to the numerical id of the group you want to share the protein with. Alternatively, you can use the custom protein overview pages described in the 'External links' paragraph to set sharedWith on an individual custom protein basis. A customId and sequence are required, the other fields are optional. On successfull completion the endpoint will return a json formatted document containing data on the custom protein. This document contains the protein id used internally which is required to add alignments to the protein later on:

Custom Protein Document Internal Format
{
    "alignments": [
        {
            "alnseq": "---mdeldanvtflsa VILMMVAV 0 CRDRLR k",
            "basedOn": "W5P3X7",
            "basedOnAlnseq": "---mdvvlltflsa VVMVAV 0 CQLR k",
            "coreidentity": 0.4669421487603306,
            "creationDate": null,
            "familyid": 1,
            "sfamid": "NR_demo_2008",
            "subfamily": "2Y00A",
            "subfamilyid": 1
        }
    ],
    "crc64": "5AD84C839BC59B38",
    "created": 1528960179030,
    "customId": "CP_test",
    "customJson": null,
    "description": "Panel hit 4X",
    "genename": "HTR4",
    "id": "5b2214b5d150683068d3e135",
    "lastmodified": 1528960179030,
    "lastmodifiedby": "{username}",
    "sequence": "MDELDANVSAKEGFKSVEKVVLLTFLSAVILMAI...",
    "sharedWith": 101,
    "species": "Ovis aries (Sheep)",
    "taxonomyid": 9940,
	"messages" : [ {
        "messageid" : "a04ac7b6-41c7-45a8-849f-a3ab45ac34e8",
        "timestamp" : 1541671271437,
        "text" : "Created new custom protein document",
        "username" : "{username}"
      }, {
        "messageid" : "3705d13d-1aee-4a8c-9b9c-e7430b83dd74",
        "timestamp" : 1541671271650,
        "text" : "Aligned custom protein to system NR_demo_2008 family 1",
        "username" : "{username}"
      } ],

}

Align existing document in new super-family

To align an existing custom protein to a new 3DM system use an HTTP POST request to https://api.bio-prodict.nl/customproteindata/customProteinDocument/{id}/align?requestedsystems={list} The requestedsystems parameter is described in the Submit document paragraph, the id of the custom protein can be found in the json document returned by the initial call storing it.

Retrieve custom proteins

There are multiple options to retrieve custom proteins, all of the URLs should be appended to the API base URL of https://api.bio-prodict.nl/customproteindata

EndpointReturns
/customProteinDocumentsA list of all accessible custom protein
/customProteinDocuments/{id}Find a custom protein by id
/customProteinDocument/byAlignment?sfamid={sfamid}&subfamilyid={subfamilyid}List of custom proteins aligned to a specific subfamily in a specific 3DM system
/customProteinDocument/bySystem?sfamid={sfamid}List of custom proteins aligned to a specific 3DM system
/customProteinDocuments/search/findByCustomId?customId={customid}Find a custom protein by customId
/customProteinDocuments/search/findByIdIn?id={id1,id2,id3}List of custom proteins by id

Remove custom proteins

Existing custom proteins can be removed using an HTTP DELETE request to https://api.bio-prodict.nl/customproteindata/customProteinDocument/{id}

External links to custom proteins

Given the id of a custom protein and the sfamid of the 3DM system the protein is aligned in there are currently two pages available that can be used to view custom protein data. For an overview of available custom proteins in a 3DM system use: https://3dmjs.bio-prodict.nl/#!/system-{sfamid}/alignment-1/subset-1/numberingscheme--1/custom-proteins this page links to detail pages for each custom protein that can be reached using: https://3dmjs.bio-prodict.nl/#!/system-{sfamid}/alignment-1/subset-1/numberingscheme--1/customprotein-{id}/general

  • No labels