Getting Started

Basic Usage

Pep-Calc API resources are accessed via the HTTP GET requests listed in the API Reference. An example for the peptide sequence 'RPKPQQFFGLM' using the Basic Properties resource is shown below. The API is available at http://api.pep-calc.com/. Input parameters such as sequence (seq) and N- and C-terminus formulae (N_term and C_term respectively) are passed in the query string (see URL Encoding below).

The output is returned as a JSON object consisting of key/value pairs. For the Basic Properties resource (shown) this includes calculated properties such as formula and molecularWeight.

Request:

GET /peptide?seq=RPKPQQFFGLM&N_term=H&C_term=OH
Host: api.pep-calc.com

Response:

{
   "cModified": false,
   "cName": "Acid",
   "cString": "OH",
   "formula": "C63H97N17O14S",
   "molecularWeight": "1347.7122",
   "nModified": false,
   "nName": "Unmodified",
   "nString": "H",
   "seqLength": 11,
   "seqList": ["R", "P", "K", "P", "Q", "Q", "F", "F", "G", "L", "M"],
   "seqString": "RPKPQQFFGLM"
}

Further calculated properties are available via the Isoelectric Point, Charge Summary and Extinction Coefficient resources, for example:

Request:

GET /peptide/iso?seq=RPKPQQFFGLM&N_term=H&C_term=OH

Response:

{
   "pI": "11.51"
}

The ChemDraw Generation resource can be used to return a ChemDraw file for the sequence. Examples of MS peak assignment and \beta-strand propensity value calculation using Pep-Calc API are given in Further Calculation Functions.

URL Encoding

It will often be necessary to pass sequence variables containing reserved characters to Pep-Calc API, therefore correct URL encoding should be used when constructing the query string.

For example, the sequence string 'GVLYVG(pS)K(pT)KEGVVHGVA' contains the reserved characters '(' and ')' which need to be encoded as follows in the seq query parameter: GVLYVG%28pS%29K%28pT%29KEGVVHGVA.

URL encoding libraries are available in many languages, see Programming Using Pep-Calc API for more information.