Extract SS with chain WITHOUT Biopython
Hello, I have a list of 150 DSSP files from 150 PDB IDs with their chain that I need to obtain the SS from that are specific to the chain in question. I need to create a simple for loop by opening the file and parsing it. I have started here, but I am not sure how else to continue:
basepath = "/Users/data/Desktop/DSSP/"
for filename in os.listdir(basepath):
if filename.endswith(".dssp"):
# print(os.path.join("./DataFiles", filename))
dssp = (filename)
# dsspsplit = dssp.split()
# print(type(dsspsplit))
with open(basepath + filename) as openfile:
for line in openfile:
# extract sequence and secondary structure from the DSSP tuple
sequence="".join(dssp.aa)
sec_structure = []
# for i in range(len(dsspsplit.aa)):
# s = dsspsplit.struct[i][2]
# if s == ' ':
# s="U"
# structs.append(s)
ss="".join(structs)
# tco = ','.join(dssp.getTCO())
# kappa=",".join(dssp.getKAPPA())
# alpha=",".join(dssp.getALPHA())
# phi = ','.join(dssp.getPHI())
# psi = ','.join(dssp.getPSI())
• 15 views
Read more here: Source link