bjornwallner / DockQ

DockQ is a single continuous quality measure for protein docked models based on the CAPRI evaluation protocol
MIT License
185 stars 46 forks source link

Enable loading a PDB file from an open file handle #38

Open emarsden-iso opened 3 weeks ago

emarsden-iso commented 3 weeks ago

If I already have a PDB file as a string, or you've already got an open file handle to a PDB file, I'd like to just pass either StringIO(pdb_string), or my open(pdb_path object to the DockQ.load_PDB function.

This won't affect existing usage, just extends the possible set of valid arguments for path to include the above cases

clami66 commented 4 hours ago

Hi @emarsden-iso , thanks for this PR, it seems indeed useful.

However, looks like the PR breaks this test:

DockQ examples/1EXB_r_l_b.model.pdb examples/1EXB.cif.gz --mapping DH:AE

Possibly a problem with handling .gz files? Would be good if you could do some debugging here. You can always run run_test.sh in the DockQ root directory to perform a few tests before updating the PR.

Thanks!