Skip to content

Commit

Permalink
analysis: improve nextflow parameter inputs, #TASK-6445
Browse files Browse the repository at this point in the history
  • Loading branch information
pfurio committed Sep 19, 2024
1 parent 37ce484 commit 8874a65
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,14 @@ protected void check() throws Exception {
} else {
cliParamsBuilder.append("--").append(entry.getKey()).append(" ");
}
if (inputFileUtils.isValidOpenCGAFile(entry.getValue())) {
File file = inputFileUtils.getOpenCGAFile(study, entry.getValue(), token);
inputBindings.add(new AbstractMap.SimpleEntry<>(file.getUri().getPath(), inputDir.resolve(file.getName()).toString()));
cliParamsBuilder.append(inputDir).append("/").append(file.getName()).append(" ");
} else {
cliParamsBuilder.append(entry.getValue()).append(" ");
if (StringUtils.isNotEmpty(entry.getValue())) {
if (inputFileUtils.isValidOpenCGAFile(entry.getValue())) {
File file = inputFileUtils.getOpenCGAFile(study, entry.getValue(), token);
inputBindings.add(new AbstractMap.SimpleEntry<>(file.getUri().getPath(), inputDir.resolve(file.getName()).toString()));
cliParamsBuilder.append(inputDir).append("/").append(file.getName()).append(" ");
} else {
cliParamsBuilder.append(entry.getValue()).append(" ");
}
}
}
this.cliParams = cliParamsBuilder.toString();
Expand Down Expand Up @@ -161,8 +163,9 @@ protected void run() throws Exception {
StringBuilder stringBuilder = new StringBuilder()
.append("bash -c \"nextflow -c ").append(inputDir).append("/nextflow.config").append(" run ");
if (workflow.getRepository() != null && StringUtils.isNotEmpty(workflow.getRepository().getImage())) {
stringBuilder.append(workflow.getRepository().getImage()).append(" -with-docker");
dockerParams.put("-v", "/var/run/docker.sock:/var/run/docker.sock");
// stringBuilder.append(workflow.getRepository().getImage()).append(" -with-docker");
stringBuilder.append(workflow.getRepository().getImage());
// dockerParams.put("-v", "/var/run/docker.sock:/var/run/docker.sock");
} else {
for (WorkflowScript script : workflow.getScripts()) {
if (script.isMain()) {
Expand Down

0 comments on commit 8874a65

Please sign in to comment.