Skip to content

Commit b7ec3ea

Browse files
authored
Merge pull request #93 from LabKey/fb_merge_discvr-20.11
Merge discvr-20.11 to develop
2 parents cc4f1e5 + df774e3 commit b7ec3ea

File tree

90 files changed

+3337
-4084
lines changed

Some content is hidden

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

90 files changed

+3337
-4084
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build DISCVR
22
on:
3+
workflow_dispatch:
34
push:
5+
branches:
6+
- !latest
47
pull_request:
58
jobs:
69
build-modules:

.github/workflows/build_latest.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Development Release
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 3 * * *'
6+
jobs:
7+
build-modules:
8+
# See: https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
9+
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
10+
if: github.repository == 'BimberLab/DiscvrLabKeyModules'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Find default branch"
14+
uses: octokit/request-action@v2.x
15+
id: get_default_branch
16+
with:
17+
route: GET /repos/${{ github.repository }}
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.PAT }}
20+
21+
- name: "Print default branch"
22+
run: "echo 'Default branch: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'"
23+
24+
- name: "Build DISCVR"
25+
if: github.ref == '/refs/heads/${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'
26+
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
27+
with:
28+
artifactory_user: ${{secrets.artifactory_user}}
29+
artifactory_password: ${{secrets.artifactory_password}}
30+
# NOTE: permissions are limited on the default secrets.GITHUB_TOKEN, including updating workflows, so use a personal access token
31+
github_token: ${{ secrets.PAT }}
32+
env:
33+
GENERATE_DIST: 1
34+
35+
# See: https://github.com/marketplace/actions/automatic-releases
36+
- name: Deploy Build
37+
if: github.ref == '/refs/heads/${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'
38+
uses: "marvinpinto/action-automatic-releases@latest"
39+
with:
40+
repo_token: "${{ secrets.PAT }}"
41+
automatic_release_tag: "latest"
42+
prerelease: true
43+
title: "DISCVR Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
44+
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Publish Release
22
on:
33
release:
44
types: [created]
5+
tags-ignore:
6+
- 'latest'
57
jobs:
68
generate:
79
name: Create release-artifacts
@@ -17,11 +19,13 @@ jobs:
1719
artifactory_password: ${{secrets.artifactory_password}}
1820
# NOTE: permissions are limited on the default secrets.GITHUB_TOKEN, including updating workflows, so use a personal access token
1921
github_token: ${{ secrets.PAT }}
22+
env:
23+
GENERATE_DIST: 1
2024

2125
- name: Upload Artifacts
2226
if: github.event_name == 'release' && github.event.action == 'created'
2327
uses: skx/github-action-publish-binaries@master
2428
env:
2529
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2630
with:
27-
args: /lkDist/discvr/DISCVR-*
31+
args: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/pipeline/AbstractResumer.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
abstract public class AbstractResumer implements Serializable
2727
{
2828
transient Logger _log;
29-
transient File _localWorkDir;
29+
transient File _webserverJobDir;
3030

3131
protected TaskFileManager _fileManager;
3232
protected LinkedHashSet<RecordedAction> _recordedActions = null;
@@ -41,9 +41,9 @@ protected AbstractResumer()
4141

4242
}
4343

44-
protected AbstractResumer(File localWorkDir, Logger log, TaskFileManager fileManager)
44+
protected AbstractResumer(File webserverJobDir, Logger log, TaskFileManager fileManager)
4545
{
46-
_localWorkDir = localWorkDir;
46+
_webserverJobDir = webserverJobDir;
4747
_log = log;
4848
_fileManager = fileManager;
4949
_recordedActions = new LinkedHashSet<>();
@@ -70,7 +70,7 @@ public static <RESUMER extends AbstractResumer> RESUMER readFromJson(File json,
7070

7171
protected void writeToJson() throws PipelineJobException
7272
{
73-
writeToJson(_localWorkDir);
73+
writeToJson(_webserverJobDir);
7474
}
7575

7676
abstract protected String getJsonName();
@@ -111,7 +111,7 @@ public void markComplete()
111111

112112
public void markComplete(boolean deleteFile)
113113
{
114-
File file = getSerializedJson(_localWorkDir, getJsonName());
114+
File file = getSerializedJson(_webserverJobDir, getJsonName());
115115
if (file.exists())
116116
{
117117
_log.info("closing job resumer");
@@ -157,14 +157,14 @@ public void setRecordedActions(LinkedHashSet<RecordedAction> recordedActions)
157157
_recordedActions = recordedActions;
158158
}
159159

160-
public File getLocalWorkDir()
160+
public File getWebserverJobDir()
161161
{
162-
return _localWorkDir;
162+
return _webserverJobDir;
163163
}
164164

165-
public void setLocalWorkDir(File localWorkDir)
165+
public void setWebserverJobDir(File webserverJobDir)
166166
{
167-
_localWorkDir = localWorkDir;
167+
_webserverJobDir = webserverJobDir;
168168
}
169169

170170
public Logger getLogger()
@@ -227,7 +227,7 @@ public static <T extends AbstractResumer> T create(SequenceOutputHandler.JobCont
227227
ret = readFromJson(json, clazz);
228228
ret.setResume(true);
229229
ret.setLogger(ctx.getLogger());
230-
ret.setLocalWorkDir(ctx.getWorkDir().getDir());
230+
ret.setWebserverJobDir(ctx.getSourceDirectory());
231231
ret.getFileManager().onResume(ctx.getJob(), ctx.getWorkDir());
232232

233233
ctx.getLogger().debug("FileManagers initially equal: " + ctx.getFileManager().equals(ret.getFileManager()));

SequenceAnalysis/resources/queries/sequenceanalysis/quality_metrics/.qview.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<column name="category" />
66
<column name="metricname" />
77
<column name="metricvalue" />
8-
<!--<column name="qualvalue" />-->
8+
<column name="qualvalue" />
99
<column name="readset" />
1010
<column name="analysis_id" />
1111
<column name="runid" />

SequenceAnalysis/resources/schemas/sequenceanalysis.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@
23782378
<column columnName="name"/>
23792379
<column columnName="description"/>
23802380
<column columnName="taskid">
2381-
<isHidden>true</isHidden>
2381+
<!--<isHidden>true</isHidden>-->
23822382
</column>
23832383
<column columnName="originalAnalysisId">
23842384
<columnTitle>Original Analysis</columnTitle>
@@ -2387,10 +2387,11 @@
23872387
<fkTable>sequence_analyses</fkTable>
23882388
<fkColumnName>rowid</fkColumnName>
23892389
</fk>
2390+
<isHidden>true</isHidden>
23902391
</column>
23912392
<column columnName="json">
23922393
<columnTitle>Config</columnTitle>
2393-
<isHidden>true</isHidden>
2394+
<!--<isHidden>true</isHidden>-->
23942395
</column>
23952396
<column columnName="container">
23962397
<isHidden>true</isHidden>

SequenceAnalysis/resources/web/SequenceAnalysis/panel/AlignmentAnalysisPanel.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ Ext4.define('SequenceAnalysis.panel.AlignmentAnalysisPanel', {
8080

8181
this.libraryIds = Ext4.unique(libraryIds);
8282

83-
this.down('#alignmentCount').update('Alignments to be analyzed: ' + store.getCount());
83+
var target = this.down('#alignmentCount');
84+
if (target) {
85+
target.update('Alignments to be analyzed: ' + store.getCount());
86+
}
8487
}
8588
}
8689
});

SequenceAnalysis/resources/web/SequenceAnalysis/panel/BaseSequencePanel.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
1111

1212
initComponent: function(){
1313
//NOTE: if we're in a workbook, default to serch against the parent, since it will include children by default
14-
this.queryContainer = LABKEY.Security.currentContainer.type == 'workbook' ? LABKEY.Security.currentContainer.parentId : LABKEY.Security.currentContainer.id;
15-
this.queryContainerPath = LABKEY.Security.currentContainer.type == 'workbook' ? LABKEY.Security.currentContainer.parentPath : LABKEY.Security.currentContainer.path;
14+
this.queryContainer = LABKEY.Security.currentContainer.type === 'workbook' ? LABKEY.Security.currentContainer.parentId : LABKEY.Security.currentContainer.id;
15+
this.queryContainerPath = LABKEY.Security.currentContainer.type === 'workbook' ? LABKEY.Security.currentContainer.parentPath : LABKEY.Security.currentContainer.path;
1616

1717
this.initFiles();
1818

@@ -330,6 +330,14 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
330330
sequencePanel: this
331331
}).show(btn);
332332
}
333+
},{
334+
xtype: 'ldk-linkbutton',
335+
text: 'Manage Saved Templates',
336+
linkCls: 'labkey-text-link',
337+
href: LABKEY.ActionURL.buildURL('query', 'executeQuery', Laboratory.Utils.getQueryContainerPath(), {schemaName: 'sequenceanalysis', 'query.queryName': 'saved_analyses', 'query.taskid~eq': this.jobType}),
338+
linkTarget: '_blank',
339+
visible: LABKEY.Security.currentUser.isAdmin,
340+
scope: this
333341
}]
334342
}
335343
},

SequenceAnalysis/resources/web/SequenceAnalysis/sequenceanalysisButtons.js

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,12 @@ SequenceAnalysis.Buttons = new function(){
2525

2626
params['query.'+(options.keyField ? options.keyField :'analysis_id')+'~in'] = checked.join(';');
2727

28-
changeLocation(LABKEY.ActionURL.buildURL(
28+
window.location = LABKEY.ActionURL.buildURL(
2929
'query',
3030
'executeQuery.view',
3131
dataRegion.containerPath,
3232
params
33-
));
34-
35-
function changeLocation(location){
36-
window.location = location;
37-
}
33+
);
3834
},
3935

4036
/**
@@ -138,22 +134,15 @@ SequenceAnalysis.Buttons = new function(){
138134

139135
params['query.run~in'] = runIds.join(';');
140136

141-
changeLocation(LABKEY.ActionURL.buildURL(
142-
'query',
143-
'executeQuery.view',
144-
dataRegion.containerPath,
145-
params
146-
));
147-
148-
137+
window.location = LABKEY.ActionURL.buildURL(
138+
'query',
139+
'executeQuery.view',
140+
dataRegion.containerPath,
141+
params
142+
);
149143
},
150144
failure: LDK.Utils.getErrorCallback()
151145
});
152-
153-
function changeLocation(location){
154-
window.location = location;
155-
}
156-
157146
},
158147

159148
viewSNPs: function(dataRegionName, options){

SequenceAnalysis/resources/web/SequenceAnalysis/window/OutputHandlerWindow.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Ext4.define('SequenceAnalysis.window.OutputHandlerWindow', {
7070
title: results.name,
7171
handlerConfig: results,
7272
toolParameters: results.toolParameters,
73-
libraryId: distinctGenomes.length == 1 ? distinctGenomes[0] : null
73+
libraryId: distinctGenomes.length === 1 ? distinctGenomes[0] : null
7474
}).show();
7575
}
7676
}
@@ -250,8 +250,8 @@ Ext4.define('SequenceAnalysis.window.OutputHandlerWindow', {
250250
return;
251251
}
252252

253-
//Note: use getFieldValues() to also include unchecked checkboxes
254-
var params = this.down('form').getForm().getFieldValues();
253+
//Note: include all to ensure we include unchecked checkboxes
254+
var params = this.down('form').getForm().getValues(false, false, false, false);
255255
var json = {
256256
handlerType: this.handlerType,
257257
handlerClass: this.handlerClass,

0 commit comments

Comments
 (0)