There is two method to use this program: call API or CLI
Run file, and input UniProtID, program will show a table of reuslt like:
+--------------+--------+-----------+
| UniProtKB_AC | PDB ID | PDB Chain |
+--------------+--------+-----------+
| P02768 | 1AO6 | A |
| P02768 | 1AO6 | B |
| P02768 | 1BJ5 | A |
| P02768 | 1BKE | A |
+--------------+--------+-----------+
If you are first use, please import first:python uniprotToPdb.py -m import -f <filename>
File is provide by UniProt at UniProt FTP Server, download idmapping_selected.tab.gz
Import will take minutes or hours, be patience.
Input: fileName
: id mapping file from UniProt
Action: import data to mysql
There is one class: DBUniprotToPdb
Input: uniprotId
: UniProtKB_AC ID, like P12345
Return: selectRow, rowData
:
selectRow
: row number of queryrowData
: A list of Dictionary, like[{'uniprotId':'P12345','pdbId':'100d','pdbChain':'A'},...]
Note: If record number larger than 100, please use DBUniprotToPdb.queryAll()
Input: uniprotId
: UniProtKB_AC ID, like P12345
Return: selectRow, rowData
:
selectRow
: should be1
rowData
: A list of Dictionary, like[{'uniprotId':'P12345','pdbId':'100d','pdbChain':'A'}]
Input: uniprotId
: UniProtKB_AC ID, like P12345
Return: selectRow, rowData
:
selectRow
: row number of queryrowData
: A list of Dictionary, like[{'uniprotId':'P12345','pdbId':'100d','pdbChain':'A'},...]
Note: No limit to large query, use carefully.
tqdm
PyMySQL
PrettyTable
Thanks to UniProt.
The data from UniProt is shared under the Creative Commons Attribution 4.0 International (CC BY 4.0) License (https://creativecommons.org/licenses/by/4.0/).
Code is shared under GNU General Public License v3.0
Data is shared under the Creative Commons Attribution 4.0 International (CC BY 4.0) License