An API for with working with Fragalysis data.
Project description
Documentation: https://xchem.github.io/fragalysis-api/
fragalysis-api
This api aims to allow any user to upload pdb files from the pdb or that they have created themselves, and analyse the ligand binding using the fragalysis webpage (https://fragalysis.diamond.ac.uk).
Installation
Not recommended: pip
To install with pip, you will need to install both pymol and rdkit separately, as these don't exist as pip packages.
To install fragalysis-api with pip:
pip install -e .
How to use API
- Set up environment
- Download PDB files and query the PDB for structures of the same protein bound to the same or different ligands
- Submit PDB files - you will be given a query ID
- Push your files into fragalysis and view them online :construction:
- Analyse the binding of ligands to your target protein! :construction:
Other functionalities that are available:
- Import pdb files directly through the API
- Query the pdb for similar structures that also have ligands bound and have the option to import these structures
Enforced rules :scroll:
- The pdb file shall not be greater than 5mb.
- The pdb filename shall not contain non English language ascii characters and shall be between 4 and 20 characters in length.
- Each pdb file for alignment shall contain the same number of chains.
- All pdb files to be aligned must be in the same directory.
- If manually selecting a file for reference it must be in the same director as all pdb files for alignment.
- PDB file must abide by best practices set out at https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/pdbintro.html#note5
- In PDB file, ligands must be referred to by same code in 'HET' lines in header and in 'HETATM' lines in main part of file
1. How to set install, update a fragalysis enviroment
Starting out by initialising an environment and activating it. Clone the repository and cd to the relevant directory. Install pymol and rdkit via conda, and the other dependcies via the setup.py file:
conda create -n fragalysis_env2 anaconda -y
conda activate fragalysis_env2
conda install -c schrodinger pymol -y
conda install -c rdkit rdkit -y
git clone "https://github.com/xchem/fragalysis-api.git"
cd fragalysis-api/
pip install -e .
cd ..
rm -rf fragalysis-api/
You can check if it has installed using: conda list
2.1 How to download PDB files
Move to the fragalysis-api/xcimporter directory.
You will need two bits of information:
- Your 'user ID' - this is your name followed by your protein name. For example, Anna looking at protein ATAD2 wil have username 'Anna_ATAD2'.
- The PDB code you would like to download. For example, '6epu'.
To download the PDB file
python pdbimporter.py -id [user_id] -pdb [pdb code]
In our example, this would be
python pdbimporter.py -id Anna_ATAD2 -pdb 6epu
Alternatively, you can upload your own PDB files. :construction:
2.2 How to query the PDB file
Note: you don't need to manually download a pdb file before querying the PDB for structures of the same protein
Similar to downloading PDB files, however initially all you need is the PDB code and the chain you would like to query. The command is
python pdbquery.py -pdb [pdb code] -chain [required chain]
The API will then query the PDB for structures of the same protein that also have ligands bound. You will be asked if you would like to see a list of these structures and ligands, and if you would like to download all of these pdb files in bulk. If you choose to download these pdb files, you will be asked for your user id. This is as before: your name followed by the protein name (e.g. Anna_ATAD2).
3.How to submit PDB files for conversion to a fragalysis friendly format (fff)
Once you have the files downloaded, they need to be processed before they can be visualised in fragalysis. This is done using
python xcimporter -id [user id]
Default directories are used. These can however be changed by using -i [input directory]
or -o [output directory]
if this is required.
The terminal will let you know when the conversion has been successful and if there are any files that have been found to be incompatible with the API. We are working to minimize any incompatibilities.
Who we are
We are the Fragment 5, a group of students at the University of Oxford.
Anna :whale:
Maranga :fire:
George a.k.a Joff Boff :poop:
Tobias :cow:
Alister :panda_face:
We are looked after by Rachael :crown:.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file fragalysis_api-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: fragalysis_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 676fc5cc4dd67dfa54dddcf5a81a09bce3a56fa48c80be2c8412144e704d841a |
|
MD5 | 72c46d6c88bd28d204f228ad2c3eef53 |
|
BLAKE2b-256 | e0c8ea5c89c04c3f92d7fc4ac56b8363df9d8d84c8d619465c5db673e196a7c5 |