-
Notifications
You must be signed in to change notification settings - Fork 118
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
[feat] added mmcif get_model method #144
Conversation
biopandas/mmcif/pandas_mmcif.py
Outdated
""" | ||
|
||
df = copy.deepcopy(self) | ||
breakpoint() |
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.
This should be removed :)
biopandas/mmcif/pandas_mmcif.py
Outdated
structure subsetted to the given model. | ||
""" | ||
|
||
df = copy.deepcopy(self) |
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.
Would rename from df
since this is not a dataframe.
biopandas/mmcif/pandas_mmcif.py
Outdated
|
||
df = copy.deepcopy(self) | ||
|
||
if "ATOM" in df.df.keys(): |
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.
as above
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.
Took that pattern from the pandas_pdb and pandas_mmtf file, but can change all three of them
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.
named it atomic_df
for now to adhere with patterns in the source code
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.
I wouldn't use df
, since it's a PandasMmcif
object. Maybe: pmmcif
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.
fair, tried to keep it generic so the method can be the same in the three different file objects. Maybe pandas_object
? Or pandas_structure
?
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.
Either is fine but I'd opt for biopandas
over pandas
to make this distinction clear.
Code of Conduct
Description
Added
get_model
andget_models
methods toPandasMmcif
class, similar toPandasMmtf
.Related issues or pull requests
Pull Request Checklist
./docs/sources/CHANGELOG.md
file (if applicable)./biopandas/*/tests
directories (if applicable)biopandas/docs/sources/
(if applicable)PYTHONPATH='.' pytest ./biopandas -sv
and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./biopandas/classifier/tests/test_stacking_cv_classifier.py -sv
)flake8 ./biopandas