Package org.broadinstitute.gatk.engine.contexts

Examples of org.broadinstitute.gatk.engine.contexts.ReferenceContext$ForwardingProvider


            alleles.add(Allele.create("A", true));
            alleles.add(Allele.create(Utils.dupString("A",Math.abs(indelSize)+1),false));

        }
        final GenomeLoc loc = genomeLocParser.createGenomeLoc(artificialContig,locStart+offset,locStart+offset);
        final ReferenceContext referenceContext = new ReferenceContext(genomeLocParser,loc,window,windowBases.getBytes());

        final VariantContext vc = new VariantContextBuilder("test", artificialContig, locStart+offset, locStart+offset+alleles.get(0).length()-1, alleles).make();
        final Pair<VariantContext,Integer> result = LeftAlignAndTrimVariants.alignAndWrite(vc,referenceContext);
        Assert.assertTrue(result.second == (offset>0?1:0));
        Assert.assertEquals(result.first.getStart(), locStart);
View Full Code Here


            return;

        final List<Allele> alleles = new ArrayList<Allele>();

        final GenomeLoc loc = genomeLocParser.createGenomeLoc(artificialContig,locStart+offset,locStart+offset);
        final ReferenceContext referenceContext = new ReferenceContext(genomeLocParser,loc,window,windowBases.getBytes());

        final int prefixLen = 10;
        final String prefix = refBases.substring(locStart+offset-prefixLen,locStart+offset);
        if (indelSize < 0) { // deletion
            alleles.add(Allele.create(prefix+Utils.dupString("A",Math.abs(indelSize)+1),true));
View Full Code Here

        writer.close();
    }

    private void purgeQueue() {

        final ReferenceContext refContext = queue.getFirst().ref;

        // divide them up by source
        while ( !queue.isEmpty() ) {
            VCcontext context = queue.removeFirst();
            for ( final VariantContext vc: context.vcs ) {
View Full Code Here

    private void initialize(StratifiedEvalTestProvider cfg) {
        VEwalker.createStratificationStates(cfg.stratificationObjects, cfg.evaluationObjects);

        final RefMetaDataTracker tracker = new RefMetaDataTracker();
        final ReferenceContext ref = null;
        final VariantContext comp = null;
        final String compName = null, sampleName = null;

        // increment eval counts for each stratification of divisors of i from from 1...maxI
        for ( int i = 1; i <= cfg.maxI; i++ ) {
View Full Code Here

        // while we still have more reads
        for (SAMRecord read : iter) {

            // an array of characters that represent the reference
            ReferenceContext refSeq = null;

            final boolean keepMeP = readWalker.filter(refSeq, (GATKSAMRecord) read);
            if (keepMeP) {
                M x = readWalker.map(refSeq, (GATKSAMRecord) read, null)// TODO: fix me at some point, it would be nice to fake out ROD data too
                sum = readWalker.reduce(x, sum);
View Full Code Here

                    dataProvider.getShard().getReadMetrics().incrementNumIterations();

                    // create reference context. Note that if we have a pileup of "extended events", the context will
                    // hold the (longest) stretch of deleted reference bases (if deletions are present in the pileup).
                    final ReferenceContext refContext = referenceView.getReferenceContext(location);

                    // Iterate forward to get all reference ordered data covering this location
                    final RefMetaDataTracker tracker = referenceOrderedDataView.getReferenceOrderedDataAtLocus(locus.getLocation());

                    // Call the walkers isActive function for this locus and add them to the list to be integrated later
View Full Code Here

            //logger.info("Pulling data from MapDataIterator at " + location);

            // create reference context. Note that if we have a pileup of "extended events", the context will
            // hold the (longest) stretch of deleted reference bases (if deletions are present in the pileup).
            final ReferenceContext refContext = referenceView.getReferenceContext(location);

            // Iterate forward to get all reference ordered data covering this location
            final RefMetaDataTracker tracker = referenceOrderedDataView.getReferenceOrderedDataAtLocus(location);

            numIterations++;
View Full Code Here

            @Override public boolean hasNext() { return ! engine.exceedsRuntimeLimit() && readIterator.hasNext(); }

            @Override
            public MapData next() {
                final SAMRecord read = readIterator.next();
                final ReferenceContext refContext = ! read.getReadUnmappedFlag()
                        ? reference.getReferenceContext(read)
                        : null;

                // if the read is mapped, create a metadata tracker
                final RefMetaDataTracker tracker = read.getReferenceIndex() >= 0
View Full Code Here

        LocusShardDataProvider dataProvider = new LocusShardDataProvider(shard, null, genomeLocParser, shard.getGenomeLocs().get(0), null, sequenceFile, null);
        LocusReferenceView view = new LocusReferenceView(dataProvider);

        GenomeLoc locus = genomeLocParser.createGenomeLoc(sequenceFile.getSequenceDictionary().getSequence(0).getSequenceName(), 50, 51);

        ReferenceContext rc = view.getReferenceContext(locus);
        Assert.assertTrue(rc.getLocus().equals(locus));
        Assert.assertTrue(rc.getWindow().equals(genomeLocParser.createGenomeLoc(sequenceFile.getSequenceDictionary().getSequence(0).getSequenceName(),50)));
        Assert.assertTrue(rc.getBases().length == 1);
    }
View Full Code Here

    @BeforeClass
    public void beforeClass() {
        header = ArtificialSAMUtils.createArtificialSamHeader(1, 1, 100);
        genomeLocParser = new GenomeLocParser(header.getSequenceDictionary());
        locus = genomeLocParser.createGenomeLoc("chr1", START_POS, START_POS);
        context = new ReferenceContext(genomeLocParser, locus, (byte)'A');
        A = Allele.create("A", true);
        C = Allele.create("C");
        G = Allele.create("G");
        T = Allele.create("T");
        AC_SNP = new VariantContextBuilder("x", "chr1", START_POS, START_POS, Arrays.asList(A, C)).make();
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.engine.contexts.ReferenceContext$ForwardingProvider

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.