Skip to content

Commit 4e17954

Browse files
committed
Add check to prevent STAR submission without GTF unless specifically chosen
1 parent 511eccc commit 4e17954

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/panel/AnalysisSectionPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
5050
var val = i.additionalExtConfig[prop];
5151
if (Ext4.isString(val) && val.match(/^js:/)){
5252
val = val.replace(/^js:/, '');
53-
val = eval(val);
53+
val = eval("false || " + val);
5454

5555
i.additionalExtConfig[prop] = val;
5656
}

SequenceAnalysis/resources/web/SequenceAnalysis/window/OutputHandlerWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Ext4.define('SequenceAnalysis.window.OutputHandlerWindow', {
161161
var val = i.additionalExtConfig[prop];
162162
if (Ext4.isString(val) && val.match(/^js:/)){
163163
val = val.replace(/^js:/, '');
164-
val = eval(val);
164+
val = eval("false || " + val);
165165

166166
i.additionalExtConfig[prop] = val;
167167
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ public AlignmentOutput performAlignment(Readset rs, File inputFastq1, @Nullable
213213
args.add("--quantMode");
214214
args.add("GeneCounts");
215215
}
216+
else
217+
{
218+
getPipelineCtx().getLogger().info("No GTF was provided, so gene counts will not be created");
219+
}
216220

217221
addThreadArgs(args);
218222
getWrapper().execute(args);
@@ -432,7 +436,11 @@ public Provider()
432436
put("extensions", Arrays.asList("gtf", "gff"));
433437
put("width", 400);
434438
put("allowBlank", true);
439+
put("getErrors", "js:function(){var errors = [];var val = this.getValue();var gtfField = this.up('panel').down('field[name=\"alignment.STAR.generateCounts\"]');if (gtfField && gtfField.getValue()) { errors.push('Must select a GTF when Generate Counts is selected') } return errors;}");
435440
}}, null),
441+
ToolParameterDescriptor.create("generateCounts", "Generate Counts", "There are rare cases when STAR is used without a GTF, so this field is not required. If that field is left blank, counts are not generated. Checking this field prevents job submission unless a GTF is provided. Uncheck to allow running without a GTF.", "checkbox", new JSONObject(){{
442+
put("checked", true);
443+
}}, false),
436444
ToolParameterDescriptor.create(LONG_READS, "Reads >500bp", "If the reads are expected to exceed 500bp (per pair), this will use STARlong instead of STAR.", "checkbox", new JSONObject(){{
437445
put("checked", false);
438446
}}, false),

0 commit comments

Comments
 (0)