uniprot的简单客户端库
proteo的Python项目详细描述
蛋白质组
一个简单的python库,用于处理uniprot,universal protein resource。
安装
pip install proteo
用法
fromproteo.uniprotimportUniprotClient# Initialize a clientu=UniprotClient()# Use the get_protein method to retrieve a protein record by accession numberaccession_number="B5ZC00"response=u.get_protein(accession_number)# Protein data is returned as a dictionaryprint(response['gene'])#glyQSprint(response['recommended_name'])#Glycine--tRNA ligaseprint(response['sequence'])#MKNKFKTQEELVNHLKTVGFVFANSEIYNGLANAWDYGPLGVLLKNNLKNLWWKEFVTKQKDVVGLDSAIILNPLVWKASGHLDNFSDPLIDCKNCKARYRADKLIESFDENIHIAENSSNEEFAKVLNDYEISCPTCKQFNWTEIRHFNLMFKTYQGVIEDAKNVVYLRPETAQGIFVNFKNVQRSMRLHLPFGIAQIGKSFRNEITPGNFIFRTREFEQMEIEFFLKEESAYDIFDKYLNQIENWLVSACGLSLNNLRKHEHPKEELSHYSKKTIDFEYNFLHGFSELYGIAYRTNYDLSVHMNLSKKDLTYFDEQTKEKYVPHVIEPSVGVERLLYAILTEATFIEKLENDDERILMDLKYDLAPYKIAVMPLVNKLKDKAEEIYGKILDLNISATFDNSGSIGKRYRRQDAIGTIYCLTIDFDSLDDQQDPSFTIRERNSMAQKRIKLSELPLYLNQKAHEDFQRQCQK
响应字典
蛋白质应答词典包含以下内容:
Key | Meaning |
---|---|
gene | The gene coding the protein |
name | The protein's short name |
organism | The organism in which the protein is found |
primary_accession_number | The protein's UniProt accession number |
recommended_name | The protein's long/recommended name |
sequence | The amino acid sequence defining the protein |
例外情况
蛋白质组定义了以下例外:
Exception | Meaning |
---|---|
proteo.exceptions.ProteinNotFoundError | Raised when no protein can be found for the accession number that was provided. |