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

Fix smasher failing to include all samples in large studies #2365

Merged
merged 3 commits into from
Jul 1, 2020

Conversation

wvauclain
Copy link
Contributor

Issue Number

#2211

Purpose/Implementation Notes

It looks like an indexing issue was preventing us from copying over any more than the first 100 quant files for each experiment in the smasher. Since the range's third parameter is page_size, on the second iteration i is page_size, so we effectively take samples[page_size ** 2 : page_size * 2] which will be empty.

Methods

If this pull request has any implications for data or metadata processing or addresses an issue labeled sci review, please include an overview of the methods used (e.g., briefly explain how the data gets processed).
See #267 for rationale.
Include sufficient detail for reviewers or users that are not expert developers to evaluate the validity of the approach.
Please attach or link to example input and output data if applicable.
It may also be appropriate to include a description of any functional or unit tests in this section depending on their content.
Any pull request with a methods section requires scientific review in addition to code review.

Types of changes

What types of changes does your code introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Functional tests

List out the functional tests you've completed to verify your changes work locally.

Checklist

Put an x in the boxes that apply.

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Screenshots

Please attach any screenshots that illustrate these changes.

for sample_page in (
samples[i * page_size : i + page_size] for i in range(0, len(samples), page_size)
):
for sample_page in (samples[i : i + page_size] for i in range(0, len(samples), page_size)):
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't love using i here since i usually think of i as a loop counter (it looks like whoever implemented this first did as well since they multiplied it by page size). Could we use start?

wvauclain and others added 2 commits June 30, 2020 10:34
Co-authored-by: Casey Greene <cgreene@users.noreply.github.com>
Copy link
Contributor

@kurtwheeler kurtwheeler left a comment

Choose a reason for hiding this comment

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

LGTM now!

@wvauclain wvauclain merged commit 9cb8736 into dev Jul 1, 2020
@wvauclain wvauclain deleted the wvauclain/compendia-large-studies branch July 1, 2020 14:32
@kurtwheeler
Copy link
Contributor

This also looks like it would affect quantpendias. I think that between this and #2368 we should probably rerun quantpendia.

@wvauclain
Copy link
Contributor Author

wvauclain commented Jul 1, 2020

Yeah I agree. The original issue mentioned specifically our mouse and human quantpendia missing samples.

@cgreene
Copy link
Contributor

cgreene commented Jul 1, 2020

strong agree on a re-run

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