Package org.broadinstitute.gatk.utils.genotyper

Examples of org.broadinstitute.gatk.utils.genotyper.ReadLikelihoods


    @Override
    public ReadLikelihoods<Haplotype> computeReadLikelihoods(final AssemblyResultSet assemblyResultSet,
                                                  final SampleList samples,
                                                  final Map<String, List<GATKSAMRecord>> reads) {
        final AlleleList<Haplotype> haplotypes = new IndexedAlleleList<>(assemblyResultSet.getHaplotypeList());
        final ReadLikelihoods result = new ReadLikelihoods(samples, haplotypes, reads);
        final Map<Haplotype,Allele> alleles = new HashMap<>(haplotypes.alleleCount());
        final Random rnd = GenomeAnalysisEngine.getRandomGenerator();
        final int sampleCount = samples.sampleCount();
        final int alleleCount = haplotypes.alleleCount();
        for (int i = 0; i < sampleCount; i++)  {
            final List<GATKSAMRecord> sampleReads = result.sampleReads(i);
            final int readCount = sampleReads.size();
            final ReadLikelihoods.Matrix<Haplotype> sampleLikelihoods = result.sampleMatrix(i);
            for (int a = 0; a < alleleCount; a++)
                for (int r = 0; r < readCount; r++)
                    sampleLikelihoods.set(a,r,-Math.abs(rnd.nextDouble()));
        }
        return result;
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.genotyper.ReadLikelihoods

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.