Skip to content

Commit 221ce87

Browse files
committed
Bugfixes to cDNA import
1 parent d4fe3ad commit 221ce87

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

singlecell/resources/web/singlecell/panel/PoolImportPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Ext4.define('SingleCell.panel.PoolImportPanel', {
143143
allowRowSpan: true
144144
},{
145145
name: 'kitType',
146-
labels: ['Kit Type', 'V1.1/V2/HT', 'V1.1/HT'],
146+
labels: ['Kit Type', 'V1.1/V2/HT', 'V1.1/HT', 'HT/V1.1/V2'],
147147
transform: 'kitType'
148148
}],
149149

@@ -1026,7 +1026,7 @@ Ext4.define('SingleCell.panel.PoolImportPanel', {
10261026
getUniqueValues: function(rowArr, colName){
10271027
var ret = [];
10281028
Ext4.Array.forEach(rowArr, function(row){
1029-
if (row[colName])
1029+
if (row[colName] && row[colName] !== 'NA' && row[colName] != 'N/A')
10301030
ret.push(row[colName]);
10311031
}, this);
10321032

singlecell/resources/web/singlecell/panel/cDNAImportPanel.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,15 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
126126
xtype: 'checkbox',
127127
fieldLabel: 'Combined Hashing and Cite-Seq Libraries',
128128
itemId: 'combineHashingCite',
129-
checked: false
129+
checked: false,
130+
listeners: {
131+
change: function(field, val) {
132+
if (val) {
133+
// The combined library only makes sense if using BioLegend:
134+
field.up('panel').down('#hashingType').setValue('BioLegend');
135+
}
136+
}
137+
}
130138
},{
131139
xtype: 'checkbox',
132140
fieldLabel: 'Require Library Concentrations',
@@ -343,7 +351,7 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
343351
var toInsert = data.readsetRows.filter(r => r.doInsert)
344352
if (!toInsert.length) {
345353
Ext4.Msg.hide();
346-
Ext4.Msg.alert('Success', 'Data Saved', function(){
354+
Ext4.Msg.alert('No Rows To Save', 'None of the rows needed to be saved. This might mean they already exist, or could indicate a problem with the import', function(){
347355
window.location = LABKEY.ActionURL.buildURL('query', 'executeQuery.view', Laboratory.Utils.getQueryContainerPath(), {'query.queryName': 'cdna_libraries', schemaName: 'singlecell', 'query.sort': '-created'});
348356
}, this);
349357
}
@@ -378,12 +386,12 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
378386
baseRow.tcrReadsetId = tcrReadsetId;
379387
}
380388

381-
var htoReadsetId = readsetMap[row.plateId + '-HTO'];
389+
var htoReadsetId = readsetMap[row.plateId + '-HTO'] || readsetMap[row.plateId + '-HTO-CITE'];
382390
if (htoReadsetId) {
383391
baseRow.hashingReadsetId = htoReadsetId;
384392
}
385393

386-
var citeseqReadsetId = readsetMap[row.plateId + '-CITE'];
394+
var citeseqReadsetId = readsetMap[row.plateId + '-CITE'] || readsetMap[row.plateId + '-HTO-CITE'];
387395
if (citeseqReadsetId) {
388396
baseRow.citeseqReadsetId = citeseqReadsetId;
389397
}
@@ -421,6 +429,16 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
421429
scope: this
422430
});
423431
}
432+
else {
433+
Ext4.Msg.hide();
434+
Ext4.Msg.alert('Success', 'Data Saved', function () {
435+
window.location = LABKEY.ActionURL.buildURL('query', 'executeQuery.view', Laboratory.Utils.getQueryContainerPath(), {
436+
'query.queryName': 'cdna_libraries',
437+
schemaName: 'singlecell',
438+
'query.sort': '-created'
439+
});
440+
}, this);
441+
}
424442
},
425443
failure: LDK.Utils.getErrorCallback(),
426444
scope: this

0 commit comments

Comments
 (0)