Extract SS with chain WITHOUT Biopython
0
0
Entering edit mode
2.6 years ago

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())
biopython parse dssp • 715 views
ADD COMMENT

Login before adding your answer.

Traffic: 1793 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6