-
Notifications
You must be signed in to change notification settings - Fork 10
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 match only dense dataframes #145
Conversation
Looks nice |
I discussed the topic a bit with @mo-sameh and we reasoned that there is currently some ambiguity between a Therefore I made some small changes to this PR:
I think to handle complexity we have to keep the different library types better separated. Looking forward to hear your thoughts |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
We should use SpecLibBase as the composite instead of the parent class. |
The save/load_hdf functions in flat.py are still using the dense DataFrames. |
I agree, or we should have a base class which only handles precursor operations and have this as parent class for SpecLibBase and SpecLibFlat. I think this would be a separate bigger refactoring involving Magnus. |
Yes, let's keep as it is now. You can merge I think |
@@ -135,9 +136,9 @@ def fragment_intensity_df(self)->pd.DataFrame: | |||
return self._fragment_intensity_df | |||
|
|||
|
|||
def available_fragment_dfs(self)->list: | |||
def available_dense_fragment_dfs(self)->list: |
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.
What about move this into flat_lib? As a base lib must have dense frag dfs
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.
It's only applicable to the dense lib. The flat lib will always return an empty list.
The issue is that it's inherited.
SpecLibBase.available_fragment_dfs()
would return['_fragment_df', '_fragment_intensity_df', '_fragment_mz_df']
on a SpecLibFlat and fail on.remove_unused_fragments()
.This makes sure it's really matching
_fragment_[attribute_name]_df
.