Package org.broadinstitute.gatk.utils.locusiterator

Examples of org.broadinstitute.gatk.utils.locusiterator.LocusIteratorByState


        if ( debuggingWriter != null )
            for ( final GATKSAMRecord read : reads )
                debuggingWriter.addAlignment(read);

        final LocusIteratorByState libs = new LocusIteratorByState(reads.iterator(), LocusIteratorByState.NO_DOWNSAMPLING,
                true, genomeLocParser, SampleListUtils.asSet(samples), false);

        final List<ReadBackedPileup> pileups = new LinkedList<>();
        final int startPos = activeRegionSpan.getStart();
        AlignmentContext next = libs.advanceToLocus(startPos, true);
        for ( int curPos = startPos; curPos <= activeRegionSpan.getStop(); curPos++ ) {
            if ( next != null && next.getLocation().getStart() == curPos ) {
                pileups.add(next.getBasePileup());
                next = libs.hasNext() ? libs.next() : null;
            } else {
                // no data, so we create empty pileups
                pileups.add(new ReadBackedPileupImpl(genomeLocParser.createGenomeLoc(activeRegionSpan.getContig(), curPos)));
            }
        }
View Full Code Here


    public WindowMaker(Shard shard, GenomeLocParser genomeLocParser, GATKSAMIterator iterator, List<GenomeLoc> intervals, Collection<String> sampleNames) {
        this.sourceInfo = shard.getReadProperties();
        this.readIterator = new GATKSAMRecordIterator(iterator);

        this.libs = new LocusIteratorByState(readIterator,sourceInfo,genomeLocParser,sampleNames);
        this.sourceIterator = new PeekableIterator<AlignmentContext>(libs);

        this.intervalIterator = intervals.size()>0 ? new PeekableIterator<GenomeLoc>(intervals.iterator()) : null;
    }
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.locusiterator.LocusIteratorByState

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.