a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
998 stars 125 forks source link

FoldCompDataset calls graphein.protein.tensor.Protein with incorrect __init__ arguments #317

Closed mawright closed 1 year ago

mawright commented 1 year ago

Hi y'all, love the library. It's been a huge help for me so far. I wanted to make use of the foldcomp integration but it isn't creating the Protein data objects correctly.

Describe the bug This part here in fc_to_pyg: https://github.com/a-r-j/graphein/blob/47d9dde5e5dc2cd085269520d2ccf34ced1d6b68/graphein/ml/datasets/foldcomp_dataset.py#L297-L305 tries to construct a Protein object, but Protein's init method looks like https://github.com/a-r-j/graphein/blob/47d9dde5e5dc2cd085269520d2ccf34ced1d6b68/graphein/protein/tensor/data.py#L134-L136

so trying to get proteins out of FoldCompDataset always errors with TypeError: __init__() got an unexpected keyword argument 'coords'

To Reproduce Steps to reproduce the behavior:

  1. Run the first three cells of foldcomp.ipynb.

Expected behavior FoldCompDataset to iterate through Protein objects

Desktop (please complete the following information):

a-r-j commented 1 year ago

Hey @mawright thanks for pointing this out. I’d fixed this locally and forgotten to update this. Will merge as soon as tests pass. Apologies!

mawright commented 1 year ago

Thanks!