Skip to content

Commit 29677e9

Browse files
authored
Merge pull request #235 from LabKey/fb_merge_24.11_to_develop
Merge discvr-24.11 to develop
2 parents f66999d + eb7411e commit 29677e9

File tree

7 files changed

+60
-51
lines changed

7 files changed

+60
-51
lines changed

mGAP/resources/views/mgapDataDashboard.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
header: 'Upcoming Release',
2424
items: [{
2525
name: 'Release Instructions',
26-
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
27-
schemaName: 'wiki',
28-
queryName: 'page',
26+
url: LABKEY.ActionURL.buildURL('wiki', 'page.view', null, {
2927
name: 'mgapRelease'
3028
})
3129
},{
@@ -108,14 +106,26 @@
108106
},{
109107
header: 'Data and Processing',
110108
items: [{
111-
name: 'Readsets Without Alignments',
109+
name: 'WGS/WXS Readsets Without BAM/CRAM',
110+
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
111+
schemaName: 'sequenceanalysis',
112+
queryName: 'sequence_readsets',
113+
'query.outputFileTypes~doesnotcontain': 'Alignment',
114+
'query.totalForwardReads~isnonblank': null,
115+
'query.application~in' :'Whole Exome;Whole Genome: Deep Coverage',
116+
'query.status~isblank': null,
117+
'query.sort': 'name',
118+
'query.maxRows': 250
119+
})
120+
},{
121+
name: 'WGS/WXS Readsets Without A gVCF File',
112122
url: LABKEY.ActionURL.buildURL('query', 'executeQuery.view', null, {
113123
schemaName: 'sequenceanalysis',
114124
queryName: 'sequence_readsets',
115-
'query.totalAlignments~eq': 0,
125+
'query.outputFileTypes~doesnotcontain': 'gVCF File',
116126
'query.totalForwardReads~isnonblank': null,
127+
'query.application~in' :'Whole Exome;Whole Genome: Deep Coverage',
117128
'query.status~isblank': null,
118-
'query.isArchived~eq': 0,
119129
'query.sort': 'name',
120130
'query.maxRows': 250
121131
})

mGAP/resources/web/mGAP/window/ReleaseWindow.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Ext4.define('mGAP.window.ReleaseWindow', {
1818
Ext4.Msg.hide();
1919
var outputFiles = [];
2020
var distinctGenomesBySpecies = {};
21+
var distinctGenomes = [];
2122
Ext4.Array.forEach(results.rows, function(r){
2223
if (!r.vcfId) {
2324
Ext4.Msg.alert('Error', 'Track lacks VCF ID: ' + r.trackName);
@@ -34,20 +35,29 @@ Ext4.define('mGAP.window.ReleaseWindow', {
3435
distinctGenomesBySpecies[r.species] = distinctGenomesBySpecies[r.species] || [];
3536
if (r['vcfId/library_id']) {
3637
distinctGenomesBySpecies[r.species].push(r['vcfId/library_id']);
38+
distinctGenomes.push(r['vcfId/library_id']);
3739
}
3840
}, this);
3941

42+
distinctGenomes = Ext4.unique(distinctGenomes)
43+
4044
if (!outputFiles.length){
4145
Ext4.Msg.alert('Error', 'None of the tracks have VCF files');
4246
return;
4347
}
4448

45-
for (sn in Ext4.Object.getKeys(distinctGenomesBySpecies)) {
49+
var hadError = false;
50+
Ext4.Array.forEach(Ext4.Object.getKeys(distinctGenomesBySpecies), function(sn) {
4651
var genomes = Ext4.Array.unique(distinctGenomesBySpecies[sn]);
4752
if (genomes.length !== 1){
4853
Ext4.Msg.alert('Error', 'All files must use the same genome. Genomes found for species ' + sn + ': ' + genomes.length);
49-
return;
54+
hadError = true;
55+
return false;
5056
}
57+
}, this);
58+
59+
if (hadError) {
60+
return;
5161
}
5262

5363
LABKEY.Ajax.request({

mGAP/src/org/labkey/mgap/pipeline/GenerateMgapTracksStep.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ private Map<String, File> processTracks(VariantProcessingStepOutputImpl output,
456456
List<String> options = new ArrayList<>();
457457
options.add("--remove-unused-alternates");
458458

459+
options.add("--recalculate-ac");
460+
options.add("--keep-original-ac");
461+
options.add("--original-ac-suffix");
462+
options.add(".mGAP");
463+
459464
options.add("--sample-mapping-file");
460465
options.add(sampleFile.getPath());
461466

mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public class mGapReleaseGenerator extends AbstractParameterizedOutputHandler<Seq
101101
public mGapReleaseGenerator()
102102
{
103103
super(ModuleLoader.getInstance().getModule(mGAPModule.class), "Create mGAP Release", "This will prepare an input VCF for use as an mGAP public release. This will optionally include: removing excess annotations and program records, limiting to SNVs (optional) and removing genotype data (optional). If genotypes are retained, the subject names will be checked for mGAP aliases and replaced as needed.", new LinkedHashSet<>(PageFlowUtil.set("sequenceanalysis/field/GenomeFileSelectorField.js")), Arrays.asList(
104-
ToolParameterDescriptor.create("species", "Version", "The species, which is used to filter tracks", "ldk-simplelabkeycombo", new JSONObject(){{
104+
ToolParameterDescriptor.create("species", "Species", "The species, which is used to filter tracks", "ldk-simplelabkeycombo", new JSONObject(){{
105105
put("allowBlank", false);
106106
put("doNotIncludeInTemplates", true);
107107
put("width", 400);
@@ -1048,7 +1048,7 @@ private void checkVcfAnnotationsAndSamples(File vcfInput, boolean skipAnnotation
10481048

10491049
if (!nonCompliant.isEmpty())
10501050
{
1051-
throw new PipelineJobException("Names do not conform to format: " + StringUtils.join(nonCompliant, ","));
1051+
throw new PipelineJobException("Names do not conform to format: " + StringUtils.join(nonCompliant, ",") + ", in file: " + vcfInput.getName());
10521052
}
10531053
}
10541054

mcc/src/org/labkey/mcc/etl/PopulateIdsStep.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,34 @@ public RecordedActionSet run(@NotNull PipelineJob job) throws PipelineJobExcepti
4343
populateForDemographics(job);
4444
populateForKinship(job);
4545

46+
// Check for duplicate IDs and proactively error:
47+
performDuplicateCheck(job);
48+
4649
return new RecordedActionSet();
4750
}
4851

52+
private void performDuplicateCheck(PipelineJob job) throws PipelineJobException
53+
{
54+
// Query aggregated demographics:
55+
UserSchema sourceSchema = QueryService.get().getUserSchema(_containerUser.getUser(), _containerUser.getContainer(), MccSchema.NAME);
56+
if (sourceSchema == null)
57+
{
58+
throw new PipelineJobException("Unable to find source schema: " + MccSchema.NAME);
59+
}
60+
61+
TableInfo sourceTi = sourceSchema.getTable("duplicatedAggregatedDemographics");
62+
if (sourceTi == null)
63+
{
64+
throw new PipelineJobException("Unable to find table: duplicatedAggregatedDemographics");
65+
}
66+
67+
TableSelector ts = new TableSelector(sourceTi);
68+
if (ts.exists())
69+
{
70+
throw new PipelineJobException("There were duplicated IDs in aggregatedDemographics");
71+
}
72+
}
73+
4974
private void populateForDemographics(PipelineJob job) throws PipelineJobException
5075
{
5176
// Query aggregated demographics:

primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public List<ToolParameterDescriptor> getParams()
3939
put("minValue", 512);
4040
}}, 1028),
4141
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),
42-
ToolParameterDescriptor.create("useLustre", "Use Old Lustre Working Space", "If selected, this job will use the older Lustre working space.", "checkbox", null, null),
43-
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),
4442
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)
4543
);
4644
}

primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng
310310
possiblyAddSSD(job, engine, lines);
311311
possiblyAddGpus(job, engine, lines);
312312
possiblyAddExclusive(job, engine, lines);
313-
possiblyAddInfiniband(job, engine, lines);
314313
}
315314
}
316315

@@ -319,11 +318,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng
319318
{
320319
Map<String, Object> ret = new HashMap<>();
321320

322-
if (job instanceof HasJobParams && getUseLustreValue((HasJobParams)job))
323-
{
324-
job.getLogger().info("Requiring using original lustre as working space");
325-
ret.put("USE_LUSTRE", "1");
326-
}
327321

328322
return ret;
329323
}
@@ -482,39 +476,6 @@ private void possiblyAddSSD(PipelineJob job, RemoteExecutionEngine engine, List<
482476
}
483477
}
484478

485-
private void possiblyAddInfiniband(PipelineJob job, RemoteExecutionEngine engine, List<String> lines)
486-
{
487-
Map<String, String> params = ((HasJobParams)job).getJobParams();
488-
String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.requireInfiniband"));
489-
if (val == null)
490-
{
491-
return;
492-
}
493-
494-
boolean parsed = Boolean.parseBoolean(val);
495-
if (parsed)
496-
{
497-
job.getLogger().info("Requiring node with infiniband");
498-
String line = "#SBATCH -C IB";
499-
if (!lines.contains(line))
500-
{
501-
lines.add(line);
502-
}
503-
}
504-
}
505-
506-
private boolean getUseLustreValue(HasJobParams job)
507-
{
508-
Map<String, String> params = (job).getJobParams();
509-
String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.useLustre"));
510-
if (val == null)
511-
{
512-
return false;
513-
}
514-
515-
return Boolean.parseBoolean(val);
516-
}
517-
518479
private void possiblyAddQOS(PipelineJob job, RemoteExecutionEngine engine, List<String> lines)
519480
{
520481
//first remove existing

0 commit comments

Comments
 (0)