-
Notifications
You must be signed in to change notification settings - Fork 397
Fix #946 Parse PDB KEWODS record #948
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
Fix #946 Parse PDB KEWODS record #948
Conversation
They are parsed from PDB and added to Structure. Not parsed from mmCIF yet.
josemduarte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aalhossary . Since mmCIF now is the main format, I think it'd be great if you could include filling the new keywords field from mmCIF and BCIF. That should be actually very straight forward. The CIF parsing work is done already, so it is only a matter of calling the setKeywords() with the value extracted from the appropriate mmCIF field. Could you have a look at that?
biojava-structure/src/test/java/org/biojava/nbio/structure/TestKeywords.java
Outdated
Show resolved
Hide resolved
Updated unit tests as well
|
Added setting keywords from |
biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/CifStructureConsumerImpl.java
Outdated
Show resolved
Hide resolved
sbittrich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements @aalhossary, below are some comments on the CIF parsing part.
biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/AbstractCifFileSupplier.java
Show resolved
Hide resolved
biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/CifStructureConsumerImpl.java
Outdated
Show resolved
Hide resolved
biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/CifStructureConsumerImpl.java
Outdated
Show resolved
Hide resolved
biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/CifStructureConsumerImpl.java
Outdated
Show resolved
Hide resolved
|
Thank you @josemduarte and @JonStargaryen, and sorry for the inconvenience because I am totally new to CIF parsing. |
josemduarte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aalhossary . Actually, now that I read the discussion about the PDBHeader.getDescription() field. It looks like keywords would be better placed under PDBHeader. Also it seems that description was used to hold the keywords data formerly, right? How about deprecating it, keeping the data in both fields (keywords and description)?
|
The Header as defined in the PDB file format has three specific fields (not including keywords):
Keywords may include:
It would be misleading for a user to find the KEYWODS field in the header where it is not defined. Therefore I believe it's better to keep it outside the header. =============== Therefore, I agree with you that the best option is to deprecate description, because:
|
|
@josemduarte I noticed that the description field is used in places like |
|
@aalhossary the |
Updated the documentation Deprecated description
|
Although BioJava travis-ci does not run currently, the latest commit of this PR was successfully run on my travis https://app.travis-ci.com/github/aalhossary/biojava (except for the deployment part of course). |
josemduarte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @aalhossary and sorry for the delay. See a minor issue about the deprecated tag. After that it should be ok to merge
biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java
Outdated
Show resolved
Hide resolved
biojava-structure/src/main/java/org/biojava/nbio/structure/PDBHeader.java
Show resolved
Hide resolved
biojava-structure/src/main/java/org/biojava/nbio/structure/PDBHeader.java
Show resolved
Hide resolved
Small typographical error correction as well.
josemduarte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
The CI problems are still not solved. I'll merge this after testing it locally. |
They are parsed from PDB and added to Structure.
Not parsed from mmCIF yet.
Fixes #946