Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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}'. 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 subtrees/ families these can be specified after the system separated by a colon, eg. sfamid1,sfamid2,sfamid2:4. Default subtree/ family is used if the family is left unspecified.

Example protein in custom protein input format (json):

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

A batch insert option is available to store multiple custom proteins at once. This option can be invoked using a POST request to https://api.bio-prodict.nl/customproteindata/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.

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

Document Formats

Input format

Code Block
titleCustom 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


Code Block
titleCustom Protein Document Internal Format
{
    "alignmentsid": "5b2214b5d150683068d3e135",
[    "customId": "CP_test",
   { "crc64": "5AD84C839BC59B38",
    "created": 1528960179030,
    "alnseqcustomJson": "---mdeldanvtflsa VILMMVAV 0 CRDRLR k"null,
    "description": "Panel hit 4X",
    "basedOngenename": "W5P3X7HTR4",
    "lastmodified": 1528960179030,
      "basedOnAlnseqlastmodifiedby": "---mdvvlltflsa VVMVAV 0 CQLR k{username}",
    "sequence": "MDELDANVSAKEGFKSVEKVVLLTFLSAVILMAI...",
      "coreidentitysharedWith": 0.4669421487603306{groupid},
    "species": "Ovis aries (Sheep)",
    "creationDatetaxonomyid": null9940,
	"alignments": [
          "familyid": 1,{
             "sfamidalnseq": "NR_demo_2008---mdeldanvtflsa VILMMVAV 0 CRDRLR k",
            "subfamilybasedOn": "2Y00AW5P3X7",
            "subfamilyidbasedOnAlnseq": 1"---mdvvlltflsa VVMVAV 0 CQLR k",
    }     ],     "crc64coreidentity": "5AD84C839BC59B38",0.4669421487603306,
      "created": 1528960179030,     "customIdcreationDate": "CP_test"null,
    "customJson": null,        "descriptionfamilyid": "Panel1,
hit 4X",     "genename": "HTR4",     "idsfamid": "5b2214b5d150683068d3e135NR_demo_2008",
      "lastmodified": 1528960179030,     "lastmodifiedbysubfamily": "{username}2Y00A",
      "sequence": "MDELDANVSAKEGFKSVEKVVLLTFLSAVILMAI...",     "sharedWithsubfamilyid": 101,1
    "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}"
      } ],

}

Store multiple documents

A batch insert option is available to store multiple custom proteins at once. This option can be invoked using a POST request to https://api.bio-prodict.nl/customproteindata/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.

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

...

}

...

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

...