Пример #1
0
  protected final void printCallInfo(
      final VariantContext vc,
      final double[] log10AlleleFrequencyPriors,
      final long runtimeNano,
      final AFCalcResult result) {
    printCallElement(vc, "type", "ignore", vc.getType());

    int allelei = 0;
    for (final Allele a : vc.getAlleles())
      printCallElement(vc, "allele", allelei++, a.getDisplayString());

    for (final Genotype g : vc.getGenotypes())
      printCallElement(vc, "PL", g.getSampleName(), g.getLikelihoodsString());

    for (int priorI = 0; priorI < log10AlleleFrequencyPriors.length; priorI++)
      printCallElement(vc, "priorI", priorI, log10AlleleFrequencyPriors[priorI]);

    printCallElement(vc, "runtime.nano", "ignore", runtimeNano);
    printCallElement(vc, "log10PosteriorOfAFEq0", "ignore", result.getLog10PosteriorOfAFEq0());
    printCallElement(vc, "log10PosteriorOfAFGt0", "ignore", result.getLog10PosteriorOfAFGT0());

    for (final Allele allele : result.getAllelesUsedInGenotyping()) {
      if (allele.isNonReference()) {
        printCallElement(vc, "MLE", allele, result.getAlleleCountAtMLE(allele));
        printCallElement(
            vc, "pNonRefByAllele", allele, result.getLog10PosteriorOfAFGt0ForAllele(allele));
      }
    }

    callReport.flush();
  }
Пример #2
0
 /**
  * Create a new ExactCallLogger writing it's output to outputFile
  *
  * @param outputFile
  */
 public ExactCallLogger(final File outputFile) {
   try {
     callReport =
         new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile), 10000000));
     callReport.println(Utils.join("\t", Arrays.asList("loc", "variable", "key", "value")));
   } catch (FileNotFoundException e) {
     throw new UserException.CouldNotCreateOutputFile(outputFile, e);
   }
 }
Пример #3
0
 @Requires({
   "vc != null",
   "variable != null",
   "key != null",
   "value != null",
   "callReport != null"
 })
 private void printCallElement(
     final VariantContext vc, final Object variable, final Object key, final Object value) {
   final String loc = String.format("%s:%d", vc.getChr(), vc.getStart());
   callReport.println(Utils.join("\t", Arrays.asList(loc, variable, key, value)));
 }