Custom Protein Data

The custom protein data API is available from https://api.bio-prodict.nl/customproteindata all specified endpoints use this base address.

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 /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}'. A customId and sequence are required, all other fields are optional. On successful completion the endpoint will return a json formatted document containing data on the custom protein (see below). This document contains the protein id used internally which is required to add alignments to the protein later on. Systems to align the custom protein to can be specified using the optional systems array. For any systems containing multiple families these can be specified after the system separated by a colon, eg. sfamid1,sfamid2,sfamid2:4. Default family is used if the family is left unspecified.

Custom Protein Accessibility

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. Details of the groups you are a member of can be retrieved using the Bio-Prodict Accounts API. Alternatively, you can use the custom protein overview pages described in the 'External links' paragraph to set sharedWith on an individual custom protein basis.Store multiple documents

Batch Store

A batch insert option is available to store multiple custom proteins at once. This option can be invoked using a POST request to /customProteinDocument/batch with a list of input documents as body. The input documents are described in the store single document paragraph. The endpoint will respond with a location url in the response headers of format https://api.bio-prodict.nl/customproteindata/poll/{uuid} This url can be polled to check on the progress of creating new custom proteins. When finished the poll call will respond with a retrieve endpoint that can be used to retrieve a list of all custom proteins stored successfully.

Update Custom Proteins

Custom protein documents can be updated using a HTTP PATCH request to /customProteinDocuments/{id} with a custom protein document data in input format as body. All fields are optional, you only need to specify what you want to update. Currently changing the customId or sequence is not supported.

Align existing document in new super-family

To align an existing custom protein to a new 3DM system use an HTTP POST request to /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

Document Formats

Input format

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" ]
}

Internal Format


Custom Protein Document Internal Format
{
    "id": "5b2214b5d150683068d3e135",
    "customId": "CP_test",
    "crc64": "5AD84C839BC59B38",
    "created": 1528960179030,
    "customJson": null,
    "description": "Panel hit 4X",
    "genename": "HTR4",
    "lastmodified": 1528960179030,
    "lastmodifiedby": "{username}",
    "sequence": "MDELDANVSAKEGFKSVEKVVLLTFLSAVILMAI...",
    "sharedWith": {groupid},
    "species": "Ovis aries (Sheep)",
    "taxonomyid": 9940,
	"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
        }
    ],
	"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}"
      } ],

}