-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add unit tests for the outputaccumulator post processing. #422
base: development
Are you sure you want to change the base?
Conversation
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.
LGTM!
""" | ||
# create random correlation values between 0 and 1 | ||
fragments_shape = fragments_df.shape | ||
fragment_correlation = np.random.rand(*fragments_shape) |
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 we use a fixed seed here to make the tests reproducible?
if not, it would be good to print out the generated date, otherwise debugging tests will be a nightmare
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.
currently mocking the precursor_df, fragment_df and fragment correlation are completely random.
@GeorgWa do you think we can fix the seed for all of them ?
fragment_flat_df = fragment_flat_df.sort_values(by="precursor_idx") | ||
psm_flat_df["flat_frag_start_idx"] = np.arange(0, len(psm_flat_df) * 10, 10) | ||
psm_flat_df["flat_frag_stop_idx"] = np.arange(0, len(psm_flat_df) * 10, 10) + 9 | ||
psm_flat_df['nAA'] =psm_flat_df.sequence.str.len().astype(np.int32) |
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.
please install the pre-commit hook :-)
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 is strange, I already have them installed and ran it locally and all checks were passed.
Added some unit test for the ms2 quality post processing step in the output accumulator.
Mainly: