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

Develop to master #1912

Merged
merged 25 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
67499ef
Updating tube rack form submission for PBMC plates to make contingenc…
dasunpubudumal Sep 3, 2024
9064174
Rubocop issue fixes
dasunpubudumal Sep 3, 2024
71d5b7b
Fixing tests - part 1
dasunpubudumal Sep 3, 2024
e3792d1
Fixing tests - part 1
dasunpubudumal Sep 3, 2024
15a2532
Fixing tests - part 2
dasunpubudumal Sep 3, 2024
1a683ce
Fixing Test - Pt 1
dasunpubudumal Sep 4, 2024
b2f5dfc
Fixing Test - Pt 2
dasunpubudumal Sep 4, 2024
f55c218
reverting back .ruby-gemset
dasunpubudumal Sep 4, 2024
fca6515
Refactoring file presence validation
dasunpubudumal Sep 4, 2024
2b1f987
Merge remote-tracking branch 'origin/develop' into 1485-dpl-1014-tran…
dasunpubudumal Sep 5, 2024
ad75c50
Merge remote-tracking branch 'origin/develop' into 1485-dpl-1014-tran…
dasunpubudumal Sep 9, 2024
fe4a5f0
Merge remote-tracking branch 'origin/develop' into uat-staging-deploy…
dasunpubudumal Sep 10, 2024
e29c647
Merge remote-tracking branch 'origin/develop' into 1485-dpl-1014-tran…
dasunpubudumal Sep 10, 2024
3546612
Updating the outdated textbox in tube rack transfer
dasunpubudumal Sep 11, 2024
e120f48
Merge remote-tracking branch 'origin/1485-dpl-1014-transfer-to-tube-r…
dasunpubudumal Sep 11, 2024
022e46b
added SGE library type to bespoke pcr pipeline
andrewsparkes Sep 11, 2024
d02a423
Merge pull request #1908 from sanger/fix-sge-library-type-bespoke-pcr
andrewsparkes Sep 11, 2024
b050ae0
Merge remote-tracking branch 'origin/develop' into uat-staging-deploy…
dasunpubudumal Sep 11, 2024
bc6195c
Merge pull request #1885 from sanger/1485-dpl-1014-transfer-to-tube-r…
dasunpubudumal Sep 12, 2024
d224efe
Release version upgrade
dasunpubudumal Sep 12, 2024
e9f41ba
Merge branch 'uat-staging-deployments-11-09-2024' into develop
dasunpubudumal Sep 12, 2024
e60d882
Bed number change requested by Abby in Slack
KatyTaylor Sep 13, 2024
b62f28d
build: repair option dependencies bug
StephenHulme Sep 16, 2024
ba42d08
Merge pull request #1917 from sanger/scrna-core-bed-verification-change
KatyTaylor Sep 16, 2024
134bb71
Merge pull request #1926 from sanger/sh51/address-vite-optional-depen…
StephenHulme Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ release.tar.gz

# Bye-bug history
.byebug_history

# RubyMine
.idea
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.58.0
3.59.0
45 changes: 24 additions & 21 deletions app/models/labware_creators/plate_split_to_tube_racks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
validates_nested :well_filter

# Don't create the tubes until at least the contingency file has been uploaded
validates :contingency_file, presence: true
validate :validate_file_presence

# N.B. contingency file is required, sequencing file is optional
validates_nested :sequencing_csv_file, if: :sequencing_file
Expand All @@ -72,6 +72,14 @@
PARENT_PLATE_INCLUDES =
'wells.aliquots,wells.aliquots.sample,wells.downstream_tubes,wells.downstream_tubes.custom_metadatum_collection'

def validate_file_presence
if sequencing_file.blank?
errors.add(:base, "Sequencing file can't be blank")
elsif contingency_file.present? && sequencing_file.blank?
errors.add(:base, 'If contingency_file is present, sequencing_file must also be present.')

Check warning on line 79 in app/models/labware_creators/plate_split_to_tube_racks.rb

View check run for this annotation

Codecov / codecov/patch

app/models/labware_creators/plate_split_to_tube_racks.rb#L79

Added line #L79 was not covered by tests
end
end

def save
# NB. need the && true!!
super && upload_tube_rack_files && true
Expand Down Expand Up @@ -111,15 +119,15 @@
#
# @return [Array<Tube>] The child sequencing tubes.
def create_child_sequencing_tubes
return [] if require_contingency_tubes_only?

create_tubes(sequencing_tube_purpose_uuid, parent_wells_for_sequencing.length, sequencing_tube_attributes)
end

# Creates a child contingency tube for each parent well not already assigned to a sequencing tube.
#
# @return [Array<Tube>] The child contingency tubes.
def create_child_contingency_tubes
return [] if require_sequencing_tubes_only?

create_tubes(contingency_tube_purpose_uuid, parent_wells_for_contingency.length, contingency_tube_attributes)
end

Expand Down Expand Up @@ -201,7 +209,7 @@
#
# Sets errors if the tube rack barcodes are the same
def check_tube_barcodes_differ_between_files
return unless contingency_file_valid? && sequencing_file_valid?
return unless sequencing_file_valid? && contingency_file_valid?

seq_barcodes = extract_barcodes(sequencing_csv_file)
cont_barcodes = extract_barcodes(contingency_csv_file)
Expand All @@ -227,22 +235,19 @@
# Sets errors if there are insufficient or too many tubes.
def must_have_correct_number_of_tubes_in_rack_files
return unless files_valid?

if require_contingency_tubes_only?
add_error_if_wrong_number_of_tubes(:contingency_csv_file, num_contingency_tubes, num_parent_wells)
else
unless require_sequencing_tubes_only?
add_error_if_wrong_number_of_tubes(
:contingency_csv_file,
num_contingency_tubes,
num_parent_wells - num_parent_unique_samples
)
add_error_if_wrong_number_of_tubes(:sequencing_csv_file, num_sequencing_tubes, num_parent_unique_samples)
end
add_error_if_wrong_number_of_tubes(:sequencing_csv_file, num_sequencing_tubes, num_parent_unique_samples)
end

# Checks the files passed their validations
def files_valid?
return contingency_file_valid? if require_contingency_tubes_only?
return sequencing_file_valid? if require_sequencing_tubes_only?

contingency_file_valid? && sequencing_file_valid?
end
Expand Down Expand Up @@ -347,17 +352,17 @@
#
# @return [void]
def upload_tube_rack_files
unless require_contingency_tubes_only?
parent_v1.qc_files.create_from_file!(sequencing_file, 'scrna_core_sequencing_tube_rack_scan.csv')
unless require_sequencing_tubes_only?
parent_v1.qc_files.create_from_file!(contingency_file, 'scrna_core_contingency_tube_rack_scan.csv')
end
parent_v1.qc_files.create_from_file!(contingency_file, 'scrna_core_contingency_tube_rack_scan.csv')
parent_v1.qc_files.create_from_file!(sequencing_file, 'scrna_core_sequencing_tube_rack_scan.csv')
end

# Returns true if only contingency tubes are required for the parent plate, false otherwise.
#
# @return [Boolean]
def require_contingency_tubes_only?
sequencing_file.blank?
def require_sequencing_tubes_only?
contingency_file.blank?
end

# Returns an array of parent wells that should be transferred to sequencing tubes based on the current well filter.
Expand All @@ -372,8 +377,6 @@
#
# @return [Array<Well>] An array of parent wells.
def find_parent_wells_for_sequencing
return [] if require_contingency_tubes_only?

unique_sample_uuids = []
parent_wells_for_seq = []

Expand Down Expand Up @@ -607,8 +610,8 @@
# @param well [Well] The well to find the child tube for.
# @return [Tube, nil] The child tube corresponding to the given well, or nil if no child tube was found.
def find_child_tube(well)
if require_contingency_tubes_only?
@child_contingency_tubes[@contingency_wells_to_tube_names[well]]
if require_sequencing_tubes_only?
@child_sequencing_tubes[@sequencing_wells_to_tube_names[well]]
else
@child_sequencing_tubes[@sequencing_wells_to_tube_names[well]] ||
@child_contingency_tubes[@contingency_wells_to_tube_names[well]]
Expand All @@ -619,9 +622,9 @@
#
# @return [void]
def add_child_tube_metadata
add_sequencing_tube_metadata unless require_contingency_tubes_only?
add_sequencing_tube_metadata

add_contingency_tube_metadata
add_contingency_tube_metadata unless require_sequencing_tubes_only?
end

# Adds tube rack barcode and position metadata to child sequencing tubes.
Expand Down
10 changes: 5 additions & 5 deletions app/views/tube_creation/plate_split_to_tube_racks.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
<% end %>
<%= sidebar do %>
<%= card title: 'Upload tube rack scan files' do %>
<p>For this parent plate with <b><%= @labware_creator.num_parent_unique_samples %></b> distinct samples and a total of <b><%= @labware_creator.num_parent_wells %></b> transferable wells, you will need <b><%= @labware_creator.num_parent_unique_samples %></b> sequencing and <b><%= @labware_creator.num_parent_wells - @labware_creator.num_parent_unique_samples %></b> contingency tubes (or if just doing contingency <b><%= @labware_creator.num_parent_wells %></b> contingency tubes).</p>
<p>For this parent plate with <b><%= @labware_creator.num_parent_unique_samples %></b> distinct samples and a total of <b><%= @labware_creator.num_parent_wells %></b> transferable wells, you will need <b><%= @labware_creator.num_parent_unique_samples %></b> sequencing and <b><%= @labware_creator.num_parent_wells - @labware_creator.num_parent_unique_samples %></b> contingency tubes.</p>
<%= form_for(@labware_creator, as: :tube, url: limber_plate_tubes_path(@labware_creator.parent)) do |f| %>
<%= f.hidden_field :purpose_uuid %>
<h4>Sequencing tube rack scan file (optional)</h4>
<h4>Sequencing tube rack scan file (required)</h4>
<div class="form-group">
<%= f.file_field :sequencing_file, accept: '.csv', required: false %>
<%= f.file_field :sequencing_file, accept: '.csv', required: true %>
</div>
<h4>Contingency tube rack scan file (required)</h4>
<h4>Contingency tube rack scan file (sequencing file is required to be uploaded)</h4>
<div class="form-group">
<%= f.file_field :contingency_file, accept: '.csv', required: true %>
<%= f.file_field :contingency_file, accept: '.csv', required: false %>
</div>
<%= f.submit class: 'btn btn-success' %>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions config/pipelines/bespoke_pcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Bespoke PCR:
- Standard
- TraDIS
- TruSeq mRNA (RNA Seq)
- SGE Library v0.2
library_pass: LBB Lib PCR-XP
relationships:
LBB Cherrypick: LBB Ligation
Expand Down
4 changes: 2 additions & 2 deletions config/robots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3649,10 +3649,10 @@
states: ['passed'],
label: 'Bed 15'
},
bed(14).barcode => {
bed(13).barcode => {
purpose: 'LRC PBMC Pools',
states: ['pending'],
label: 'Bed 14',
label: 'Bed 13',
parent: bed(15).barcode,
target_state: 'passed'
}
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
"vitest": "^2.0.5",
"vue-template-compiler": "^2.7.0"
},
"_comment": "Required to address https://github.com/npm/cli/issues/4828",
"optionalDependencies": {
"@rollup/rollup-darwin-arm64": "*",
"@rollup/rollup-linux-x64-gnu": "*",
"@rollup/rollup-win32-x64-msvc": "*"
},
"name": "limber",
"scripts": {
"dev": "vite dev",
Expand Down
Loading
Loading