예제 #1
0
  /** new blast command based on default parameters */
  public BlatCommand() throws IOException {
    // look in configuration file to determine default values
    commandLine = DEFAULTCOMMANDLINE;
    commandPath = DEFAULTCOMMANDPATH;
    tmpDir = DEFAULTTMPDIR;

    tmpDirFile = MetaUtils.createTempDir("blat_", tmpDir);
  }
예제 #2
0
  /**
   * new blast command based on values stored in the configuration.
   *
   * <p>Looks for the following config values: blast.commandline, blast.commandpath, and
   * blast.tmpdir
   *
   * @param config is the hadoop configuration with overriding values for commandline options and
   *     paths
   */
  public BlatCommand(Configuration config) throws IOException {

    String c;

    if ((c = config.get("blat.commandline")) != null) {
      commandLine = c;
    } else {
      commandLine = DEFAULTCOMMANDLINE;
    }
    if ((c = config.get("blat.commandpath")) != null) {
      commandPath = c;
    } else {
      commandPath = DEFAULTCOMMANDPATH;
    }
    if ((c = config.get("blat.tmpdir")) != null) {
      tmpDir = c;
    } else {
      tmpDir = DEFAULTTMPDIR;
    }

    doCleanup = config.getBoolean("blat.cleanup", true);
    paired = config.getBoolean("blat.paired", true);

    /*
    do sanity check to make sure all paths exist
     */
    // checkFileExists(commandLine);
    // checkFileExists(commandPath);
    // checkDirExists(tmpDir);

    /*
    if all is good, create a working space inside tmpDir
     */

    tmpDirFile = MetaUtils.createTempDir("blat_", tmpDir);
  }