use of org.broadinstitute.hellbender.tools.exome.copyratio.CopyRatioModeller in project gatk-protected by broadinstitute.
the class ACNVModeller method fitModel.
/**
* Performs Markov-Chain Monte Carlo model fitting using the
* number of total samples and number of burn-in samples pecified at construction.
*/
public void fitModel() {
//perform MCMC to generate posterior samples
logger.info("Fitting copy-ratio model...");
copyRatioModeller = new CopyRatioModeller(segmentedGenome);
copyRatioModeller.fitMCMC(numSamplesCopyRatio, numBurnInCopyRatio);
logger.info("Fitting allele-fraction model...");
alleleFractionModeller = new AlleleFractionModeller(segmentedGenome, allelicPoN);
alleleFractionModeller.fitMCMC(numSamplesAlleleFraction, numBurnInAlleleFraction);
//update list of ACNVModeledSegment with new PosteriorSummaries
segments.clear();
final List<SimpleInterval> unmodeledSegments = segmentedGenome.getSegments();
final List<PosteriorSummary> segmentMeansPosteriorSummaries = copyRatioModeller.getSegmentMeansPosteriorSummaries(CREDIBLE_INTERVAL_ALPHA, ctx);
final List<PosteriorSummary> minorAlleleFractionsPosteriorSummaries = alleleFractionModeller.getMinorAlleleFractionsPosteriorSummaries(CREDIBLE_INTERVAL_ALPHA, ctx);
for (int segment = 0; segment < unmodeledSegments.size(); segment++) {
segments.add(new ACNVModeledSegment(unmodeledSegments.get(segment), segmentMeansPosteriorSummaries.get(segment), minorAlleleFractionsPosteriorSummaries.get(segment)));
}
isModelFit = true;
}
use of org.broadinstitute.hellbender.tools.exome.copyratio.CopyRatioModeller in project gatk by broadinstitute.
the class ACNVModeller method fitModel.
/**
* Performs Markov-Chain Monte Carlo model fitting using the
* number of total samples and number of burn-in samples pecified at construction.
*/
public void fitModel() {
//perform MCMC to generate posterior samples
logger.info("Fitting copy-ratio model...");
copyRatioModeller = new CopyRatioModeller(segmentedGenome);
copyRatioModeller.fitMCMC(numSamplesCopyRatio, numBurnInCopyRatio);
logger.info("Fitting allele-fraction model...");
alleleFractionModeller = new AlleleFractionModeller(segmentedGenome, allelicPoN);
alleleFractionModeller.fitMCMC(numSamplesAlleleFraction, numBurnInAlleleFraction);
//update list of ACNVModeledSegment with new PosteriorSummaries
segments.clear();
final List<SimpleInterval> unmodeledSegments = segmentedGenome.getSegments();
final List<PosteriorSummary> segmentMeansPosteriorSummaries = copyRatioModeller.getSegmentMeansPosteriorSummaries(CREDIBLE_INTERVAL_ALPHA, ctx);
final List<PosteriorSummary> minorAlleleFractionsPosteriorSummaries = alleleFractionModeller.getMinorAlleleFractionsPosteriorSummaries(CREDIBLE_INTERVAL_ALPHA, ctx);
for (int segment = 0; segment < unmodeledSegments.size(); segment++) {
segments.add(new ACNVModeledSegment(unmodeledSegments.get(segment), segmentMeansPosteriorSummaries.get(segment), minorAlleleFractionsPosteriorSummaries.get(segment)));
}
isModelFit = true;
}
Aggregations