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

Y24-382: add example test cases #4641

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

StephenHulme
Copy link
Contributor

@StephenHulme StephenHulme commented Jan 27, 2025

Closes #4412

Changes proposed in this pull request

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@StephenHulme StephenHulme self-assigned this Jan 27, 2025
@StephenHulme
Copy link
Contributor Author

StephenHulme commented Jan 27, 2025

This is ready for review, I think the failing feature tests are unrelated to the changes (and possibly solved by #4639).

@@ -261,31 +261,46 @@
end
end

# TODO: Y24-383 - add assertions for final source and destination volumes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm half wondering if this should happen as part of this PR to lay a groundwork of completed calculations for a potential meeting with relevant parties next week...

Copy link
Contributor

Choose a reason for hiding this comment

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

When you say "final source and destination volumes", you mean "current_volume" in well attributes, on the source and target wells - is that right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Great idea to add these assertions though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure... current_volume seems somewhat time invarient to me - I'm not sure at what stage it is current! What I mean is how much volume is left in the original well on the original plate, and how much has been pipetted into the new well in the new plate.
But I think we are talking the same thing...?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry should have submitted all these comments in one go...

Is it possible to check the target well's final volume in this test, because that gets updated after bed verification?

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.40%. Comparing base (75cf1c5) to head (eee2f17).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4641      +/-   ##
===========================================
+ Coverage    89.34%   89.40%   +0.06%     
===========================================
  Files         1406     1406              
  Lines        30298    30298              
===========================================
+ Hits         27070    27089      +19     
+ Misses        3228     3209      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

{ target_ng: 10_000, measured_conc: 250, measured_vol: 50, min_vol:10, min_pick_vol: 1, source_pick_vol: 40, buffer_vol: 0, current_vol: nil },
{ target_ng: 10_000, measured_conc: 250, measured_vol: 30, min_vol:10, min_pick_vol: 1, source_pick_vol: 30, buffer_vol: 0, current_vol: nil },
{ target_ng: 1000, measured_conc: 70, measured_vol: 50, min_vol:10, min_pick_vol: 5, source_pick_vol: 14.29, buffer_vol: 0, current_vol: nil },# Y24-382: SQPD-10861 v14.29, b0.00
{ target_ng: 200, measured_conc: 200, measured_vol: 1, min_vol:50, min_pick_vol: 5, source_pick_vol: 1, buffer_vol: 49, current_vol: nil }, # Y24-382: SQPD-10864 v1.00, b49.00
Copy link
Contributor

@KatyTaylor KatyTaylor Jan 29, 2025

Choose a reason for hiding this comment

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

So this one (above) will pass currently, but when Y24-383 is done it should be v5.00, b45.00 - is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If required volume < robot minimum picking volume, round up to the robot minimum picking volume

By the logic quoted, yes I think so.

My plan is to create a number of worked examples/scenarios, and liase with the stakeholders in Y24-383 to confirm which results are expected. Then make the algorithm match those expectations - Test Driven Development for the win 😉

{ target_ng: 10_000, measured_conc: 250, measured_vol: 30, min_vol:10, min_pick_vol: 1, source_pick_vol: 30, buffer_vol: 0, current_vol: nil },
{ target_ng: 1000, measured_conc: 70, measured_vol: 50, min_vol:10, min_pick_vol: 5, source_pick_vol: 14.29, buffer_vol: 0, current_vol: nil },# Y24-382: SQPD-10861 v14.29, b0.00
{ target_ng: 200, measured_conc: 200, measured_vol: 1, min_vol:50, min_pick_vol: 5, source_pick_vol: 1, buffer_vol: 49, current_vol: nil }, # Y24-382: SQPD-10864 v1.00, b49.00
{ target_ng: 9800, measured_conc: 98, measured_vol: 100, min_vol:50, min_pick_vol: 5, source_pick_vol: 50, buffer_vol: 0, current_vol: nil }, # Y24-382: SQPD-10866 v50.00, b0.00
Copy link
Contributor

Choose a reason for hiding this comment

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

The max volume doesn't seem to be specified here (above), but I think is essential to this example - it's why the source pick volume gets set to 50?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's hardcoded in the test function itself (to 50) but probably should be altogether here... 👀

{ target_ng: 1000, measured_conc: 70, measured_vol: 50, min_vol:10, min_pick_vol: 5, source_pick_vol: 14.29, buffer_vol: 0, current_vol: nil },# Y24-382: SQPD-10861 v14.29, b0.00
{ target_ng: 200, measured_conc: 200, measured_vol: 1, min_vol:50, min_pick_vol: 5, source_pick_vol: 1, buffer_vol: 49, current_vol: nil }, # Y24-382: SQPD-10864 v1.00, b49.00
{ target_ng: 9800, measured_conc: 98, measured_vol: 100, min_vol:50, min_pick_vol: 5, source_pick_vol: 50, buffer_vol: 0, current_vol: nil }, # Y24-382: SQPD-10866 v50.00, b0.00
{ target_ng: 9800, measured_conc: 100, measured_vol: 100, min_vol:50, min_pick_vol: 5, source_pick_vol: 50, buffer_vol: 0, current_vol: nil } # Y24-382: SQPD-10868 v50.00, b0.00
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above - isn't the max volume needed?

@@ -437,7 +452,8 @@
[100.0, 5.0, 100.0, 2.0, 5.0, 5.0, 98.0, 'Less DNA than robot minimum pick'],
[100.0, 50.0, 1.0, 200.0, 5.0, 100.0, 0.0, 'Low concentration, maximum DNA, no buffer'],
[120.0, 50.0, 0, 60.0, 5.0, 60.0, 60.0, 'Zero concentration, with less volume than required'],
[120.0, 50.0, 0, 3.0, 5.0, 5.0, 117.0, 'Zero concentration, with less volume than even the minimum robot pick']
[120.0, 50.0, 0, 3.0, 5.0, 5.0, 117.0, 'Zero concentration, with less volume than even the minimum robot pick'],
[15.0, 50.0, 70.0, 50, 5.0, 10.7, 5.0, 'Y24-382: SQPD-10859 v10.71 b5.00']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The v10.71, b5.00 example is a concentration example, rather than an amount example.

@@ -437,7 +452,8 @@
[100.0, 5.0, 100.0, 2.0, 5.0, 5.0, 98.0, 'Less DNA than robot minimum pick'],
[100.0, 50.0, 1.0, 200.0, 5.0, 100.0, 0.0, 'Low concentration, maximum DNA, no buffer'],
[120.0, 50.0, 0, 60.0, 5.0, 60.0, 60.0, 'Zero concentration, with less volume than required'],
[120.0, 50.0, 0, 3.0, 5.0, 5.0, 117.0, 'Zero concentration, with less volume than even the minimum robot pick']
[120.0, 50.0, 0, 3.0, 5.0, 5.0, 117.0, 'Zero concentration, with less volume than even the minimum robot pick'],
[15.0, 50.0, 70.0, 50, 5.0, 10.7, 5.0, 'Y24-382: SQPD-10859 v10.71 b5.00']
Copy link
Contributor

Choose a reason for hiding this comment

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

So this will need to be updated after Y24-383, to be v10.71, b4.29, I think? (and still 15 final volume)

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.

Y24-382 - Research - updating volume after cherrypicking
2 participants