Skip to content

Commit

Permalink
analysis: add the executor parameters and the docker command line to …
Browse files Browse the repository at this point in the history
…the JOB result file, #TASK-7064, #TASK-7049
  • Loading branch information
jtarraga committed Oct 7, 2024
1 parent 33c9f2f commit 2f2c96e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.opencb.opencga.analysis.wrappers.liftover;

import org.apache.commons.lang3.StringUtils;
import org.opencb.commons.datastore.core.Event;
import org.opencb.opencga.analysis.wrappers.executors.DockerWrapperAnalysisExecutor;
import org.opencb.opencga.core.common.GitRepositoryState;
import org.opencb.opencga.core.exceptions.ToolException;
Expand Down Expand Up @@ -46,6 +47,9 @@ public class LiftoverWrapperAnalysisExecutor extends DockerWrapperAnalysisExecut

@Override
protected void run() throws Exception {
// Add parameters
addParameters();

Path outPath = (StringUtils.isEmpty(vcfDest) ? getOutDir() : Paths.get(vcfDest));

int numFails = 0;
Expand Down Expand Up @@ -90,6 +94,7 @@ private void runLiftover(File file, Path outPath) throws ToolExecutorException {
String dockerImage = "opencb/opencga-ext-tools:" + GitRepositoryState.getInstance().getBuildVersion();

String dockerCli = buildCommandLine(dockerImage, inputBindings, outputBinding, params, null);
addEvent(Event.Type.INFO, "Docker command line: " + dockerCli);
logger.info("Docker command line: {}", dockerCli);
runCommandLine(dockerCli);

Expand Down Expand Up @@ -119,6 +124,14 @@ private void runLiftover(File file, Path outPath) throws ToolExecutorException {
}
}

private void addParameters() throws ToolException {
addParam("liftoverPath", liftoverPath);
addParam("files", files);
addParam("targetAssembly", targetAssembly);
addParam("vcfDest", vcfDest);
addParam("resourcePath", resourcePath);
}

public String getStudy() {
return study;
}
Expand Down

0 comments on commit 2f2c96e

Please sign in to comment.