Skip to content

Commit 3507a86

Browse files
authored
Nextflow integration with pipeline (#453)
1 parent ea0dbc9 commit 3507a86

11 files changed

Lines changed: 763 additions & 0 deletions

File tree

nextflow/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import org.labkey.gradle.util.BuildUtils
2+
3+
plugins {
4+
id 'org.labkey.build.module'
5+
}
6+
7+
dependencies {
8+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: BuildUtils.getPlatformModuleProjectPath(project.gradle, "pipeline"), depProjectConfig: "published", depExtension: "module")
9+
}
10+

nextflow/module.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ModuleClass: org.labkey.nextflow.NextFlowModule
2+
Label: NextFlow module
3+
Description: This module provides the functionality \
4+
for running the NextFlow pipeline jobs on PanoramaWeb.
5+
License: Apache 2.0
6+
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
7+
SupportedDatabases: pgsql
8+
ManageVersion: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<button id="enable-button">Enable/Disable Nextflow</button>
3+
<button id="run-button">Nextflow Pipeline</button>
4+
</html>
5+
6+
<script type = "text/javascript" nonce="<%=scriptNonce%>">
7+
8+
$(document).ready(function() {
9+
$('#enable-button').click(function() {
10+
window.location = LABKEY.ActionURL.buildURL('nextflow', 'nextFlowEnable.view');
11+
});
12+
13+
$('#run-button').click(function() {
14+
window.location = LABKEY.ActionURL.buildURL('nextflow', 'nextFlowRun.api');
15+
});
16+
})
17+
</script>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<table>
2+
<tr>
3+
<td class="labkey-form-label">NextFlow Config File Path</td>
4+
<td><input type="text" name="nextFlowConfigFilePath" size=64></td>
5+
</tr>
6+
<tr>
7+
<td class="labkey-form-label">AWS Account Name</td>
8+
<td><input type="text" name="name" size=64></td>
9+
</tr>
10+
<tr>
11+
<td class="labkey-form-label">AWS Identity</td>
12+
<td><input type="text" name="identity" size=64></td>
13+
</tr>
14+
<tr>
15+
<td class="labkey-form-label">AWS S3 Bucket Path</td>
16+
<td><input type="text" name="s3BucketPath" size=64></td>
17+
</tr>
18+
<tr>
19+
<td class="labkey-form-label">AWS Credential</td>
20+
<td><input type="password" name="credential" size=64></td>
21+
</tr>
22+
</table>
23+
<button id="submit-button">Submit</button>
24+
<button id="delete-button">Delete</button>
25+
<button id="cancel-button">Cancel</button>
26+
27+
<script type="text/javascript" nonce="<%=scriptNonce%>">
28+
$(document).ready(function() {
29+
// load the current configuration on page load
30+
LABKEY.Ajax.request({
31+
url: LABKEY.ActionURL.buildURL('nextflow', 'GetNextFlowConfiguration.api'),
32+
method: 'GET',
33+
success: function(response) {
34+
const parsed = JSON.parse(response.responseText);
35+
if (parsed.config) {
36+
const response = parsed.config;
37+
$('input[name=nextFlowConfigFilePath]').val(response.nextFlowConfigFilePath);
38+
$('input[name=name]').val(response.accountName);
39+
$('input[name=identity]').val(response.identity);
40+
$('input[name=s3BucketPath]').val(response.s3BucketPath);
41+
$('input[name=credential]').val(response.credential);
42+
}
43+
44+
},
45+
failure: function(response) {
46+
alert('Failed to load configuration');
47+
}
48+
});
49+
50+
$('#submit-button').click(function() {
51+
let data = {
52+
nextFlowConfigFilePath: $('input[name=nextFlowConfigFilePath]').val(),
53+
accountName: $('input[name=name]').val(),
54+
identity: $('input[name=identity]').val(),
55+
s3BucketPath: $('input[name=s3BucketPath]').val(),
56+
credential: $('input[name=credential]').val()
57+
};
58+
LABKEY.Ajax.request({
59+
url: LABKEY.ActionURL.buildURL('nextflow', 'nextFlowConfiguration.api'),
60+
method: 'POST',
61+
params: data,
62+
success: function(response) {
63+
window.location = LABKEY.ActionURL.buildURL('project', 'start');
64+
},
65+
failure: function(response) {
66+
alert('Failed to save configuration');
67+
}
68+
});
69+
});
70+
71+
$('#delete-button').click(function() {
72+
LABKEY.Ajax.request({
73+
url: LABKEY.ActionURL.buildURL('nextflow', 'DeleteNextFlowConfiguration.api'),
74+
method: 'POST',
75+
success: function(response) {
76+
window.location = LABKEY.ActionURL.buildURL('project', 'start');
77+
},
78+
failure: function(response) {
79+
alert('Failed to delete configuration');
80+
}
81+
});
82+
});
83+
84+
$('#cancel-button').click(function() {
85+
window.location = LABKEY.ActionURL.buildURL('project', 'start');
86+
});
87+
});
88+
</script>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<view xmlns="http://labkey.org/data/xml/view" title="NextFlow Configuration">
2+
<dependencies>
3+
<dependency path="internal/jQuery"/>
4+
</dependencies>
5+
</view>

0 commit comments

Comments
 (0)