从蛋白质数据库中提取多个蛋白质序列以及二级结构
Extract multiple protein sequences from a Protein Data Bank along with Secondary Structure
我想从任何蛋白质数据库中提取蛋白质序列及其相应的二级结构,比如 RCSB。我只需要短序列及其二级结构。像,
ATRWGUVT Helix
即使序列很长也可以,但我希望在末尾有一个标记来表示它的二级结构。是否有任何编程工具或任何可用的东西。
如上所示,我只需要这些最少的信息。我怎样才能做到这一点?
您可以使用 DSSP。
DSSP 的输出在“explanation”下有广泛的解释。输出的非常简短的摘要是:
H = α-helix
B = residue in isolated β-bridge
E = extended strand, participates in β ladder
G = 3-helix (310 helix)
I = 5 helix (π-helix)
T = hydrogen bonded turn
S = bend
from Bio.PDB import *
from distutils import spawn
提取序列:
def get_seq(pdbfile):
p = PDBParser(PERMISSIVE=0)
structure = p.get_structure('test', pdbfile)
ppb = PPBuilder()
seq = ''
for pp in ppb.build_peptides(structure):
seq += pp.get_sequence()
return seq
如前所述,使用 DSSP 提取二级结构:
def get_secondary_struc(pdbfile):
# get secondary structure info for whole pdb.
if not spawn.find_executable("dssp"):
sys.stderr.write('dssp executable needs to be in folder')
sys.exit(1)
p = PDBParser(PERMISSIVE=0)
ppb = PPBuilder()
structure = p.get_structure('test', pdbfile)
model = structure[0]
dssp = DSSP(model, pdbfile)
count = 0
sec = ''
for residue in model.get_residues():
count = count + 1
# print residue,count
a_key = list(dssp.keys())[count - 1]
sec += dssp[a_key][2]
print sec
return sec
这应该打印序列和二级结构。
我想从任何蛋白质数据库中提取蛋白质序列及其相应的二级结构,比如 RCSB。我只需要短序列及其二级结构。像,
ATRWGUVT Helix
即使序列很长也可以,但我希望在末尾有一个标记来表示它的二级结构。是否有任何编程工具或任何可用的东西。
如上所示,我只需要这些最少的信息。我怎样才能做到这一点?
您可以使用 DSSP。
DSSP 的输出在“explanation”下有广泛的解释。输出的非常简短的摘要是:
H = α-helix
B = residue in isolated β-bridge
E = extended strand, participates in β ladder
G = 3-helix (310 helix)
I = 5 helix (π-helix)
T = hydrogen bonded turn
S = bend
from Bio.PDB import *
from distutils import spawn
提取序列:
def get_seq(pdbfile):
p = PDBParser(PERMISSIVE=0)
structure = p.get_structure('test', pdbfile)
ppb = PPBuilder()
seq = ''
for pp in ppb.build_peptides(structure):
seq += pp.get_sequence()
return seq
如前所述,使用 DSSP 提取二级结构:
def get_secondary_struc(pdbfile):
# get secondary structure info for whole pdb.
if not spawn.find_executable("dssp"):
sys.stderr.write('dssp executable needs to be in folder')
sys.exit(1)
p = PDBParser(PERMISSIVE=0)
ppb = PPBuilder()
structure = p.get_structure('test', pdbfile)
model = structure[0]
dssp = DSSP(model, pdbfile)
count = 0
sec = ''
for residue in model.get_residues():
count = count + 1
# print residue,count
a_key = list(dssp.keys())[count - 1]
sec += dssp[a_key][2]
print sec
return sec
这应该打印序列和二级结构。