-
Notifications
You must be signed in to change notification settings - Fork 11
[ENH] Remove Structure support for packaged pdbs
#209
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
Open
satvshr
wants to merge
18
commits into
main
Choose a base branch
from
issue208
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
83c82da
Made required changes
satvshr 5fd9024
Made only necessary changes
satvshr e43ffe3
merge main
satvshr 442b2b4
removed structure loaders and loader tests
satvshr fca8571
bug fixing
satvshr cb144ae
added 1gnh structure loader back
satvshr eec1df4
Merge branch 'main' into issue197
satvshr 4e7274c
Revert pfoa deletion
satvshr 342ad3e
Update test_loaders_mol.py
satvshr 84d9e2c
merge issue197
satvshr 336b244
Merge branch 'main' into issue197
satvshr c090c62
merged main
satvshr b82b2ee
update branch
satvshr 026ae10
bug fixing and removals
satvshr 5a7b6fe
bug fixing
satvshr bae9d01
merge branch
satvshr 02f5b78
bug fixing
satvshr c35989a
merge branch
satvshr 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
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
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 |
|---|---|---|
| @@ -1,28 +1,32 @@ | ||
| """Contains datasets along with their loaders.""" | ||
|
|
||
| from pyaptamer.datasets._loaders._aptacom_loader import ( | ||
| from pyaptamer.datasets._loaders import ( | ||
| load_1brq, | ||
| load_1gnh, | ||
| load_5nu7, | ||
| load_aptacom_full, | ||
| load_aptacom_x_y, | ||
| load_csv_dataset, | ||
| load_from_rcsb, | ||
| load_hf_dataset, | ||
| load_pfoa, | ||
| ) | ||
| from pyaptamer.datasets._loaders._csv_loader import load_csv_dataset | ||
| from pyaptamer.datasets._loaders._hf_loader import load_hf_dataset | ||
| from pyaptamer.datasets._loaders._hf_to_dataset_loader import load_hf_to_dataset | ||
| from pyaptamer.datasets._loaders._li2014 import load_li2014 | ||
| from pyaptamer.datasets._loaders._one_gnh import load_1gnh, load_1gnh_structure | ||
| from pyaptamer.datasets._loaders._online_databank import load_from_rcsb | ||
| from pyaptamer.datasets._loaders._pfoa import load_pfoa, load_pfoa_structure | ||
|
|
||
| __all__ = [ | ||
| "load_aptacom_full", | ||
| "load_aptacom_x_y", | ||
| "load_csv_dataset", | ||
| "load_hf_dataset", | ||
| "load_pfoa", | ||
| "load_pfoa_structure", | ||
| "load_from_rcsb", | ||
| "mol_loader", | ||
| "structure_loader", | ||
| "load_1brq", | ||
| "load_5nu7", | ||
| "load_1gnh", | ||
| "load_1gnh_structure", | ||
| "load_pfoa", | ||
| "load_from_rcsb", | ||
| "load_csv_dataset", | ||
| "load_li2014", | ||
| "load_hf_to_dataset", | ||
| ] |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| __author__ = "satvshr" | ||
| __all__ = ["load_1brq"] | ||
|
|
||
| import os | ||
|
|
||
|
|
||
| def load_1brq(): | ||
| """Load the 1brq molecule as a MoleculeLoader. | ||
|
|
||
| Returns | ||
| ------- | ||
| loader : MoleculeLoader | ||
| A MoleculeLoader object representing the 1brq molecule. | ||
| """ | ||
| from pyaptamer.data.loader import MoleculeLoader | ||
|
|
||
| pdb_path = os.path.join(os.path.dirname(__file__), "..", "data", "1brq.pdb") | ||
|
|
||
| return MoleculeLoader(pdb_path) |
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
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| __author__ = "satvshr" | ||
| __all__ = ["load_5nu7"] | ||
|
|
||
| import os | ||
|
|
||
|
|
||
| def load_5nu7(): | ||
| """Load the 5nu7 molecule as a MoleculeLoader. | ||
|
|
||
| Returns | ||
| ------- | ||
| loader : MoleculeLoader | ||
| A MoleculeLoader object representing the 5nu7 molecule. | ||
| """ | ||
| from pyaptamer.data.loader import MoleculeLoader | ||
|
|
||
| pdb_path = os.path.join(os.path.dirname(__file__), "..", "data", "5nu7.pdb") | ||
|
|
||
| return MoleculeLoader(pdb_path) |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Function kept as it is used for testing
struct_to_aaseqThere 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.
I might not be in loop with this one, but Could you confirm we are removing this becuase it's no longer needed because of
Moleculeloaderbut the loader currently doesn't have thestruct_to_aaseqfunction? So we need this to test it?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.
seems a bit counterintutive, I might not be part of the design discussion or might have simply forgot, but can we use moleculeloader to simply do that and either get rid of this structure way entirely, or keep the structure way, as is , for all the molecules if it is needed?