From 1dd37cab6bf69c6d5baa3bac8259b0076bdc9f2c Mon Sep 17 00:00:00 2001 From: bbimber Date: Sat, 1 Feb 2025 08:57:43 -0800 Subject: [PATCH] Small bugfixes to mGAP release --- mGAP/resources/views/mgapDataDashboard.html | 4 +- .../web/mGAP/window/ReleaseWindow.js | 14 ++++++- .../mgap/pipeline/mGapReleaseGenerator.java | 2 +- .../pipeline/ExacloudResourceSettings.java | 2 - .../SequenceJobResourceAllocator.java | 39 ------------------- 5 files changed, 14 insertions(+), 47 deletions(-) diff --git a/mGAP/resources/views/mgapDataDashboard.html b/mGAP/resources/views/mgapDataDashboard.html index 28a36355..71a53780 100644 --- a/mGAP/resources/views/mgapDataDashboard.html +++ b/mGAP/resources/views/mgapDataDashboard.html @@ -23,9 +23,7 @@ header: 'Upcoming Release', items: [{ name: 'Release Instructions', - url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, { - schemaName: 'wiki', - queryName: 'page', + url: LABKEY.ActionURL.buildURL('wiki', 'page.view', null, { name: 'mgapRelease' }) },{ diff --git a/mGAP/resources/web/mGAP/window/ReleaseWindow.js b/mGAP/resources/web/mGAP/window/ReleaseWindow.js index 51fe467b..78e7d65f 100644 --- a/mGAP/resources/web/mGAP/window/ReleaseWindow.js +++ b/mGAP/resources/web/mGAP/window/ReleaseWindow.js @@ -18,6 +18,7 @@ Ext4.define('mGAP.window.ReleaseWindow', { Ext4.Msg.hide(); var outputFiles = []; var distinctGenomesBySpecies = {}; + var distinctGenomes = []; Ext4.Array.forEach(results.rows, function(r){ if (!r.vcfId) { Ext4.Msg.alert('Error', 'Track lacks VCF ID: ' + r.trackName); @@ -34,20 +35,29 @@ Ext4.define('mGAP.window.ReleaseWindow', { distinctGenomesBySpecies[r.species] = distinctGenomesBySpecies[r.species] || []; if (r['vcfId/library_id']) { distinctGenomesBySpecies[r.species].push(r['vcfId/library_id']); + distinctGenomes.push(r['vcfId/library_id']); } }, this); + distinctGenomes = Ext4.unique(distinctGenomes) + if (!outputFiles.length){ Ext4.Msg.alert('Error', 'None of the tracks have VCF files'); return; } - for (sn in Ext4.Object.getKeys(distinctGenomesBySpecies)) { + var hadError = false; + Ext4.Array.forEach(Ext4.Object.getKeys(distinctGenomesBySpecies), function(sn) { var genomes = Ext4.Array.unique(distinctGenomesBySpecies[sn]); if (genomes.length !== 1){ Ext4.Msg.alert('Error', 'All files must use the same genome. Genomes found for species ' + sn + ': ' + genomes.length); - return; + hadError = true; + return false; } + }, this); + + if (hadError) { + return; } LABKEY.Ajax.request({ diff --git a/mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java b/mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java index 6a2ac50b..7307d30a 100644 --- a/mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java +++ b/mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java @@ -101,7 +101,7 @@ public class mGapReleaseGenerator extends AbstractParameterizedOutputHandler(PageFlowUtil.set("sequenceanalysis/field/GenomeFileSelectorField.js")), Arrays.asList( - ToolParameterDescriptor.create("species", "Version", "The species, which is used to filter tracks", "ldk-simplelabkeycombo", new JSONObject(){{ + ToolParameterDescriptor.create("species", "Species", "The species, which is used to filter tracks", "ldk-simplelabkeycombo", new JSONObject(){{ put("allowBlank", false); put("doNotIncludeInTemplates", true); put("width", 400); diff --git a/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java b/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java index 62972422..f00327a1 100644 --- a/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java +++ b/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java @@ -39,8 +39,6 @@ public List getParams() put("minValue", 512); }}, 1028), ToolParameterDescriptor.create("localSSD", "Request Nodes With SSD Scratch", "If selected, -C ssdscratch will be added to the submit script, which limits to node with faster SSD scratch space. This might be important for I/O intense jobs.", "checkbox", null, null), - ToolParameterDescriptor.create("useLustre", "Use Old Lustre Working Space", "If selected, this job will use the older Lustre working space.", "checkbox", null, null), - ToolParameterDescriptor.create("requireInfiniband", "Require InfiniBand", "If selected, this job will be flagged as -C IB to force the node to have InfiniBand.", "checkbox", null, null), ToolParameterDescriptor.create("gpus", "GPUs", "The number of GPUs requested for this job. If non-zero, the gpu partition will be used.", "ldk-integerfield", null, null) ); } diff --git a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java index be4ca8fc..34b7bbb7 100644 --- a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java +++ b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java @@ -310,7 +310,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng possiblyAddSSD(job, engine, lines); possiblyAddGpus(job, engine, lines); possiblyAddExclusive(job, engine, lines); - possiblyAddInfiniband(job, engine, lines); } } @@ -319,11 +318,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng { Map ret = new HashMap<>(); - if (job instanceof HasJobParams && getUseLustreValue((HasJobParams)job)) - { - job.getLogger().info("Requiring using original lustre as working space"); - ret.put("USE_LUSTRE", "1"); - } return ret; } @@ -482,39 +476,6 @@ private void possiblyAddSSD(PipelineJob job, RemoteExecutionEngine engine, List< } } - private void possiblyAddInfiniband(PipelineJob job, RemoteExecutionEngine engine, List lines) - { - Map params = ((HasJobParams)job).getJobParams(); - String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.requireInfiniband")); - if (val == null) - { - return; - } - - boolean parsed = Boolean.parseBoolean(val); - if (parsed) - { - job.getLogger().info("Requiring node with infiniband"); - String line = "#SBATCH -C IB"; - if (!lines.contains(line)) - { - lines.add(line); - } - } - } - - private boolean getUseLustreValue(HasJobParams job) - { - Map params = (job).getJobParams(); - String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.useLustre")); - if (val == null) - { - return false; - } - - return Boolean.parseBoolean(val); - } - private void possiblyAddQOS(PipelineJob job, RemoteExecutionEngine engine, List lines) { //first remove existing