Skip to content

Commit 8356094

Browse files
committed
Preserve i7/i5 indexes for Novogene export
1 parent 23ae555 commit 8356094

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

singlecell/resources/web/singlecell/panel/LibraryExportPanel.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,14 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
800800
return;
801801
}
802802

803-
barcodeCombosUsed.push([r[fieldName + '/barcode5'], '', r.laneAssignment || ''].join('/'));
803+
var barcode3s = r[fieldName + '/barcode3/sequence'] ? r[fieldName + '/barcode3/sequence'].split(',') : [];
804+
if (barcode3s.length && barcode3s.length !== barcode5s.length) {
805+
var msg = 'Unequal i7/i5 barcodes: ' + sampleName;
806+
Ext4.Msg.alert('Error', msg);
807+
return;
808+
}
809+
810+
barcodeCombosUsed.push([r[fieldName + '/barcode5'], r[fieldName + '/barcode3'], r.laneAssignment || ''].join('/'));
804811

805812
//The new format requires one/line
806813
if (instrument === 'Novogene-New') {
@@ -817,6 +824,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
817824

818825
Ext4.Array.forEach(barcode5s, function (bc, idx) {
819826
bc = doRC ? doReverseComplement(bc) : bc;
827+
const bc3 = barcode3s.length ? bc3[idx] : '';
820828

821829
var data = [sampleName, (instrument.startsWith('Novogene') ? '' : cleanedName), bc, ''];
822830
if (instrument === 'Novogene') {
@@ -830,7 +838,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
830838

831839
data.push('Macaca mulatta');
832840
data.push(bc);
833-
data.push('');
841+
data.push(bc3);
834842
data.push(r[fieldName + '/concentration'] || '');
835843
data.push(defaultVolume);
836844
data.push('');
@@ -845,7 +853,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
845853
data.push(sampleName);
846854
data.push(suffix === 'HTO' ? 'Lane sequencing-With Demultiplexing' : 'Partial lane sequencing-With Demultiplexing');
847855
data.push(bc);
848-
data.push(''); //P5
856+
data.push(bc3); //P5
849857
data.push(size);
850858
data.push('Others'); //Library Status
851859
data.push(totalData); //Total data

0 commit comments

Comments
 (0)