From 65ca85402ff0aabee7e5a9f9055eec30ade52f99 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Fri, 8 Nov 2024 15:51:40 +0000 Subject: [PATCH 01/10] feat: update bespoke PCR pipeline to include limber_hic request type --- config/pipelines/bespoke_pcr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index e75c64975..feb666a8c 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -2,7 +2,9 @@ Bespoke PCR: pipeline_group: Bespoke PCR filters: - request_type_key: limber_pcr_bespoke + request_type_key: + - limber_pcr_bespoke + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. library_type: - ChIP-Seq Auto - Chromium single cell HTO @@ -93,6 +95,7 @@ Bespoke PCR MX: filters: request_type_key: - limber_multiplexing + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. relationships: LBB Lib PCR-XP: LBB Lib Pool Stock LBB Lib Pool Stock: LB Lib Pool Norm From 21d4f7d5b95389475aa4180d42a56ac2923fc30d Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Fri, 8 Nov 2024 16:01:04 +0000 Subject: [PATCH 02/10] fix: clean up comments and formatting in bespoke PCR pipeline configuration --- config/pipelines/bespoke_pcr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index feb666a8c..bb15ecb36 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -2,9 +2,9 @@ Bespoke PCR: pipeline_group: Bespoke PCR filters: - request_type_key: + request_type_key: - limber_pcr_bespoke - - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. library_type: - ChIP-Seq Auto - Chromium single cell HTO @@ -95,7 +95,7 @@ Bespoke PCR MX: filters: request_type_key: - limber_multiplexing - - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. relationships: LBB Lib PCR-XP: LBB Lib Pool Stock LBB Lib Pool Stock: LB Lib Pool Norm From 796570d99a0590bb8d8639b822adfff52c5deff6 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Mon, 11 Nov 2024 11:01:19 +0000 Subject: [PATCH 03/10] Updating MX stage --- config/pipelines/bespoke_pcr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index bb15ecb36..793b9689d 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -95,7 +95,6 @@ Bespoke PCR MX: filters: request_type_key: - limber_multiplexing - - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. relationships: LBB Lib PCR-XP: LBB Lib Pool Stock LBB Lib Pool Stock: LB Lib Pool Norm From 892dbbf46cb54a43034798ac1ed7791c799fde69 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 14 Nov 2024 13:15:52 +0000 Subject: [PATCH 04/10] Adding reference for the story in comments --- config/pipelines/bespoke_pcr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index 793b9689d..284014785 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -4,7 +4,7 @@ Bespoke PCR: filters: request_type_key: - limber_pcr_bespoke - - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented. + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented (Y24-335). library_type: - ChIP-Seq Auto - Chromium single cell HTO From 2cbde8aa2d7bfc1b66068f4b01b8b7223620724c Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 14 Nov 2024 16:30:47 +0000 Subject: [PATCH 05/10] Add HiC pipeline configuration and update bespoke PCR filters --- config/pipelines/bespoke_pcr.yml | 1 - config/pipelines/hic.wip.yml | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 config/pipelines/hic.wip.yml diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index 284014785..6d923d3fc 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -4,7 +4,6 @@ Bespoke PCR: filters: request_type_key: - limber_pcr_bespoke - - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented (Y24-335). library_type: - ChIP-Seq Auto - Chromium single cell HTO diff --git a/config/pipelines/hic.wip.yml b/config/pipelines/hic.wip.yml new file mode 100644 index 000000000..811b13bc8 --- /dev/null +++ b/config/pipelines/hic.wip.yml @@ -0,0 +1,42 @@ +--- +Bespoke PCR HiC: + pipeline_group: Bespoke PCR HiC + filters: + request_type_key: + - limber_hic # Have to move this into a the new pipeline config when HiC pipeline is implemented (Y24-335). + library_type: + - ChIP-Seq Auto + - Chromium single cell HTO + - Chromium single cell surface protein + - Chromium single cell surface protein HT + - Chromium Visium + - Chromium Visium FFPE + - Manual Chromium single cell 3 prime v3 + - Manual Chromium single cell 3 prime HT v3 + - Manual Chromium single cell 5 prime v2 + - Manual Chromium single cell 5 prime HT v2 + - emSEQ + - Haplotagging + - Hi-C + - Hi-C - Arima v1 + - Hi-C - Arima v2 + - Hi-C - Dovetail + - Hi-C - OmniC + - Hi-C - Qiagen + - Manual Standard WGS (Plate) + - Ribozero RNA depletion + - Ribozero RNA-seq (Bacterial) + - Ribozero RNA-seq (HMR) + - RNA-seq dUTP eukaryotic + - RNA-seq dUTP prokaryotic + - Small RNA (miRNA) + - Standard + - TraDIS + - TruSeq mRNA (RNA Seq) + - SGE Library v0.2 + library_pass: LBB Lib PCR-XP + relationships: + Stock Plate: LBB Ligation + LBB Cherrypick: LBB Ligation + LBC Cherrypick: LBB Ligation + LBB Ligation: LBB Lib PCR-XP From b3fa7af11b0cd153e5ef13c7c374243185d12ab1 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Thu, 14 Nov 2024 16:55:39 +0000 Subject: [PATCH 06/10] Refactor bespoke PCR configuration to simplify request type key definition --- config/pipelines/bespoke_pcr.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/pipelines/bespoke_pcr.yml b/config/pipelines/bespoke_pcr.yml index 6d923d3fc..e75c64975 100644 --- a/config/pipelines/bespoke_pcr.yml +++ b/config/pipelines/bespoke_pcr.yml @@ -2,8 +2,7 @@ Bespoke PCR: pipeline_group: Bespoke PCR filters: - request_type_key: - - limber_pcr_bespoke + request_type_key: limber_pcr_bespoke library_type: - ChIP-Seq Auto - Chromium single cell HTO From b5d5fe5d6c30f7fa7608140e5102906be95fc49b Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 20 Nov 2024 11:08:46 +0000 Subject: [PATCH 07/10] Adding reference for the story in comments --- app/controllers/print_jobs_controller.rb | 2 +- app/models/print_job.rb | 2 +- app/views/labware/_barcode_printing_form.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/print_jobs_controller.rb b/app/controllers/print_jobs_controller.rb index 29a7cb4d2..896c186d9 100644 --- a/app/controllers/print_jobs_controller.rb +++ b/app/controllers/print_jobs_controller.rb @@ -28,7 +28,7 @@ def print_job_params # While we COULD carefully define the current label structure, we gain nothing by doing so and make # future changes more painful. permitted[:labels] = params.require(:print_job)[:labels].map(&:permit!) - permitted[:labels_sprint] = params.require(:print_job)[:labels_sprint].permit! + permitted[:labels_sprint] = params.require(:print_job)[:labels_sprint][:sprint].map(&:permit!) end end diff --git a/app/models/print_job.rb b/app/models/print_job.rb index eac78d4c3..52abb1db5 100644 --- a/app/models/print_job.rb +++ b/app/models/print_job.rb @@ -90,7 +90,7 @@ def print_to_sprint label_template = get_label_template_by_service('SPrint') - label_array = labels_sprint.values + label_array = labels_sprint # label_array: # [{ diff --git a/app/views/labware/_barcode_printing_form.html.erb b/app/views/labware/_barcode_printing_form.html.erb index 8d04a311f..c37091abe 100644 --- a/app/views/labware/_barcode_printing_form.html.erb +++ b/app/views/labware/_barcode_printing_form.html.erb @@ -27,7 +27,7 @@ <% labels.each do |label| %> <% label.sprint_attributes.each_with_index do |(k, v), index|%> - <%= hidden_field_tag "#{f.object_name}[labels_sprint][sprint][#{k}]", v %> + <%= hidden_field_tag "#{f.object_name}[labels_sprint][sprint][][#{k}]", v %> <%end%> <% label.additional_label_definitions.each_with_index do |additional_labels, index|%> From 453a1fca344f91c97ea35f459f2e726b48d699de Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 20 Nov 2024 11:23:44 +0000 Subject: [PATCH 08/10] Fixing tests --- spec/controllers/print_jobs_controller_spec.rb | 4 ++-- spec/models/print_job_spec.rb | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/spec/controllers/print_jobs_controller_spec.rb b/spec/controllers/print_jobs_controller_spec.rb index f295256f7..1803f9360 100644 --- a/spec/controllers/print_jobs_controller_spec.rb +++ b/spec/controllers/print_jobs_controller_spec.rb @@ -16,10 +16,10 @@ label_templates_by_service: 'tube_label_template_1d', labels: [{ 'label' => { 'barcode' => '12345', 'test_attr' => 'test' } }], labels_sprint: { - sprint: { + sprint: [{ 'extra_right_text' => 'some x right text', 'extra_left_text' => 'some x left text' - } + }] }, number_of_copies: 1 } diff --git a/spec/models/print_job_spec.rb b/spec/models/print_job_spec.rb index 162c88b2d..01aaee376 100644 --- a/spec/models/print_job_spec.rb +++ b/spec/models/print_job_spec.rb @@ -188,15 +188,13 @@ describe 'print_to_sprint' do let(:labels_sprint) do - { - 'sprint' => { + [{ 'right_text' => 'DN9000003B', 'left_text' => 'DN9000003B', 'barcode' => 'DN9000003B', 'extra_right_text' => 'DN9000003B LTHR-384 RT', 'extra_left_text' => '10-NOV-2020' - } - } + }] end it 'will send a print request to SPrintClient' do @@ -215,7 +213,7 @@ expect(SPrintClient).to receive(:send_print_request).with( printer_sprint.name, label_template_name_sprint, - labels_sprint.values + labels_sprint ) expect(pj.print_to_sprint).to eq(true) end From 721181cf3944f3ed7218b9921e70839582c59579 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 20 Nov 2024 11:26:41 +0000 Subject: [PATCH 09/10] Making prettier happy --- spec/controllers/print_jobs_controller_spec.rb | 5 +---- spec/models/print_job_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/spec/controllers/print_jobs_controller_spec.rb b/spec/controllers/print_jobs_controller_spec.rb index 1803f9360..58f6e9e37 100644 --- a/spec/controllers/print_jobs_controller_spec.rb +++ b/spec/controllers/print_jobs_controller_spec.rb @@ -16,10 +16,7 @@ label_templates_by_service: 'tube_label_template_1d', labels: [{ 'label' => { 'barcode' => '12345', 'test_attr' => 'test' } }], labels_sprint: { - sprint: [{ - 'extra_right_text' => 'some x right text', - 'extra_left_text' => 'some x left text' - }] + sprint: [{ 'extra_right_text' => 'some x right text', 'extra_left_text' => 'some x left text' }] }, number_of_copies: 1 } diff --git a/spec/models/print_job_spec.rb b/spec/models/print_job_spec.rb index 01aaee376..3303d0dab 100644 --- a/spec/models/print_job_spec.rb +++ b/spec/models/print_job_spec.rb @@ -188,13 +188,15 @@ describe 'print_to_sprint' do let(:labels_sprint) do - [{ + [ + { 'right_text' => 'DN9000003B', 'left_text' => 'DN9000003B', 'barcode' => 'DN9000003B', 'extra_right_text' => 'DN9000003B LTHR-384 RT', 'extra_left_text' => '10-NOV-2020' - }] + } + ] end it 'will send a print request to SPrintClient' do From 4af660f2c7a503a3acee58db649358d5e8be80e5 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Wed, 20 Nov 2024 11:49:07 +0000 Subject: [PATCH 10/10] Refactoring --- app/models/print_job.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/print_job.rb b/app/models/print_job.rb index 52abb1db5..b7639f99b 100644 --- a/app/models/print_job.rb +++ b/app/models/print_job.rb @@ -90,8 +90,6 @@ def print_to_sprint label_template = get_label_template_by_service('SPrint') - label_array = labels_sprint - # label_array: # [{ # "right_text"=>"DN9000003B", @@ -101,7 +99,7 @@ def print_to_sprint # "extra_left_text"=>"10-NOV-2020" # }] - merge_fields_list = label_array * number_of_copies + merge_fields_list = labels_sprint * number_of_copies # assumes all labels use the same label template SPrintClient.send_print_request(printer_name, label_template, merge_fields_list)