Skip to content

Ultima sample sheet Barcode_Plate_Num and Index_Barcode_Num indexing#5541

Open
yoldas wants to merge 5 commits intodevelopfrom
ultima-sample-sheet-index-barcode-num
Open

Ultima sample sheet Barcode_Plate_Num and Index_Barcode_Num indexing#5541
yoldas wants to merge 5 commits intodevelopfrom
ultima-sample-sheet-index-barcode-num

Conversation

@yoldas
Copy link
Member

@yoldas yoldas commented Feb 11, 2026

Closes #

Changes proposed in this pull request

  • Use all Ultimate tag groups from database rather than relying on tag groups from batch
  • Ensure Barcode_Plate_Num is 1 for Ultima P1 tag group and 2 for Ultimate P2 tag group
  • Ensure the z-index for the first tag is 1 for Ultima P1 tag group and 97 for Ultimate P2 tag group
  • Note: The names of the Ultima tag groups and the plate numbers are specified in ULTIMA_TAG_GROUPS constant
  • Updated Confluence page https://ssg-confluence.internal.sanger.ac.uk/spaces/PSDPUB/pages/271057969/Ultima+UG+100+Sequencer

More info in this page:

Example CSV contents from unit tests

[Header],"","","","","","",""
Batch 2 NT1O,"","","","","","",""
"","","","","","","",""
[Global],"","","","","","",""
Application,sequencing_recipe,analysis_recipe,"","","","",""
WGS native gDNA,UG_116cycles_Baseline_1.8.5.2,wgs1,"","","","",""
"","","","","","","",""
[Samples],"","","","","","",""
Sample_ID,Library_name,Index_Barcode_Num,Index_Barcode_Sequence,Barcode_Plate_Num,Barcode_Plate_Well,application_type,study_id
s1,Sample1,Z0001,T,1,A1,native,7
s2,Sample2,Z0002,C,1,B1,native,8
s3,Sample3,Z0003,G,1,C1,native,9
[Header],"","","","","","",""
Batch 2 NT2P,"","","","","","",""
"","","","","","","",""
[Global],"","","","","","",""
Application,sequencing_recipe,analysis_recipe,"","","","",""
WGS native gDNA,UG_116cycles_Baseline_1.8.5.2,wgs1,"","","","",""
"","","","","","","",""
[Samples],"","","","","","",""
Sample_ID,Library_name,Index_Barcode_Num,Index_Barcode_Sequence,Barcode_Plate_Num,Barcode_Plate_Well,application_type,study_id
s1,Sample4,Z0097,TCAT,2,A1,native,10
s2,Sample5,Z0098,TCAC,2,B1,native,11
s3,Sample6,Z0099,TCAG,2,C1,native,12

Tests in UAT

Ultima P1 Sequences: https://uat.sequencescape.psd.sanger.ac.uk/tag_groups/258
Ultima P2 Sequences: https://uat.sequencescape.psd.sanger.ac.uk/tag_groups/259

Test1: Common ancestors, Single tag set in batch, Tag Group: Ultima P1

NT130294P, UPF Balanced Norm
NT130295Q, UPF Balanced Norm
Batch https://uat.sequencescape.psd.sanger.ac.uk/batches/141

BEFORE FIX - PASSED

Batch 141 NT130294P First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381877-W_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

Batch 141 NT130295Q First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381877-W_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

AFTER FIX - PASSED

Batch 141 NT130294P First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381877-W_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

Batch 141 NT130295Q First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381877-W_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

Test2: Common ancestors, Single tag set in batch, Tag Group: Ultima P2

NT130301U, UPF Balanced Norm
NT130302V, UPF Balanced Norm
Batch https://uat.sequencescape.psd.sanger.ac.uk/batches/142

BEFORE FIX - FAILED

Batch 142 NT130301U First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381883-U_A1	Z0001	CAGTCAGTTGCAGAT	1	A1	native	1

Batch 142 NT130302V First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381883-U_A1	Z0001	CAGTCAGTTGCAGAT	1	A1	native	1

AFTER FIX - PASSED

Batch 142 NT130301U First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381883-U_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1

Batch 142 NT130302V Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381883-U_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1

Test3: Distinct ancestors, Two tag sets in batch, Tag Groups: Ultima P1 and Ultima P2

NT130308E, UPF Balanced Norm, Ultima P1
NT130315D, UPF Balanced Norm, Ultima P2
Batch https://uat.sequencescape.psd.sanger.ac.uk/batches/143

BEFORE FIX - PASSED

Batch 143 NT130308E First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381889-D_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

Batch 143 NT130315D First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381895-B_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1

AFTER FIX - PASSED

Batch 143 NT130308E First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381889-D_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1

Batch 143 NT130315D First Sample

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381895-B_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1

Test 4: Hack for mixed tag set within the same tube, Tag Groups: Ultima P1 and Ultima P2

NT130309F, UPF Balanced Norm, Ultima P1 (1 to 48) and Ultima P2 (49 to 96)
NT130316E, UPF Balanced Norm, Ultima P2 (1 to 48) and Ultima P1 (49 to 96)
https://uat.sequencescape.psd.sanger.ac.uk/batches/144

BEFORE FIX - PASSED

Batch 144 NT130309F Samples with first and last of each Tag Group

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381889-D_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1
s48	sample_1_SQPU-381889-D_H6	Z0048	CTGCCAGACTGTGAT	1	H6	native	1
s49	sample_1_SQPU-381889-D_A7	Z0145	CATGCTATAGCAATGAT	2	A7	native	1
s96	sample_1_SQPU-381889-D_H12	Z0192	CATGATCACACAATGAT	2	H12	native	1

Batch 144 NT130316E Samples with first and last of each Tag Group

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381895-B_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1
s48	sample_1_SQPU-381895-B_H6	Z0144	CTGCACCATCATATGAT	2	H6	native	1
s49	sample_1_SQPU-381895-B_A7	Z0049	CGCACTGCTCCTGAT	1	A7	native	1
s96	sample_1_SQPU-381895-B_H12	Z0096	CAGCCGATATCAGAT	1	H12	native	1

Note: because of the hack, rows appeared in different places in the same file without any change to the content, such as s49 row appeared as the first row, which was fixed as well by the sorted iteration commit b88bcc3

AFTER FIX - PASSED

Batch 144 NT130309F Samples with first and last of each Tag Group

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381889-D_A1	Z0001	CAGCTCGAATGCGAT	1	A1	native	1
s48	sample_1_SQPU-381889-D_H6	Z0048	CTGCCAGACTGTGAT	1	H6	native	1
s49	sample_1_SQPU-381889-D_A7	Z0145	CATGCTATAGCAATGAT	2	A7	native	1
s96	sample_1_SQPU-381889-D_H12	Z0192	CATGATCACACAATGAT	2	H12	native	1

Batch 144 NT130316E Samples with first and last of each Tag Group

Sample_ID	Library_name	Index_Barcode_Num	Index_Barcode_Sequence	Barcode_Plate_Num	Barcode_Plate_Well	application_type	study_id
s1	sample_1_SQPU-381895-B_A1	Z0097	CAGTCAGTTGCAGAT	2	A1	native	1
s48	sample_1_SQPU-381895-B_H6	Z0144	CTGCACCATCATATGAT	2	H6	native	1
s49	sample_1_SQPU-381895-B_A7	Z0049	CGCACTGCTCCTGAT	1	A7	native	1
s96	sample_1_SQPU-381895-B_H12	Z0096	CAGCCGATATCAGAT	1	H12	native	1

Tests in Training

Sample name from error image: 7682STDY14732080

barcodes = Tube.joins(:samples).where(samples: { name: ‘7682STDY14732080’ }).map{ |t| t.human_barcode }
=> [“NT1881853C”, “NT1882031W”, “NT1882549B”, “NT1882550R”, “NT1882551S”]
Batch.joins(:pipeline).where(pipelines: { name: ‘Ultima’ }).select {|b|b.requests.any? {|r|barcodes.include?(r.asset.human_barcode)}}

Batch IDs: 107185 and 107272

TODO: Most likely, the batch was 107272. It is not on training yet. On Monday, after training database refresh, compare the sample sheets between Training and Production.

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

@yoldas yoldas requested a review from sabrine33 February 11, 2026 23:45
@yoldas yoldas self-assigned this Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.37%. Comparing base (8fc8826) to head (b88bcc3).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5541   +/-   ##
========================================
  Coverage    87.36%   87.37%           
========================================
  Files         1463     1463           
  Lines        33005    33005           
  Branches      3467     3467           
========================================
+ Hits         28834    28837    +3     
+ Misses        4150     4147    -3     
  Partials        21       21           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yoldas yoldas added the Bug Bug in code label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug in code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants