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 335 updating flowcel types and library types #2062

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion app/controllers/print_jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions app/models/print_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ def print_to_sprint

label_template = get_label_template_by_service('SPrint')

label_array = labels_sprint.values

# label_array:
# [{
# "right_text"=>"DN9000003B",
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/views/labware/_barcode_printing_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<% labels.each do |label| %>
<!-- this includes main label and extra label in one -->
<% 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%>
<!-- additional labels (e.g. for additional labels on the same plate or for extra intermediate plates) -->
<% label.additional_label_definitions.each_with_index do |additional_labels, index|%>
Expand Down
42 changes: 42 additions & 0 deletions config/pipelines/hic.wip.yml
Copy link
Contributor Author

@dasunpubudumal dasunpubudumal Nov 20, 2024

Choose a reason for hiding this comment

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

Had to take this out of Bespoke PCR pipeline config to make limber_hic WIP-able.

Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions spec/controllers/print_jobs_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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' }]
},
Copy link
Member

@yoldas yoldas Nov 21, 2024

Choose a reason for hiding this comment

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

Why is this changed to an array?
As far as I know, labels_sprint object provides all attributes in a single object. The labels object on the other hand has separate objects for main label and lid label for a tube in an array for example.

Copy link
Contributor Author

@dasunpubudumal dasunpubudumal Nov 21, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-11-20 at 10 31 01 AM

When given on a single object (as the image above), if you have multiple tube labels to be printed, the previous tubes will be overwritten by the last tube; therefore printing only the last tube label.

Copy link
Member

@yoldas yoldas Nov 21, 2024

Choose a reason for hiding this comment

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

Thanks. So it fixes the issue for Squix printing. That will be still a problem if Toshiba printing is used then. Because the array there is not for multiple labels; it is for sections of a single label. Looking again all keys are in the same object so what I said is not correct. Sorry.

number_of_copies: 1
}
Expand Down
8 changes: 4 additions & 4 deletions spec/models/print_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@

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
Expand All @@ -215,7 +215,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
Expand Down
Loading