예제 #1
0
 public boolean goodSite(VariantContext v) {
   if (canBeOutputToBeagle(v)) {
     if (VQSRCalibrator != null && VQSRCalibrator.certainFalsePositive(VQSLOD_KEY, v)) {
       certainFPs++;
       return false;
     } else {
       return true;
     }
   } else {
     return false;
   }
 }
예제 #2
0
  public void initialize() {

    samples =
        SampleUtils.getSampleListWithVCFHeader(
            getToolkit(), Arrays.asList(variantCollection.variants.getName()));

    beagleWriter.print("marker alleleA alleleB");
    for (String sample : samples)
      beagleWriter.print(String.format(" %s %s %s", sample, sample, sample));

    beagleWriter.println();

    if (bootstrapVCFOutput != null) {
      initializeVcfWriter();
    }

    if (VQSRCalibrationFile != null) {
      VQSRCalibrator = VQSRCalibrationCurve.readFromFile(VQSRCalibrationFile);
      logger.info("Read calibration curve");
      VQSRCalibrator.printInfo(logger);
    }
  }
예제 #3
0
  private void writeSampleLikelihoods(
      StringBuffer out, VariantContext vc, double[] log10Likelihoods) {
    if (VQSRCalibrator != null) {
      log10Likelihoods =
          VQSRCalibrator.includeErrorRateInLikelihoods(VQSLOD_KEY, vc, log10Likelihoods);
    }

    double[] normalizedLikelihoods = MathUtils.normalizeFromLog10(log10Likelihoods);
    // see if we need to randomly mask out genotype in this position.
    for (double likeVal : normalizedLikelihoods) {
      out.append(formatter.format(likeVal));
      //            out.append(String.format("%5.4f ",likeVal));
    }
  }