Package org.broadinstitute.gatk.utils

Examples of org.broadinstitute.gatk.utils.GenomeLocSortedSet


            initKB();
        }

        //Convert from 0-based to 1-based
        GenomeLoc loc = this.parser.createGenomeLoc(chromoNameToStandard(chr), start + 1, end);
        GenomeLocSortedSet glss = new GenomeLocSortedSet(this.parser, loc);
        SiteManager manager = new SiteManager(parser, glss, parser.getContigs());

        SiteIterator<MongoVariantContext> iterator;
        if (consensusOnly) {
            iterator = kb.getConsensusSites(manager);
View Full Code Here


        if (baitsFile == null)
            baitsFile = targetsFile;

        simpleReport = GATKReport.newSimpleReport("QualifyMissingIntervals", "INTERVAL", "GC", "BQ", "MQ", "DP", "POS_IN_TARGET", "TARGET_SIZE", "BAITED", "MISSING_SIZE", "INTERPRETATION");
        final GenomeLocParser parser = getToolkit().getGenomeLocParser();
        targets = new GenomeLocSortedSet(parser, IntervalUtils.intervalFileToList(parser, targetsFile));
        baits = new GenomeLocSortedSet(parser, IntervalUtils.intervalFileToList(parser, baitsFile));
    }
View Full Code Here

     * @param dataSource    BAM source
     * @return non-null BAM scheduler
     */
    public static BAMScheduler createOverMappedReads(final SAMDataSource dataSource) {
        final BAMScheduler scheduler = new BAMScheduler(dataSource, IntervalMergingRule.ALL);
        final GenomeLocSortedSet intervals = GenomeLocSortedSet.createSetFromSequenceDictionary(dataSource.getHeader().getSequenceDictionary());
        scheduler.populateFilteredIntervalList(intervals);
        return scheduler;
    }
View Full Code Here

    /**
     * The consumer has provided null, meaning to iterate over all available data.  Create a file pointer stretching
     * from just before the start of the region to the end of the region.
     */
    private void populateUnfilteredIntervalList(final GenomeLocParser parser) {
        this.loci = new GenomeLocSortedSet(parser);
        locusIterator = new PeekableIterator<GenomeLoc>(Collections.<GenomeLoc>emptyList().iterator());
        nextFilePointer = generatePointerOverEntireFileset();
    }
View Full Code Here

        // initialize reads
        List<SAMReaderID> bamReaders = ListFileUtils.unpackBAMFileList(samFiles,parser);
        SAMDataSource dataSource = new SAMDataSource(bamReaders,new ThreadAllocation(),null,genomeLocParser);

        // intervals
        final GenomeLocSortedSet intervalSortedSet;
        if ( intervals != null )
            intervalSortedSet = IntervalUtils.sortAndMergeIntervals(genomeLocParser, IntervalUtils.parseIntervalArguments(genomeLocParser, intervals), IntervalMergingRule.ALL);
        else
            intervalSortedSet = GenomeLocSortedSet.createSetFromSequenceDictionary(refReader.getSequenceDictionary());
View Full Code Here

    // capture and count calls to progress
    private class TestingProgressMeter extends ProgressMeter {
        final List<Long> progressCalls = new LinkedList<Long>();

        private TestingProgressMeter(final long poll) {
            super(null, "test", new GenomeLocSortedSet(genomeLocParser), poll);
            super.start();
        }
View Full Code Here

        final TraverseActiveRegions traverseActiveRegions = new TraverseActiveRegions();
        final DummyActiveRegionWalker walker = new DummyActiveRegionWalker();
        traverseActiveRegions.initialize(engine, walker, null);

        for ( final Shard shard : dataSource.createShardIteratorOverIntervals(new GenomeLocSortedSet(genomeLocParser, intervals), new ActiveRegionShardBalancer()) ) {
            final WindowMaker windowMaker = new WindowMaker(shard, genomeLocParser, dataSource.seek(shard), shard.getGenomeLocs(), samples);
            for ( WindowMaker.WindowMakerIterator window : windowMaker ) {
                final LocusShardDataProvider dataProvider = new LocusShardDataProvider(shard, shard.getReadProperties(), genomeLocParser, window.getLocus(), window, reference, new ArrayList<ReferenceOrderedDataSource>());
                traverseActiveRegions.traverse(walker, dataProvider, 0);
                dataProvider.close();
View Full Code Here

        GenomeLocParser genomeLocParser = new GenomeLocParser(ArtificialSAMUtils.createArtificialSamHeader(1, 1, 1000).getSequenceDictionary());

        GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();

        testEngine.setWalker(new PrintReads());
        testEngine.setIntervals(new GenomeLocSortedSet(genomeLocParser));

        testEngine.validateSuppliedIntervals();
    }
View Full Code Here

            } else {
                states = null;
            }

            final ActiveRegion region = new ActiveRegion(regionLoc, states, true, genomeLocParser, 0);
            final GenomeLocSortedSet intervals = new GenomeLocSortedSet(genomeLocParser,  intervalLocs);
            final List<ActiveRegion> regions = region.splitAndTrimToIntervals(intervals);

            Assert.assertEquals(regions.size(), expectedRegionLocs.size(), "Wrong number of split locations");
            for ( int i = 0; i < expectedRegionLocs.size(); i++ ) {
                final GenomeLoc expected = expectedRegionLocs.get(i);
View Full Code Here

        getActiveRegions(t, walker, intervals).values();
    }

    @Test(enabled = true && ! DEBUG, dataProvider = "TraversalEngineProvider")
    public void testActiveRegionCoverage(TraverseActiveRegions t) {
        DummyActiveRegionWalker walker = new DummyActiveRegionWalker(new GenomeLocSortedSet(genomeLocParser, intervals), true);

        Collection<ActiveRegion> activeRegions = getActiveRegions(t, walker, intervals).values();
        verifyActiveRegionCoverage(intervals, activeRegions);
    }
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.GenomeLocSortedSet

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.