@@ -634,7 +634,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
634634 ',readsetId,readsetId/name,readsetId/application,readsetId/librarytype,readsetId/barcode5,readsetId/barcode5/sequence,readsetId/barcode3,readsetId/barcode3/sequence,readsetId/totalFiles,readsetId/concentration' +
635635 ',tcrReadsetId,tcrReadsetId/name,tcrReadsetId/application,tcrReadsetId/librarytype,tcrReadsetId/barcode5,tcrReadsetId/barcode5/sequence,tcrReadsetId/barcode3,tcrReadsetId/barcode3/sequence,tcrReadsetId/totalFiles,tcrReadsetId/concentration' +
636636 ',hashingReadsetId,hashingReadsetId/name,hashingReadsetId/application,hashingReadsetId/librarytype,hashingReadsetId/barcode5,hashingReadsetId/barcode5/sequence,hashingReadsetId/barcode3,hashingReadsetId/barcode3/sequence,hashingReadsetId/totalFiles,hashingReadsetId/concentration' +
637- ',citeseqReadsetId,citeseqReadsetId/name,citeseqReadsetId/application,citeseqReadsetId/librarytype,citeseqReadsetId/barcode5,citeseqReadsetId/barcode5/sequence,citeseqReadsetId/barcode3,citeseqReadsetId/barcode3/sequence,citeseqReadsetId/totalFiles,citeseqReadsetId/concentration' ,
637+ ',citeseqReadsetId,citeseqReadsetId/name,citeseqReadsetId/application,citeseqReadsetId/librarytype,citeseqReadsetId/barcode5,citeseqReadsetId/barcode5/sequence,citeseqReadsetId/barcode3,citeseqReadsetId/barcode3/sequence,citeseqReadsetId/totalFiles,citeseqReadsetId/concentration,uniqueHtos ' ,
638638 scope : this ,
639639 filterArray : [ LABKEY . Filter . create ( 'plateId' , plateIds . join ( ';' ) , LABKEY . Filter . Types . IN ) ] ,
640640 failure : LDK . Utils . getErrorCallback ( ) ,
@@ -661,6 +661,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
661661 if ( expectedPairs ) {
662662 sortedRows = [ ] ;
663663 var missingRows = [ ] ;
664+ var errorMsgs = [ ] ;
664665 Ext4 . Array . forEach ( expectedPairs , function ( p ) {
665666 var found = false ;
666667 Ext4 . Array . forEach ( results . rows , function ( row ) {
@@ -679,6 +680,11 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
679680 if ( row [ 'hashingReadsetId' ] && row [ 'hashingReadsetId/application' ] && row [ 'hashingReadsetId/application' ] === 'Cell Hashing' ) {
680681 sortedRows . push ( Ext4 . apply ( { targetApplication : '10x HTO' , laneAssignment : ( p . length > 2 ? p [ 2 ] : null ) , plateAlias : ( p . length > 3 ? p [ 3 ] : null ) } , row ) ) ;
681682 found = true ;
683+
684+ if ( row . uniqueHtos <= 1 ) {
685+ errorMsgs . push ( row [ 'hashingReadsetId/name' ] + ': only ' + row . uniqueHtos + ' present' )
686+ }
687+
682688 return false ;
683689 }
684690 }
@@ -713,6 +719,11 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
713719 Ext4 . Msg . alert ( 'Error' , 'The following plates were not found:<br>' + missingRows . join ( '<br>' ) ) ;
714720 return ;
715721 }
722+
723+ if ( errorMsgs . length ) {
724+ Ext4 . Msg . alert ( 'Error' , 'The following lanes had HTO libraries, without multiple HTOs:<br>' + errorMsgs . join ( '<br>' ) ) ;
725+ return ;
726+ }
716727 }
717728
718729 var barcodes = 'Illumina' ;
0 commit comments