Skip to content

Commit dbdca95

Browse files
authored
Merge pull request #397 from LabKey/fb_merge_25.7_to_develop
Merge 25.7 to develop
2 parents d8db0dd + d98b42f commit dbdca95

File tree

49 files changed

+1052
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1052
-424
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}" >> $GITHUB_ENV
3232
id: default-branch
3333

34+
# Note: use slight delay in case there are associated commits across repos
35+
- name: "Sleep for 30 seconds"
36+
run: sleep 30s
37+
shell: bash
38+
3439
- name: "Build DISCVR"
3540
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
3641
with:

SequenceAnalysis/pipeline_code/extra_tools_install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,11 @@ then
325325
echo "Cleaning up previous installs"
326326
rm -Rf $LKTOOLS_DIR/sawfish*
327327

328-
wget https://github.com/PacificBiosciences/sawfish/releases/download/v2.0.0/sawfish-v2.0.0-x86_64-unknown-linux-gnu.tar.gz
329-
tar -xzf sawfish-v2.0.0-x86_64-unknown-linux-gnu.tar.gz
328+
wget https://github.com/PacificBiosciences/sawfish/releases/download/v2.2.0/sawfish-v2.2.0-x86_64-unknown-linux-gnu.tar.gz
329+
tar -xzf sawfish-v2.2.0-x86_64-unknown-linux-gnu.tar.gz
330330

331-
mv sawfish-v2.0.0-x86_64-unknown-linux-gnu $LKTOOLS_DIR/
332-
ln -s $LKTOOLS_DIR/sawfish-v2.0.0/bin/sawfish $LKTOOLS_DIR/
331+
mv sawfish-v2.2.0-x86_64-unknown-linux-gnu $LKTOOLS_DIR/
332+
ln -s $LKTOOLS_DIR/sawfish-v2.2.0-x86_64-unknown-linux-gnu/bin/sawfish $LKTOOLS_DIR/
333333
else
334334
echo "Already installed"
335335
fi
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
/*
2-
* Copyright (c) 2012 LabKey Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5-
*/
1+
var LABKEY = require("labkey");
2+
3+
var triggerHelper = new org.labkey.sequenceanalysis.query.SequenceTriggerHelper(LABKEY.Security.currentUser.id, LABKEY.Security.currentContainer.id);
64

75
function beforeDelete(row, errors){
86
if (!this.extraContext.deleteFromServer){
97
errors._form = 'You cannot directly delete readsets. To delete these records, use the delete button above the readset grid.';
108
}
9+
}
10+
11+
function afterInsert(row, errors) {
12+
if (row.sraAccessions) {
13+
triggerHelper.createReaddataForSra(row.rowid, row.sraAccessions);
14+
}
1115
}

SequenceAnalysis/resources/queries/sequenceanalysis/sequence_readsets/Assigned to Run Lacking Data.qview.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<customView xmlns="http://labkey.org/data/xml/queryCustomView" canOverride="true">
22
<sorts>
3-
<sort column="name" descending="true"/>
3+
<sort column="instrument_run_id/name" descending="false"/>
44
</sorts>
55
<filters>
66
<filter column="totalFiles" operator="eq" value="0"/>

SequenceAnalysis/resources/web/SequenceAnalysis/panel/SequenceImportPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ Ext4.define('SequenceAnalysis.panel.SequenceImportPanel', {
24362436
},{
24372437
xtype: 'textfield',
24382438
fieldLabel: 'Delimiter',
2439-
value: '_',
2439+
value: '[_-]',
24402440
itemId: 'delimiter'
24412441
}],
24422442
buttons: [{
@@ -2455,7 +2455,7 @@ Ext4.define('SequenceAnalysis.panel.SequenceImportPanel', {
24552455
if (prefix) {
24562456
fg = fg.replace(new RegExp('^' + prefix), '');
24572457
}
2458-
fg = fg.split(delim);
2458+
fg = fg.split(RegExp(delim));
24592459
var id = fg[0];
24602460
if (Ext4.isNumeric(id)) {
24612461
r.set('readset', id);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public static class Factory extends AbstractSequenceTaskFactory<Factory>
4444
public Factory()
4545
{
4646
super(AlignmentInitTask.class);
47+
setLocation("webserver-high-priority");
4748
setJoin(true);
4849
}
4950

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ public RecordedActionSet run() throws PipelineJobException
165165
libraryMembers = new TableSelector(libraryMembersTable, new SimpleFilter(FieldKey.fromString("library_id"), getPipelineJob().getLibraryId()), new Sort("ref_nt_id/name")).getArrayList(ReferenceLibraryMember.class);
166166
}
167167

168+
if (libraryMembers == null)
169+
{
170+
throw new PipelineJobException("There are no sequences in the library: " + getPipelineJob().getLibraryId());
171+
}
172+
168173
getJob().getLogger().info("there are " + libraryMembers.size() + " sequences to process");
169174

170175
//make sure sequence names are unique

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

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,10 @@ else if (TaskFileManager.InputFileTreatment.compress == inputFileTreatment)
430430
moveInputToAnalysisDir(compressed, job, actions, unalteredInputs, outputFiles);
431431
}
432432
}
433+
else
434+
{
435+
job.getLogger().debug("Input file does not exist, may have already been moved: " + input.getPath());
436+
}
433437
}
434438
}
435439
else
@@ -450,23 +454,40 @@ private static void moveInputToAnalysisDir(File input, SequenceJob job, Collecti
450454
File outputDir = job.getAnalysisDirectory();
451455
File output = new File(outputDir, input.getName());
452456
job.getLogger().debug("Destination: " + output.getPath());
457+
boolean alreadyMoved = false;
453458
if (output.exists())
454459
{
460+
job.getLogger().debug("output already exists");
455461
if (unalteredInputs != null && unalteredInputs.contains(output))
456462
{
457463
job.getLogger().debug("\tThis input was unaltered during normalization and a copy already exists in the analysis folder so the original will be discarded");
458464
input.delete();
459-
TaskFileManagerImpl.swapFilesInRecordedActions(job.getLogger(), input, output, actions, job, null);
460-
return;
465+
alreadyMoved = true;
461466
}
462467
else
463468
{
464-
output = new File(outputDir, FileUtil.getBaseName(input.getName()) + ".orig.gz");
465-
job.getLogger().debug("\tA file with the expected output name already exists, so the original will be renamed: " + output.getPath());
469+
if (input.length() == output.length() && input.lastModified() == output.lastModified())
470+
{
471+
job.getLogger().info("Output exists, but has the same size/modified timestamp. Deleting original");
472+
input.delete();
473+
alreadyMoved = true;
474+
}
475+
else if (input.exists() && input.length() > output.length() && input.lastModified() == output.lastModified())
476+
{
477+
job.getLogger().info("Output exists with same timestamp, but with smaller file size. This probably indicates a truncated/failed copy. Deleting this file.");
478+
output.delete();
479+
}
480+
else
481+
{
482+
throw new PipelineJobException("A file with the expected output name already exists: " + output.getPath());
483+
}
466484
}
467485
}
468486

469-
FileUtils.moveFile(input, output);
487+
if (!alreadyMoved)
488+
{
489+
FileUtils.moveFile(input, output);
490+
}
470491
if (!output.exists())
471492
{
472493
throw new PipelineJobException("Unable to move file: " + input.getPath());
@@ -488,7 +509,7 @@ private static void moveInputToAnalysisDir(File input, SequenceJob job, Collecti
488509

489510
TaskFileManagerImpl.swapFilesInRecordedActions(job.getLogger(), input, output, actions, job, null);
490511
}
491-
catch (IOException e)
512+
catch (Exception e)
492513
{
493514
throw new PipelineJobException(e);
494515
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static class Factory extends AbstractTaskFactory<AbstractTaskFactorySetti
3535
public Factory()
3636
{
3737
super(SequenceOutputHandlerInitTask.class);
38-
setLocation("webserver");
38+
setLocation("webserver-high-priority");
3939
}
4040

4141
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static class Factory extends AbstractTaskFactory<AbstractTaskFactorySetti
3535
public Factory()
3636
{
3737
super(SequenceReadsetHandlerInitTask.class);
38-
setLocation("webserver");
38+
setLocation("webserver-high-priority");
3939
}
4040

4141
@Override

0 commit comments

Comments
 (0)