Getting started: WebAPI
Working with PyCoM WebAPI will be useful if you wish to develop libraries for PyCoM using other programming languages or access the data in batch.
Unlike the other two versions, you will be running these queries in your favourite browser. For list of supported query keywords see below.
How to use the WebAPI
You can access the WebAPI for PyCoMdb using the following link.
The find
endpoint is used to execute all the searches using the list of query keywords provided below.
Here are few examples that you can run from the navigation bar of your favourite browser:
All proteins associated with cancer (first 10 entries):
https://pycom.brunel.ac.uk/api/find?disease=cancer
The second page of that (entries 11 to 20):
https://pycom.brunel.ac.uk/api/find?disease=cancer&page=2
Entries with cofactor FAD which have a PTM, and have a disease associated with them: https://pycom.brunel.ac.uk/api/find?cofactor=FAD&has_ptm=true&has_disease=true
The same result as before, but now loading the matrices (by setting matrix=true) https://pycom.brunel.ac.uk/api/find?cofactor=FAD&has_ptm=true&has_disease=true&matrix=true
Supported query keywords
List of supported query keywords for the WebAPI:
Special keywords: * page
: The page number of the results. (default: 1) * per_page
: The number of results per page. (default: 10, max: 100 [without matrix], 10 [with matrix]) * matrix
: Whether to include the matrix data in the results. (True
/False
, default: False
)
Protein-specific keywords:
uniprot_id
: The UniProt ID of the protein.sequence
: The amino acid sequence of protein to search for. (full match)min_length
/max_length
: Min/Max number of residues in the protein.min_helix
/max_helix
: Min/Max percentage of helical structure in the protein.min_turn
/max_turn
: Min/Max percentage of turn structure in the protein.min_strand
/max_strand
: Min/Max percentage of beta strand structure in the protein.organism
: Taxonomic name of the genus / species of the protein. (case-insensitive)Species name or any parent taxonomic level can be used. (
pyc.get_organism_list()
for full list)Surround with
:
to get precise results:homo:
returnsHomo sapiens
&Homo sapiens neanderthalensis
)homo
also returns homoeomma, thomomys, and hundreds others
organism_id
: Precise NCBI Taxonomy ID of the species of the protein. (prefer to useorganism
instead)cath
: CATH classification of the protein (3.40.50.360
or3.40.*.*
or3.*
).enzyme
: Enzyme Commission number of the protein. (1.3.1.3
or1.3.*.*
or1.*
).has_substrate
: Whether the protein has a known substrate. (True
/False
)has_ptm
: Whether the protein has a known post-translational modification. (True
/False
)has_pdb
: Whether the protein has a known PDB structure. (True
/False
)disease
: The disease associated with the protein. (name of disease, case-insensitive, e.gcancer
)Use
pyc.get_disease_list()
for full list.cancer
searches forOvarian cancer
,Lung cancer
, …
disease_id
: The ID of the disease associated with the protein. (DI-02205
, get_disease_list()has_disease
: Whether the protein is associated with a disease. (True
/False
)cofactor
: The cofactor associated with the protein. (name of cofactor, case-insensitive, e.gZn(2+)
])cofactor_id
: The ID of the cofactor associated with the protein. (CHEBI:00001
, get_cofactor_list())biological_process
: Biological process associated with the protein. (e.gantiviral defense
, usepyc.get_biological_process_list()
for full list)cellular_component
: Cellular component associated with the protein. (e.gnucleus
, usepyc.get_cellular_component_list()
for full listdomain
: Domain associated with the protein. (e.gzinc-finger
, usepyc.get_domain_list()
for full list)ligand
: Ligand associated with the protein. (e.gzinc
, usepyc.get_ligand_list()
for full listmolecular_function
: Molecular function associated with the protein. (e.gantioxidant activity
, usepyc.get_molecular_function_list()
for full listptm
: Post-translational modification associated with the protein. (e.gphosphoprotein
, usepyc.get_ptm_list()
for full list