Search in sources :

Example 1 with DecileCollection

use of org.broadinstitute.hellbender.utils.mcmc.DecileCollection in project gatk by broadinstitute.

the class PerformJointSegmentation method errorlessPosterior.

@VisibleForTesting
protected static PosteriorSummary errorlessPosterior(final double value) {
    final PosteriorSummary result = new PosteriorSummary(value, value, value);
    result.setDeciles(new DecileCollection(Arrays.asList(value)));
    return result;
}
Also used : PosteriorSummary(org.broadinstitute.hellbender.utils.mcmc.PosteriorSummary) DecileCollection(org.broadinstitute.hellbender.utils.mcmc.DecileCollection) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 2 with DecileCollection

use of org.broadinstitute.hellbender.utils.mcmc.DecileCollection in project gatk-protected by broadinstitute.

the class SegmentUtils method toACNVModeledSegment.

private static ACNVModeledSegment toACNVModeledSegment(final DataLine dataLine) {
    final PosteriorSummary segmentMeanPosteriorSummary = new PosteriorSummary(dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_MODE.toString()), dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_LOWER.toString()), dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_UPPER.toString()));
    final PosteriorSummary minorAlleleFractionPosteriorSummary = new PosteriorSummary(dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_MODE.toString()), dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_LOWER.toString()), dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_UPPER.toString()));
    final DecileCollection mafDecileCollection = new DecileCollection(SegmentTableColumn.ACNV_MODELED_SEGMENT_MAF_DECILES_SUMMARY_COLUMNS.names().stream().map(dataLine::getDouble).collect(Collectors.toList()));
    final DecileCollection segmentMeanDecileCollection = new DecileCollection(SegmentTableColumn.ACNV_MODELED_SEGMENT_MEAN_DECILES_SUMMARY_COLUMNS.names().stream().map(dataLine::getDouble).collect(Collectors.toList()));
    minorAlleleFractionPosteriorSummary.setDeciles(mafDecileCollection);
    segmentMeanPosteriorSummary.setDeciles(segmentMeanDecileCollection);
    return new ACNVModeledSegment(toInterval(dataLine), segmentMeanPosteriorSummary, minorAlleleFractionPosteriorSummary);
}
Also used : PosteriorSummary(org.broadinstitute.hellbender.utils.mcmc.PosteriorSummary) DecileCollection(org.broadinstitute.hellbender.utils.mcmc.DecileCollection)

Example 3 with DecileCollection

use of org.broadinstitute.hellbender.utils.mcmc.DecileCollection in project gatk by broadinstitute.

the class SegmentUtils method toACNVModeledSegment.

private static ACNVModeledSegment toACNVModeledSegment(final DataLine dataLine) {
    final PosteriorSummary segmentMeanPosteriorSummary = new PosteriorSummary(dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_MODE.toString()), dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_LOWER.toString()), dataLine.getDouble(SegmentTableColumn.SEGMENT_MEAN_POSTERIOR_UPPER.toString()));
    final PosteriorSummary minorAlleleFractionPosteriorSummary = new PosteriorSummary(dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_MODE.toString()), dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_LOWER.toString()), dataLine.getDouble(SegmentTableColumn.MINOR_ALLELE_FRACTION_POSTERIOR_UPPER.toString()));
    final DecileCollection mafDecileCollection = new DecileCollection(SegmentTableColumn.ACNV_MODELED_SEGMENT_MAF_DECILES_SUMMARY_COLUMNS.names().stream().map(dataLine::getDouble).collect(Collectors.toList()));
    final DecileCollection segmentMeanDecileCollection = new DecileCollection(SegmentTableColumn.ACNV_MODELED_SEGMENT_MEAN_DECILES_SUMMARY_COLUMNS.names().stream().map(dataLine::getDouble).collect(Collectors.toList()));
    minorAlleleFractionPosteriorSummary.setDeciles(mafDecileCollection);
    segmentMeanPosteriorSummary.setDeciles(segmentMeanDecileCollection);
    return new ACNVModeledSegment(toInterval(dataLine), segmentMeanPosteriorSummary, minorAlleleFractionPosteriorSummary);
}
Also used : PosteriorSummary(org.broadinstitute.hellbender.utils.mcmc.PosteriorSummary) DecileCollection(org.broadinstitute.hellbender.utils.mcmc.DecileCollection)

Example 4 with DecileCollection

use of org.broadinstitute.hellbender.utils.mcmc.DecileCollection in project gatk-protected by broadinstitute.

the class PerformJointSegmentation method errorlessPosterior.

@VisibleForTesting
protected static PosteriorSummary errorlessPosterior(final double value) {
    final PosteriorSummary result = new PosteriorSummary(value, value, value);
    result.setDeciles(new DecileCollection(Arrays.asList(value)));
    return result;
}
Also used : PosteriorSummary(org.broadinstitute.hellbender.utils.mcmc.PosteriorSummary) DecileCollection(org.broadinstitute.hellbender.utils.mcmc.DecileCollection) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

DecileCollection (org.broadinstitute.hellbender.utils.mcmc.DecileCollection)4 PosteriorSummary (org.broadinstitute.hellbender.utils.mcmc.PosteriorSummary)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)2