데이터 과학

KEGG 본문

생명정보학 & 화학정보학/바이오파이썬

KEGG

티에스윤 2022. 8. 10. 22:31

일본 교토대학에서 만들어서 운영하는 KEGG 사이트는 게놈 서열분석과 생물학적 대사경로를 나타내는 사이트로 알려져 있습니다. 

 

http://www.kegg.jp 

 

KEGG: Kyoto Encyclopedia of Genes and Genomes

 

www.kegg.jp

 

 

바이오파이썬에서는 일부 기능을 지원합니다. 이 내용은 튜토리얼 18장에 있는 내용입니다. 

 

http://rest.kegg.jp/get/ec:5.4.2.2

에 접속하여서 파일을 저장하도록 해요. 파일명은 ec_5.4.2.2.txt 입니다.

 

ec_5.4.2.2.txt
0.23MB

 

from Bio.KEGG import Enzyme
records = Enzyme.parse(open("ec_5.4.2.2.txt"))
record = list(records)[0]
record.classname

 

 

['Isomerases;',
 'Intramolecular transferases;',
 'Phosphotransferases (phosphomutases)']

Phosphotransferase는 인산기 전이효소입니다. 

 

from Bio.KEGG import REST
from Bio.KEGG import Enzyme
request = REST.kegg_get("ec:5.4.2.2")
open("ec_5.4.2.2.txt", "w").write(request.read())
records = Enzyme.parse(open("ec_5.4.2.2.txt"))
record = list(records)[0]
record.classname

 

['Isomerases;',
 'Intramolecular transferases;',
 'Phosphotransferases (phosphomutases)']

 

 

from Bio.KEGG import REST
human_pathways = REST.kegg_list("pathway", "hsa").read()
# Filter all human pathways for repair pathways
repair_pathways = []
for line in human_pathways.rstrip().split("\n"):
    entry, description = line.split("\t")
if "repair" in description:
    repair_pathways.append(entry)
    print(entry, description)
print(repair_pathways)
# Get the genes for pathways and add them to a list
repair_genes = []
for pathway in repair_pathways:
    pathway_file = REST.kegg_get(pathway).read() # query and read each pathway
# iterate through each KEGG pathway file, keeping track of which section
# of the file we're in, only read the gene in each pathway
    current_section = None
    for line in pathway_file.rstrip().split("\n"):
        section = line[:12].strip() # section names are within 12 columns
        if not section == "":
            current_section = section
            if current_section == "GENE":
                gene_identifiers, gene_description = line[12:].split("; ")
                gene_id, gene_symbol = gene_identifiers.split()
                if not gene_symbol in repair_genes:
                    repair_genes.append(gene_symbol)

print("There are %d repair pathways and %d repair genes. The genes are:"% (len(repair_pathways), len(repair_genes))
)
print(", ".join(repair_genes))

 

 

 

KEGG에서 제공하는 인간대사 경로 

 

http://rest.kegg.jp/list/pathway/hsa/ 

 

 

 

 

 

 

https://blog.naver.com/pokemonms/222579416613

 

Biopython으로 KEGG 탐방하기

쿡북 분량 개짧음 진짜 이거보다 짧을수가 없음. 0. KEGG? https://www.genome.jp/kegg/ Kyoto Encyc...

blog.naver.com