test_class.declarator: tmpFolder
test_class.modifier: private
test_class.original_string: private Path tmpFolder;
test_class.type: Path
test_class.var_name: tmpFolder
test_class.declarator: toolPath
test_class.modifier: private
test_class.original_string: private Path toolPath;
test_class.type: Path
test_class.var_name: toolPath
test_class.file: hpg-bigdata-analysis/src/test/java/org/opencb/hpg/bigdata/analysis/tools/ToolManagerTest.java
test_class.identifier: ToolManagerTest
test_case.body: @Test
      public void testToolManager() throws URISyntaxException, AnalysisToolException, IOException {
          Path testBam = Paths.get(getClass().getResource("/test.bam").toURI());
  
          ToolManager toolManager = new ToolManager(toolPath);
          Map<String, String> params = new HashMap<>();
          params.put("input", testBam.toAbsolutePath().toString());
          params.put("output", tmpFolder.resolve("test.bam.bai").toString());
  
          String commandLine = toolManager.createCommandLine("samtools", "index", params);
          System.out.println(commandLine);
          Executor.execute(commandLine, tmpFolder, true);
  
          ObjectReader reader = new ObjectMapper().reader(Status.class);
          Status status = reader.readValue(tmpFolder.resolve("status.json").toFile());
          assertEquals(Status.DONE, status.getName());
  
          assertTrue(tmpFolder.resolve("test.bam.bai").toFile().exists());
      }
test_case.class_method_signature: ToolManagerTest.testToolManager()
test_case.full_signature: @Test public void testToolManager()
test_case.identifier: testToolManager
test_case.invocations: get toURI getResource getClass put toString toAbsolutePath put toString resolve createCommandLine println execute reader readValue toFile resolve assertEquals getName assertTrue exists toFile resolve
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToolManager()
focal_class.declarator: toolDirectory
focal_class.modifier: private
focal_class.original_string: private Path toolDirectory;
focal_class.type: Path
focal_class.var_name: toolDirectory
focal_class.declarator: tools
focal_class.modifier: private
focal_class.original_string: private Map<String, Manifest> tools;
focal_class.type: Map<String, Manifest>
focal_class.var_name: tools
focal_class.declarator: logger
focal_class.modifier: private
focal_class.original_string: private Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: MANIFEST_FILE = "manifest.json"
focal_class.modifier: private final
focal_class.original_string: private final String MANIFEST_FILE = "manifest.json";
focal_class.type: String
focal_class.var_name: MANIFEST_FILE
focal_class.file: hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/ToolManager.java
focal_class.identifier: ToolManager
focal_class.class_method_signature: ToolManager.ToolManager(Path toolDirectory)
focal_class.full_signature: public  ToolManager(Path toolDirectory)
focal_class.identifier: ToolManager
focal_class.modifiers: public
focal_class.parameters: (Path toolDirectory)
focal_class.signature:  ToolManager(Path toolDirectory)
focal_class.class_method_signature: ToolManager.createCommandLine(String tool, String executionName, Map<String, String> paramsMap)
focal_class.full_signature: public String createCommandLine(String tool, String executionName, Map<String, String> paramsMap)
focal_class.identifier: createCommandLine
focal_class.modifiers: public
focal_class.parameters: (String tool, String executionName, Map<String, String> paramsMap)
focal_class.return: String
focal_class.signature: String createCommandLine(String tool, String executionName, Map<String, String> paramsMap)
focal_class.class_method_signature: ToolManager.getManifest(String tool)
focal_class.full_signature: public Manifest getManifest(String tool)
focal_class.identifier: getManifest
focal_class.modifiers: public
focal_class.parameters: (String tool)
focal_class.return: Manifest
focal_class.signature: Manifest getManifest(String tool)
focal_class.class_method_signature: ToolManager.getInputParams(String tool, String executionName)
focal_class.full_signature: public List<Param> getInputParams(String tool, String executionName)
focal_class.identifier: getInputParams
focal_class.modifiers: public
focal_class.parameters: (String tool, String executionName)
focal_class.return: List<Param>
focal_class.signature: List<Param> getInputParams(String tool, String executionName)
focal_class.class_method_signature: ToolManager.getOutputParams(String tool, String executionName)
focal_class.full_signature: public List<Param> getOutputParams(String tool, String executionName)
focal_class.identifier: getOutputParams
focal_class.modifiers: public
focal_class.parameters: (String tool, String executionName)
focal_class.return: List<Param>
focal_class.signature: List<Param> getOutputParams(String tool, String executionName)
focal_class.class_method_signature: ToolManager.runCommandLine(String commandLine, Path outdir)
focal_class.full_signature: public void runCommandLine(String commandLine, Path outdir)
focal_class.identifier: runCommandLine
focal_class.modifiers: public
focal_class.parameters: (String commandLine, Path outdir)
focal_class.return: void
focal_class.signature: void runCommandLine(String commandLine, Path outdir)
focal_class.class_method_signature: ToolManager.runCommandLine(String commandLine, Path outdir, boolean redirectLogs)
focal_class.full_signature: public void runCommandLine(String commandLine, Path outdir, boolean redirectLogs)
focal_class.identifier: runCommandLine
focal_class.modifiers: public
focal_class.parameters: (String commandLine, Path outdir, boolean redirectLogs)
focal_class.return: void
focal_class.signature: void runCommandLine(String commandLine, Path outdir, boolean redirectLogs)
focal_class.class_method_signature: ToolManager.checkToolDirectory()
focal_class.full_signature: private void checkToolDirectory()
focal_class.identifier: checkToolDirectory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkToolDirectory()
focal_class.class_method_signature: ToolManager.validateParams(Execution execution, Map<String, String> paramsMap)
focal_class.full_signature: private void validateParams(Execution execution, Map<String, String> paramsMap)
focal_class.identifier: validateParams
focal_class.modifiers: private
focal_class.parameters: (Execution execution, Map<String, String> paramsMap)
focal_class.return: void
focal_class.signature: void validateParams(Execution execution, Map<String, String> paramsMap)
focal_class.class_method_signature: ToolManager.validateDataType(Map.Entry<String, String> entry, Param inputParam)
focal_class.full_signature: private void validateDataType(Map.Entry<String, String> entry, Param inputParam)
focal_class.identifier: validateDataType
focal_class.modifiers: private
focal_class.parameters: (Map.Entry<String, String> entry, Param inputParam)
focal_class.return: void
focal_class.signature: void validateDataType(Map.Entry<String, String> entry, Param inputParam)
focal_method.body: public ToolManager(Path toolDirectory) throws AnalysisToolException {
          this.toolDirectory = toolDirectory;
          this.tools = new HashMap<>();
          this.logger = LoggerFactory.getLogger(ToolManager.class);
  
          checkToolDirectory();
      }
focal_method.class_method_signature: ToolManager.ToolManager(Path toolDirectory)
focal_method.full_signature: public  ToolManager(Path toolDirectory)
focal_method.identifier: ToolManager
focal_method.modifiers: public
focal_method.parameters: (Path toolDirectory)
focal_method.signature:  ToolManager(Path toolDirectory)