Skip to content
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

Append SpecLibFlat libraries #221

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open

Append SpecLibFlat libraries #221

wants to merge 1 commit into from

Conversation

GeorgWa
Copy link
Collaborator

@GeorgWa GeorgWa commented Sep 28, 2024

This PR allows to append purely flat (only fragment_df) as well as hybrid (fragment_mz_df + fragment_df) SpecLibFlat libraries.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Comment on lines +308 to +321
# increment flat fragment indices
for fragment_flat_df in ["_fragment_df"]:
if (
hasattr(self, fragment_flat_df)
and len(getattr(self, fragment_flat_df)) > 0
):
frag_idx_increment = len(getattr(self, fragment_flat_df))

if "flat_frag_start_idx" in other_df.columns:
other_df["flat_frag_start_idx"] += frag_idx_increment

if "flat_frag_stop_idx" in other_df.columns:
other_df["flat_frag_stop_idx"] += frag_idx_increment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this copies the above logic .. shouldnt this better be generalized?

Copy link
Collaborator

@jalew188 jalew188 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants