Skip to content

Commit 7f4cd5d

Browse files
committed
Merge discvr-24.11 to develop
2 parents f0522c6 + 020ff29 commit 7f4cd5d

File tree

3 files changed

+81
-19
lines changed

3 files changed

+81
-19
lines changed

SequenceAnalysis/pipeline_code/sequence_tools_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ then
617617

618618
mkdir blat
619619
cd blat
620-
wget $WGET_OPTS http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/blat/blat
620+
wget $WGET_OPTS https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/blat/blat
621621
chmod +x blat
622622

623623
install blat $LKTOOLS_DIR/blat

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/alignment/ParagraphStep.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public ParagraphStep()
5353
ToolParameterDescriptor.create("verbose", "Verbose Logging", "If checked, --verbose will be passed to paragraph to increase logging", "checkbox", new JSONObject(){{
5454
put("checked", false);
5555
}}, false),
56+
ToolParameterDescriptor.create("useLocalScratch", "User local scratch", "If checked, the tool will write the intermediate temp files to a folder in the working directory, rather than the job's tempDir. This can make debugging easier.", "checkbox", new JSONObject(){{
57+
put("checked", false);
58+
}}, false),
5659
ToolParameterDescriptor.create("retrieveReferenceSeq", "Retrieve Reference Sequence", "If checked, --debug will be passed to paragraph to increase logging", "checkbox", new JSONObject(){{
5760
put("checked", false);
5861
}}, false)
@@ -237,23 +240,27 @@ else if (!svVcf.exists())
237240
paragraphArgs.add("-o");
238241
paragraphArgs.add(paragraphOutDir.getPath());
239242

240-
File scratchDir = new File(ctx.getOutputDir(), "pgScratch");
241-
if (scratchDir.exists())
243+
File localScratchDir = new File(ctx.getOutputDir(), "pgScratch");
244+
if (localScratchDir.exists())
242245
{
243246
try
244247
{
245-
FileUtils.deleteDirectory(scratchDir);
248+
FileUtils.deleteDirectory(localScratchDir);
246249
}
247250
catch (IOException e)
248251
{
249252
throw new PipelineJobException(e);
250253
}
251254
}
252255

253-
paragraphArgs.add("--scratch-dir");
254-
paragraphArgs.add(scratchDir.getPath());
256+
boolean useLocalScratch = ctx.getParams().optBoolean("useLocalScratch", false);
257+
if (useLocalScratch)
258+
{
259+
paragraphArgs.add("--scratch-dir");
260+
paragraphArgs.add(localScratchDir.getPath());
255261

256-
ctx.getFileManager().addIntermediateFile(scratchDir);
262+
ctx.getFileManager().addIntermediateFile(localScratchDir);
263+
}
257264

258265
paragraphArgs.add("-i");
259266
paragraphArgs.add(svVcf.getPath());

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

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
2222
name: 'importType',
2323
columns: 1,
2424
items: [{
25-
boxLabel: 'Novogene/Plate List',
25+
boxLabel: '10x Plate List',
2626
inputValue: 'plateList',
2727
name: 'importType',
2828
checked: true
@@ -112,7 +112,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
112112
forceSelection: true,
113113
editable: true,
114114
allowBlank: true,
115-
storeValues: ['Novogene', 'Novogene-New']
115+
storeValues: ['Novogene', 'Novogene-New', 'MedGenome']
116116
},{
117117
xtype: 'textarea',
118118
itemId: 'plateList',
@@ -145,7 +145,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
145145
xtype: 'ldk-numberfield',
146146
itemId: 'laneDataMax',
147147
fieldLabel: 'Max Data Per Lane',
148-
value: 700
148+
value: 900
149149
},{
150150
xtype: 'ldk-numberfield',
151151
itemId: 'defaultVolume',
@@ -167,26 +167,26 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
167167
Ext4.Array.forEach(text, function(r, idx){
168168
var val = r[0];
169169
if (val.startsWith('G')){
170-
val = val.substr(1);
170+
val = val.substring(1);
171171
val = val.replace('_', '-');
172172
r[0] = 'GEX';
173173
r.unshift(val);
174174

175175
}
176176
else if (val.startsWith('T')){
177-
val = val.substr(1);
177+
val = val.substring(1);
178178
val = val.replace('_', '-');
179179
r[0] = 'VDJ';
180180
r.unshift(val);
181181
}
182182
else if (val.startsWith('H') || val.startsWith('M')){
183-
val = val.substr(1);
183+
val = val.substring(1);
184184
val = val.replace('_', '-');
185185
r[0] = 'HTO';
186186
r.unshift(val);
187187
}
188188
else if (val.startsWith('C')){
189-
val = val.substr(1);
189+
val = val.substring(1);
190190
val = val.replace('_', '-');
191191
r[0] = 'CITE';
192192
r.unshift(val);
@@ -213,7 +213,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
213213

214214
if (r[0].match('\\*$')) {
215215
var m = r[0].match('\\*$');
216-
var val = r[0].substr(0, m.index);
216+
var val = r[0].substring(0, m.index);
217217
wildcards[val] = r;
218218
}
219219
}, this);
@@ -843,7 +843,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
843843
}, this);
844844
}
845845
}
846-
else if (instrument === '10x Sample Sheet' || instrument === 'Novogene' || instrument === 'Novogene-New') {
846+
else if (instrument === '10x Sample Sheet' || instrument === 'Novogene' || instrument === 'Novogene-New' || instrument === 'MedGenome') {
847847
//we make the default assumption that we're using 10x primers, which are listed in the sample-sheet orientation
848848
var doRC = false;
849849
var rows = [];
@@ -862,7 +862,8 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
862862

863863
var cleanedName = r[fieldName] + '_' + r[fieldName + '/name'].replace(/ /g, '_');
864864
cleanedName = cleanedName.replace(/\//g, '-');
865-
var sampleName = getSampleName(simpleSampleNames, r[fieldName], r[fieldName + '/name']) + (suffix && instrument.startsWith('Novogene') ? '' : '-' + suffix);
865+
var sampleName = getSampleName(simpleSampleNames, r[fieldName], r[fieldName + '/name']) + (suffix && (instrument.startsWith('Novogene') || instrument === 'MedGenome') ? '' : '-' + suffix);
866+
console.log(sampleName)
866867

867868
var barcode5s = r[fieldName + '/barcode5/sequence'] ? r[fieldName + '/barcode5/sequence'].split(',') : [];
868869
if (!barcode5s.length) {
@@ -968,6 +969,53 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
968969
data.push(r.laneAssignment || '');
969970
data.push(barcode5Name || '');
970971
}
972+
else if (instrument === 'MedGenome') {
973+
let libraryType = 'UNKNOWN';
974+
switch (suffix) {
975+
case 'GEX':
976+
libraryType = '10x GEX';
977+
break;
978+
case 'TCR':
979+
libraryType = '10X VDJ';
980+
break;
981+
case 'HTO':
982+
libraryType = 'Cell Hashing';
983+
case 'CITE':
984+
libraryType = '10X Feature Barcode';
985+
break;
986+
default:
987+
console.error('Unknown suffix: ' + suffix);
988+
}
989+
990+
data = [sampleName];
991+
data.push(r.plateAlias ? r.plateAlias : samplePrefix + r.plateId.replace(/-/g, '_'));
992+
data.push(r.laneAssignment ? 'Pool on Lane ' + r.laneAssignment : '');
993+
data.push('1.5 mL tube');
994+
data.push(totalData + 'GB'); //Total data
995+
data.push('PBMC'); // Source
996+
data.push('Macaque'); // Species
997+
data.push(libraryType);
998+
data.push('10x'); // Kit type
999+
data.push('10x'); // Index type
1000+
1001+
data.push(r[fieldName + '/barcode5']);
1002+
data.push(bc); // i7
1003+
1004+
data.push(r[fieldName + '/barcode3'])
1005+
data.push(bc3); //P5
1006+
1007+
data.push(size);
1008+
1009+
var quantity = defaultVolume * r[fieldName + '/concentration'];
1010+
data.push(quantity);
1011+
data.push(defaultVolume);
1012+
data.push(r[fieldName + '/concentration'] || '');
1013+
1014+
data.push(r.laneAssignment || '');
1015+
data.push(r.laneAssignment ? 'Lane ' + r.laneAssignment : '');
1016+
1017+
console.log(data)
1018+
}
9711019
rows.push(data.join(delim));
9721020
}, this);
9731021

@@ -978,7 +1026,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
9781026
}
9791027
};
9801028

981-
var delim = instrument.startsWith('Novogene') ? '\t' : ',';
1029+
var delim = instrument.startsWith('Novogene') || instrument === 'MedGenome' ? '\t' : ',';
9821030
Ext4.Array.forEach(sortedRows, function (r) {
9831031
var totalCells = totalCellsByReadset[r.plateId];
9841032

@@ -994,7 +1042,7 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
9941042
}, this);
9951043

9961044
//add missing barcodes:
997-
if (includeBlanks && !instrument.startsWith('Novogene')) {
1045+
if (includeBlanks && !instrument.startsWith('Novogene') && !instrument.startsWith('MedGenome')) {
9981046
var blankIdx = 0;
9991047
Ext4.Array.forEach(SingleCell.panel.LibraryExportPanel.TENX_BARCODES, function (barcode5) {
10001048
if (barcodeCombosUsed.indexOf(barcode5) === -1) {
@@ -1007,6 +1055,13 @@ Ext4.define('SingleCell.panel.LibraryExportPanel', {
10071055
}
10081056
}, this);
10091057
}
1058+
1059+
if (instrument === 'MedGenome') {
1060+
console.log(rows)
1061+
Ext4.Array.forEach(rows, function(r, idx){
1062+
rows[idx] = (idx + 1) + '\t' + r;
1063+
}, this);
1064+
}
10101065
}
10111066

10121067
//check for unique barcodes

0 commit comments

Comments
 (0)