Getting Started
You can easily install PyCoM using pip, from our GitHub respository.
pip3 install git+https://github.com/scdantu/pycom
Now, you are ready to use PyCoM:
from pycom import PyCom, CoMAnalysis
import matplotlib.pyplot as plt
pyc = PyCom(remote=True)
prots = pyc.find( # search for proteins with:
min_length=200, # 200-210 residues
max_length=210,
disease='cancer', # that are associated with cancer
has_substrate=True, # have a known substrate
page=1,
matrix=True # and load their coevolution matrices
)
CoMAnalysis().add_contact_predictions(prots) # add contact predictions
plt.axis('off'); plt.title(f'Contact Map for uniprot_id={prots.uniprot_id[0]}')
plt.imshow(prots.contact_matrix[0]) # plot the contact map
print(prots.iloc[0]) # print the protein's details
uniprot_id P62070
neff 12.754
sequence_length 204
sequence MAAAGWRDGSGQEK...
organism_id 9606
helix_frac 0.29902
turn_frac 0.019608
strand_frac 0.220588
has_ptm 1
has_pdb 1
has_substrate 1
matrix [[0.0, 0.268, ...
contact_matrix [[0.0, 0.0, ...
Name: 0, dtype: object
|
Click here if the image is not showing.
Optionally download the database locally, to speed up the loading: https://pycom.brunel.ac.uk/downloads/
Quick guides
Here are some quick guides on starting up using PyCoM:
You can use PyCoM in three different ways:
PyCoM (local) tutorial: Download the database to your computer and use PyCoM.
PyCoM (remote) tutorial: Work with the database on PyCoM server using PyCoM.
WebAPI tutorial: Work with the WebAPI without using PyCoM.
There is also a Alignment File Repository, where 370,000+ alignment files are available for download. See: https://pycom.brunel.ac.uk/alignments/
More indepth tutorials are available in the Tutorials section.
Differences
- You can work with PyCoMdb in three different modes:
PyCoM (local): Download the database to your computer and use PyCoM.
PyCoM (remote): Work with the database on PyCoM server using PyCoM.
WebAPI: Work with the WebAPI without using PyCoM.
Using PyCoM (local) allows access to all the functional features, while PyCoM (remote) and the WebAPI has some limitations as shown in the table below:
Functionality |
|
|
|
Query the database |
Y |
Y |
Y |
Load matrices |
Y |
Y |
Y |
Display basic properties of each entry1 |
Y |
Y |
Y |
Provides access to |
Y |
N |
N |
1. Diseases |
|||
2. CATH |
|||
3. EC ID |
|||
4. PDB id list |
|||
5. Organism taxonomy |
|||
6. Substrates list |
|||
7. List of Cofactors |
|||
8. PTM’s |
|||
9. List of Ligands |
|||
10. Molecular functions |
|||
11. biological processes |
|||
12. cellular components |
|||
13. protein domain |
|||
14. coding sequence diversity |
|||
15. developmental stage |
|||