Skip to content

Commit 4d8171b

Browse files
committed
Avoid NPE
1 parent 37b0a6e commit 4d8171b

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/SequenceAnalysisTask.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,14 @@ public RecordedActionSet run() throws PipelineJobException
207207
getJob().getLogger().warn("Duplicate BAM was: " + d.getFile().getPath());
208208
}
209209

210-
if (!d.getFile().exists())
210+
//NOTE: if the job was restarted, the BAM might have already been discarded:
211+
if (discardBam && !d.getFile().exists() && d.getFile().getPath().startsWith(getPipelineJob().getWebserverDir(false).getPath()))
212+
{
213+
// Set this value here so downstream steps work. It will be discarded next:
214+
analysisModel.setAlignmentFile(d.getRowId());
215+
found = true;
216+
}
217+
else if (!d.getFile().exists())
211218
{
212219
getJob().getLogger().warn("BAM registered as output does not exist: " + d.getFile().getPath());
213220
}

singlecell/resources/chunks/FindMarkers.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ for (datasetId in names(seuratObjects)) {
22
seuratObj <- seuratObjects[[datasetId]]
33
seuratObjects[[datasetId]] <- NULL
44

5-
dt <- CellMembrane::Find_Markers(seuratObj, identFields = identFields, outFile = paste0(datasetId, '.markers.txt'))
5+
outFile = paste0(datasetId, '.markers.txt')
6+
dt <- bindArgs(CellMembrane::Find_Markers, seuratObj)
67
print(dt)
78

89
# Cleanup

singlecell/src/org/labkey/singlecell/pipeline/singlecell/FindMarkers.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,17 @@ public Provider()
3434
put("multiSelect", true);
3535
put("allowBlank", false);
3636
put("storeValues", "wilcox;bimod;roc;t;negbinom;poisson;LR;MAST;DESeq2");
37-
put("initialValues", "wilcox;MAST");
37+
put("initialValues", "wilcox;MAST;DESeq2");
3838
put("delimiter", ";");
3939
put("joinReturnValue", true);
40-
}}, null)
41-
), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
40+
}}, null),
41+
SeuratToolParameter.create("pValThreshold", "pVal Threshold", "Only genes with adjusted p-values below this will be reported", "ldk-numberfield", new JSONObject(){{
42+
put("minValue", 0);
43+
}}, 0.001),
44+
SeuratToolParameter.create("foldChangeThreshold", "Log2 Fold-Change Threshold", "Only genes with log2-foldchange above this will be reported", "ldk-numberfield", new JSONObject(){{
45+
put("minValue", 0);
46+
}}, 0.05)
47+
), Arrays.asList("/sequenceanalysis/field/TrimmingTextArea.js"), null);
4248
}
4349

4450
@Override

0 commit comments

Comments
 (0)