a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
1.02k stars 131 forks source link

Fix handing id when loading from path #332

Closed chaitjo closed 1 year ago

chaitjo commented 1 year ago

What does this implement/fix? Explain your changes

Previously, the id for the pyg data object would become the entire (possibly length) path to the pdb file OR only the filename + chain ID. However, in the later case, the '.pdb' extension would still show up under the id field.

This commit fixes the above to be consistent and to not contain '.pdb' extension in the pyg data id.

What testing did you do to verify the changes in this PR?

I have made this fix during day-to-day work with graphein when loading pyg data from my own PDB files which are stored locally.

chaitjo commented 1 year ago

Also added a random addition to a dict mapping 3 letter AA to 1 letter.

a-r-j commented 1 year ago

LGTM, thanks @chaitjo! Would you be able to add a short note to the changelog?

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

chaitjo commented 1 year ago

Done!