Esempio n. 1
0
  public boolean printBestIncludePreRealignment() {
    if (facetScore > preRealignmentFacetScore) {
      if (in.verbosity > -1) {
        System.err.printf("\nbest facet value --  %.6f (%s)", facetScore, conf);
      }

      return am.printOutput(alignmentInstance, in.bestOutputFileIncludePreRealignment);
    } else {
      if (in.verbosity > 0 && facetScore > -1) {
        System.err.printf("\npre-realignment facet score: %.6f", preRealignmentFacetScore);
      }

      return am.printOutput(
          preRealignmentAlignmentInstance, in.bestOutputFileIncludePreRealignment, false);
    }
  }
Esempio n. 2
0
  public boolean printBest() {
    if (facetScore != -1 && in.verbosity > -1) {
      System.err.printf("\nbest facet value --  %.6f (%s)", facetScore, conf);
    }

    return am.printOutput(alignmentInstance, in.bestOutputFile);
  }
Esempio n. 3
0
  public boolean printBestPreRealignment() {
    if (in.verbosity > -1) {
      System.err.printf(
          "\nbest pre-realignment facet value --  %.6f (%s)", preRealignmentFacetScore, conf);
    }

    return am.printOutput(preRealignmentAlignmentInstance, in.bestPreRealignmentOutputFile, false);
  }
Esempio n. 4
0
 public boolean printPreRealignment() {
   if (in.verbosity > 0 && facetScore > -1) {
     System.err.printf("\npre-realignment facet score: %.6f", preRealignmentFacetScore);
   }
   if (in.preRealignmentOutputFile != null) {
     String fname = in.preRealignmentOutputFile.replace("__CONFIG__", conf.toString());
     if (conf.repetition >= 0)
       fname = fname.replace("__ITTERATION__", Integer.toString(conf.repetition));
     if (facetScore >= 0)
       fname =
           fname.replace(
               "__FACETSCORE__", "facetScore" + Double.toString(preRealignmentFacetScore));
     return am.printOutput(preRealignmentAlignmentInstance, fname, false);
   } else {
     return am.printOutput(preRealignmentAlignmentInstance, null, false);
   }
 }
Esempio n. 5
0
  public boolean print() {
    // if(facetScore==-1){
    //	am = null;
    // }
    if (in.verbosity > 0 && facetScore > -1) {
      System.err.printf("\nfacet score: %.6f", facetScore);
    }

    if (in.configOutputFile != null) {
      String fname = in.configOutputFile.replace("__CONFIG__", conf.toString());
      if (conf.repetition >= 0)
        fname = fname.replace("__ITTERATION__", Integer.toString(conf.repetition));
      if (facetScore >= 0)
        fname = fname.replace("__FACETSCORE__", "facetScore" + Double.toString(facetScore));
      return am.printOutput(alignmentInstance, fname);

    } else return am.printOutput(alignmentInstance, null);
  }
Esempio n. 6
0
  public static double TCSValue(
      int[][] alignmentInstance, AlignmentMaker am, Configuration config) {
    String filename =
        config.temporaryFileDirectory
            + "tmp"
            + alignmentInstance.hashCode()
            + "_"
            + am.hashCode()
            + "_"
            + config.hashCode()
            + "_"
            + am.in.hashCode();

    int oldVerbosity = am.in.verbosity;
    am.in.verbosity = -1;
    am.printOutput(alignmentInstance, filename);
    am.in.verbosity = oldVerbosity;

    String command =
        config.tcoffeeDirectory
            + "t_coffee -infile "
            + filename
            + " -evaluate -method proba_pair -output score_ascii -outfile=stdout";
    String result = "-1";
    try {
      result = execCmd(command);
      execCmd("rm " + filename);
    } catch (NumberFormatException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    // System.err.println("Command: \""+command+"\"\nPre Parse Line: \""+result+"\"");
    return Double.parseDouble(result) / 100.0;
  }