Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling ProteinEntry.from_pickle(<path>).to_pdb(<target_path>) on the entire dataset reveals errors #132

Open
ardagoreci opened this issue Jan 27, 2024 · 2 comments

Comments

@ardagoreci
Copy link

Hi Liza,

I noticed when trying to create a W&B table visualization for the entire dataset that converting the pickle files into pdbs reveals multiple bugs.

Firstly, I got a "UnpicklingError: unpickling stack underflow" from the line "protein_entry = ProteinEntry.from_pickle(pickle_path)" It did not happen with every protein, so when I handled that exception I realized that PDBParser could not properly parse a few of the generate pdb files, throwing out an error in the line "structure = parser.get_structure(pdb_id, target_path)"

Screen Shot 2024-01-27 at 23 26 16 Screen Shot 2024-01-27 at 23 26 55
@elkoz
Copy link
Collaborator

elkoz commented Feb 6, 2024

Could you please attach an example file that this fails on or say its pdb id @ardagoreci ?

@elkoz
Copy link
Collaborator

elkoz commented Feb 6, 2024

This code ran for me without any errors.

from proteinflow.data import ProteinEntry
from tqdm import tqdm
import os

folder = "data/proteinflow_20230102_stable/train"

for filename in tqdm(os.listdir(folder)):
    ProteinEntry.from_pickle(os.path.join(folder, filename)).to_pdb("tmp.pdb")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants