-
Notifications
You must be signed in to change notification settings - Fork 9
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
remove maxquant MBR rows #229
base: development
Are you sure you want to change the base?
Conversation
@@ -11,6 +12,8 @@ | |||
psm_reader_yaml, | |||
) | |||
|
|||
warnings.filterwarnings("always") |
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.
could the scope of this be reduced, e.g. to a specific code block and/or specific warnings?
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.
Maybe you know more about this.
This code is needed to enforce that warning are shown because it's somehow not happening.
So it's not removing warnings but showing 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.
ah, I misinterprested this as "filter always" .. then it's fine, maybe add the information that warnings are otherwise not shown as a comment ..
) | ||
df = df[~no_ms2_mask] | ||
df.reset_index(drop=True, inplace=True) | ||
df[scan_num_col] = df[scan_num_col].astype(int) |
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.
if we don't hit the if "scan_num" in mapped_columns:
block: will the type of scan_num_col
still be int
?
or turning it around: we should make sure all columns' dtypes are consistent, and independent of the inner logic of the reader.
if "scan_num" in mapped_columns: | ||
scan_num_col = mapped_columns["scan_num"] | ||
no_ms2_mask = df[scan_num_col] == "" | ||
if np.sum(no_ms2_mask) > 0: |
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.
(nit)
if (num_no_ms2_mask := np.sum(no_ms2_mask)) > 0:
currently alphabase fails for maxquant output which contains MBR PSMs.
This removes MBR PSMs and prints an explicit warning