Examples of IndexedSampleList


Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

        if (sampleCount < 0)
            throw new IllegalArgumentException("the number of sample cannot be negative");
        final List<String> result = new ArrayList<>(sampleCount);
        for (int i =0; i < sampleCount; i++)
            result.add("SAMPLE_" + i);
        return new IndexedSampleList(result);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

        String trackName = variantCollection.variants.getName();

        final GenomeAnalysisEngine toolkit = getToolkit();
        final SampleList samples =
                new IndexedSampleList(SampleUtils.getSampleListWithVCFHeader(getToolkit(), Arrays.asList(trackName)));
        final Set<String> sampleNameSet = SampleListUtils.asSet(samples);
        UG_engine = new UnifiedGenotypingEngine(UAC, samples,toolkit.getGenomeLocParser(),
                FixedAFCalculatorProvider.createThreadSafeProvider(toolkit,UAC,logger),
                toolkit.getArguments().BAQMode);
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

*/
public class SampleListUtilsUnitTest {

    @Test(dataProvider = "singleSampleListData")
    public void testAsList(final List<String> samples) {
         final SampleList sampleList = new IndexedSampleList(samples);
         final List<String> asList = SampleListUtils.asList(sampleList);
         Assert.assertEquals(samples, asList);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

         Assert.assertEquals(samples, asList);
    }

    @Test(dataProvider = "twoSampleListData", dependsOnMethods={"testAsList"})
    public void testEquals(final List<String> sample2, final List<String> samples2) {
        final SampleList sampleList1 = new IndexedSampleList(sample2);
        final SampleList sampleList2 = new IndexedSampleList(samples2);
        Assert.assertTrue(SampleListUtils.equals(sampleList1, sampleList1));
        Assert.assertTrue(SampleListUtils.equals(sampleList2,sampleList2));
        Assert.assertEquals(SampleListUtils.equals(sampleList1, sampleList2),
                Arrays.equals(SampleListUtils.asList(sampleList1).toArray(new String[sampleList1.sampleCount()]),
                        SampleListUtils.asList(sampleList2).toArray(new String[sampleList2.sampleCount()]))
        );
        Assert.assertEquals(SampleListUtils.equals(sampleList1,sampleList2),
                            SampleListUtils.equals(sampleList2,sampleList1));
    }
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

                    // Apparently more than one allele can map to the same haplotype after trimming
                    final Set<Haplotype> distinctHaplotypesSet = new LinkedHashSet<>(trimmedHaplotypeMap.values());
                    final AlleleList<Haplotype> distinctHaplotypesList = new IndexedAlleleList<>(distinctHaplotypesSet.toArray(new Haplotype[distinctHaplotypesSet.size()]));
                    // Get the likelihoods for our clipped read against each of our trimmed haplotypes.
                    final ReadLikelihoods<Haplotype> rl = new ReadLikelihoods<>(
                            new IndexedSampleList(Collections.singletonList("DUMMY_SAMPLE")),distinctHaplotypesList,Collections.singletonMap("DUMMY_SAMPLE",Collections.singletonList(processedRead)));

                    final ReadLikelihoods.Matrix<Haplotype> dummySampleLikelihoods = rl.sampleMatrix(0);
                    pairHMM.computeLikelihoods(rl.sampleMatrix(0), Collections.singletonList(processedRead), readGCPArrayMap);

                    // Pack the original pilup element, each allele, and each associated log10 likelihood into a final map, and add each likelihood to the array
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

    /**
     * Returns the sample list including all samples.
     * @return never {@code null}.
     */
    public SampleList getSampleList() {
        return new IndexedSampleList(getSampleDB().getSampleNames());
    }
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.IndexedSampleList

    /**
     * Returns the sample list including samples in read inputs.
     * @return never {@code null}.
     */
    public SampleList getReadSampleList() {
        return new IndexedSampleList(SampleUtils.getSAMFileSamples(getSAMFileHeader()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.