-
Notifications
You must be signed in to change notification settings - Fork 395
Some more categories written out to CIF #1063
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
615a570
Writing out entity info in CIF
josemduarte 3543eb9
New test
josemduarte a8a96ec
Handling nulls in descriptions
josemduarte 12137bf
Fixing empty seqres groups for pdb files with not seqres
josemduarte 6431114
Fixing empty seqres groups for cif files with no _entity
josemduarte a06ac88
Latest ciftools
josemduarte 4d146e1
Improvements from review comments
josemduarte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handling nulls in descriptions
- Loading branch information
commit a8a96ec122133b10cf5b4faf0cd6d79d65b7dbbe
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,11 +100,11 @@ protected CifFile getInternal(Structure structure, List<WrappedAtom> wrappedAtom | |
| EntityInfo e = entityInfos.get(i); | ||
| entityIds[i] = Integer.toString(e.getMolId()); | ||
| entityTypes[i] = e.getType().getEntityType(); | ||
| entityDescriptions[i] = e.getDescription(); | ||
| entityDescriptions[i] = e.getDescription() == null? "?" : e.getDescription(); | ||
| } | ||
|
|
||
| String[] polyEntityIds = entityInfos.stream().filter(e -> e.getType() == EntityType.POLYMER).map(e -> Integer.toString(e.getMolId())).collect(Collectors.toList()).toArray(new String[]{}); | ||
| String[] entitySeqs = entityInfos.stream().filter(e -> e.getType() == EntityType.POLYMER).map(e -> e.getChains().get(0).getSeqResSequence()).collect(Collectors.toList()).toArray(new String[]{}); | ||
| String[] polyEntitySeqs = entityInfos.stream().filter(e -> e.getType() == EntityType.POLYMER).map(e -> e.getChains().get(0).getSeqResSequence()).collect(Collectors.toList()).toArray(new String[]{}); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
|
|
||
| blockBuilder.enterEntity() | ||
| .enterId() | ||
|
|
@@ -127,7 +127,7 @@ protected CifFile getInternal(Structure structure, List<WrappedAtom> wrappedAtom | |
| .leaveColumn() | ||
|
|
||
| .enterPdbxSeqOneLetterCodeCan() | ||
| .add(entitySeqs) | ||
| .add(polyEntitySeqs) | ||
| .leaveColumn() | ||
|
|
||
| .leaveCategory(); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Streams have a
toArraymethod as well..collect(Collectors.toList()).toArray(new String[]{})can be simplified to.toArray(String[]::new), effectively skipping the creation of aList.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.
Nice one, thanks. Added a commit.
And shame to IntelliJ for not suggesting this!