Skip to content

Commit 5347a9b

Browse files
authored
Merge pull request #224 from LabKey/fb_merge_23.3_to_develop
Merge discvr-23.3 to develop
2 parents 4ee2f52 + 017adb3 commit 5347a9b

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/AlignmentMetricsHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
8383
RecordedAction action = new RecordedAction(getName());
8484
action.setStartTime(new Date());
8585

86-
Integer windowSize = params.has("windowSize") && params.get("windowSize") != null ? Integer.valueOf(params.getInt("windowSize")) : null;
86+
Integer windowSize = params.has("windowSize") && !params.isNull("windowSize") ? Integer.valueOf(params.getInt("windowSize")) : null;
8787
if (windowSize == null)
8888
{
8989
job.error("No window size provided, aborting");

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/GenotypeGVCFHandler.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ else if (genomeIds.isEmpty())
202202
throw new PipelineJobException("No genome ID found for inputs");
203203
}
204204

205-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.forceSitesFile") != null)
205+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.forceSitesFile"))
206206
{
207207
int dataId = ctx.getParams().getInt("variantCalling.GenotypeGVCFs.forceSitesFile");
208208
ExpData data = ExperimentService.get().getExpData(dataId);
@@ -215,7 +215,7 @@ else if (genomeIds.isEmpty())
215215
ctx.getSequenceSupport().cacheExpData(data);
216216
}
217217

218-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.exclude_intervals") != null)
218+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.exclude_intervals"))
219219
{
220220
int dataId = ctx.getParams().getInt("variantCalling.GenotypeGVCFs.exclude_intervals");
221221
ExpData data = ExperimentService.get().getExpData(dataId);
@@ -306,7 +306,7 @@ public void processFilesOnWebserver(PipelineJob job, SequenceAnalysisJobSupport
306306

307307
private String getBasename(JobContext ctx)
308308
{
309-
String basename = ctx.getParams().get("variantCalling.GenotypeGVCFs.fileBaseName") != null ? ctx.getParams().getString("variantCalling.GenotypeGVCFs.fileBaseName") : "CombinedGenotypes";
309+
String basename = !ctx.getParams().isNull("variantCalling.GenotypeGVCFs.fileBaseName") ? ctx.getParams().getString("variantCalling.GenotypeGVCFs.fileBaseName") : "CombinedGenotypes";
310310
basename = basename.replaceAll(".vcf.gz$", "");
311311
basename = basename.replaceAll(".vcf$", "");
312312

@@ -363,7 +363,7 @@ private File runGenotypeGVCFs(PipelineJob job, JobContext ctx, ProcessVariantsHa
363363
}
364364

365365
File forceCallSitesFile = null;
366-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.forceSitesFile") != null)
366+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.forceSitesFile"))
367367
{
368368
forceCallSitesFile = ctx.getSequenceSupport().getCachedData(ctx.getParams().getInt("variantCalling.GenotypeGVCFs.forceSitesFile"));
369369
if (!forceCallSitesFile.exists())
@@ -375,7 +375,7 @@ private File runGenotypeGVCFs(PipelineJob job, JobContext ctx, ProcessVariantsHa
375375
}
376376

377377
int maxSamplesPerWorkspace = 500;
378-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.maxSamplesPerWorkspace") != null)
378+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.maxSamplesPerWorkspace"))
379379
{
380380
maxSamplesPerWorkspace = ctx.getParams().getInt("variantCalling.GenotypeGVCFs.maxSamplesPerWorkspace");
381381
}
@@ -629,7 +629,7 @@ private void processOneInput(JobContext ctx, PipelineJob job, ReferenceGenome ge
629629

630630
GenotypeGVCFsWrapper wrapper = new GenotypeGVCFsWrapper(job.getLogger());
631631
List<String> toolParams = new ArrayList<>();
632-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.stand_call_conf") != null)
632+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.stand_call_conf"))
633633
{
634634
toolParams.add("-stand-call-conf");
635635
toolParams.add(ctx.getParams().get("variantCalling.GenotypeGVCFs.stand_call_conf").toString());
@@ -642,13 +642,13 @@ private void processOneInput(JobContext ctx, PipelineJob job, ReferenceGenome ge
642642
toolParams.add("-AX");
643643
toolParams.add("ExcessHet");
644644

645-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.maxGenotypeCount") != null)
645+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.maxGenotypeCount"))
646646
{
647647
toolParams.add("-max-genotype-count");
648648
toolParams.add(String.valueOf(ctx.getParams().get("variantCalling.GenotypeGVCFs.maxGenotypeCount")));
649649
}
650650

651-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.exclude_intervals") != null)
651+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.exclude_intervals"))
652652
{
653653
toolParams.add("-XL");
654654
int dataId = Integer.parseInt(ctx.getParams().get("variantCalling.GenotypeGVCFs.exclude_intervals").toString());
@@ -663,7 +663,7 @@ private void processOneInput(JobContext ctx, PipelineJob job, ReferenceGenome ge
663663
toolParams.add(bed.getPath());
664664
}
665665

666-
if (ctx.getParams().get("variantCalling.GenotypeGVCFs.max_alternate_alleles") != null)
666+
if (!ctx.getParams().isNull("variantCalling.GenotypeGVCFs.max_alternate_alleles"))
667667
{
668668
toolParams.add("--max-alternate-alleles");
669669
toolParams.add(ctx.getParams().get("variantCalling.GenotypeGVCFs.max_alternate_alleles").toString());

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/UnmappedSequenceBasedGenotypeHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
232232
}
233233

234234
int minAlignmentLength = 0;
235-
if (params.get("minAlignmentLength") != null)
235+
if (!params.isNull("minAlignmentLength"))
236236
{
237237
minAlignmentLength = params.getInt("minAlignmentLength");
238238
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public Map<String, String> getParameters()
257257

258258
for (String key : json.keySet())
259259
{
260-
ret.put(key, json.opt(key) == null ? null : String.valueOf(json.get(key)));
260+
ret.put(key, json.isNull(key) ? null : String.valueOf(json.get(key)));
261261
}
262262

263263
return ret;

blast/src/org/labkey/blast/model/BlastJob.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public void setParams(String params)
112112
}
113113
catch (JSONException e)
114114
{
115-
_log.error("Unable to parse BlastJob config for: " + _objectid + " in container: " + ContainerManager.getForId(_container).getPath() + ", was: " + _params);
115+
String containerPath = getContainer() == null || ContainerManager.getForId(getContainer()) == null ? "<MISSING: " + getContainer() + ">" : ContainerManager.getForId(getContainer()).getPath();
116+
_log.error("Unable to parse BlastJob config for: " + _objectid + " in container: " + containerPath + ", was: " + _params);
116117
}
117118
}
118119

@@ -249,7 +250,7 @@ public File getOutputDir()
249250
throw new UnsupportedOperationException("this can only be called from the webserver");
250251
}
251252

252-
Container c = ContainerManager.getForId(_container);
253+
Container c = ContainerManager.getForId(getContainer());
253254
if (c == null)
254255
{
255256
return null;

0 commit comments

Comments
 (0)