Package org.broadinstitute.gatk.utils

Examples of org.broadinstitute.gatk.utils.GenomeLocParser


            createTestBAM();

            SAMDataSource dataSource = new SAMDataSource(Arrays.asList(testBAM),
                                                         new ThreadAllocation(),
                                                         null,
                                                         new GenomeLocParser(header.getSequenceDictionary()),
                                                         false,
                                                         ValidationStringency.SILENT,
                                                         ReadShard.DEFAULT_MAX_READS,  // reset ReadShard.MAX_READS to ReadShard.DEFAULT_MAX_READS for each test
                                                         downsamplingMethod,
                                                         new ValidationExclusion(),
View Full Code Here



    @BeforeClass
    public void init() throws FileNotFoundException {
        seq = new CachingIndexedFastaSequenceFile(new File(hg18Reference));
        genomeLocParser = new GenomeLocParser(seq);

        testSite1 = genomeLocParser.createGenomeLoc("chrM",10);
        testSite2 = genomeLocParser.createGenomeLoc("chrM",20);
        testSite3 = genomeLocParser.createGenomeLoc("chrM",30);
        testInterval1 = genomeLocParser.createGenomeLoc("chrM",10,20);
View Full Code Here

    public void testCloseFilePointers() throws IOException {
        // Build up query parameters
        File file = new File(BaseTest.privateTestDir + "NA12878.hg19.example1.vcf");
        RMDTriplet triplet = new RMDTriplet("test", "VCF", file.getAbsolutePath(), RMDTriplet.RMDStorageType.FILE, new Tags());
        IndexedFastaSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(BaseTest.hg19Reference));
        GenomeLocParser parser = new GenomeLocParser(seq);
        GenomeLoc loc = parser.createGenomeLoc("20", 1, 100000);
        TestRMDTrackBuilder builder = new TestRMDTrackBuilder(seq.getSequenceDictionary(), parser);

        // Create the query data pool
        ReferenceOrderedQueryDataPool pool = new ReferenceOrderedQueryDataPool(triplet, builder, seq.getSequenceDictionary(), parser);
View Full Code Here

    public static Pair<GenomeLocSortedSet, GenomeLocSortedSet> parseIntervalBindingsPair(
            final ReferenceDataSource referenceDataSource,
            final List<IntervalBinding<Feature>> intervals,
            final IntervalSetRule intervalSetRule, final IntervalMergingRule intervalMergingRule, final int intervalPadding,
            final List<IntervalBinding<Feature>> excludeIntervals) {
        GenomeLocParser genomeLocParser = new GenomeLocParser(referenceDataSource.getReference());

        // if include argument isn't given, create new set of all possible intervals
        GenomeLocSortedSet includeSortedSet = ((intervals == null || intervals.size() == 0) ?
                GenomeLocSortedSet.createSetFromSequenceDictionary(referenceDataSource.getReference().getSequenceDictionary()) :
                loadIntervals(intervals, intervalSetRule, intervalMergingRule, intervalPadding, genomeLocParser));
View Full Code Here

        return size;
    }

    public static void writeFlankingIntervals(File reference, File inputIntervals, File flankingIntervals, int basePairs) {
        ReferenceDataSource referenceDataSource = new ReferenceDataSource(reference);
        GenomeLocParser parser = new GenomeLocParser(referenceDataSource.getReference());
        List<GenomeLoc> originalList = intervalFileToList(parser, inputIntervals.getAbsolutePath());

        if (originalList.isEmpty())
            throw new UserException.MalformedFile(inputIntervals, "File contains no intervals");
View Full Code Here

     * @param sequenceDictionary sequence dictionary used to initialize our GenomeLocParser
     * @param reads Reads to use as backing data source.
     */
    public ArtificialSAMFileReader(SAMSequenceDictionary sequenceDictionary,SAMRecord... reads) {
        super( createEmptyInputStream(),true );
        this.genomeLocParser = new GenomeLocParser(sequenceDictionary);
        this.reads = Arrays.asList(reads);
    }
View Full Code Here

     */
    public ArtificialSAMFileReader( SAMFileHeader customHeader, SAMRecord... reads ) {
        super(createEmptyInputStream(),true);

        this.customHeader = customHeader;
        this.genomeLocParser = new GenomeLocParser(customHeader.getSequenceDictionary());
        this.reads = Arrays.asList(reads);
    }
View Full Code Here

     */
    public LocusIteratorByState(final SAMFileReader reader, final CloseableIterator<SAMRecord> it) {
        this(new GATKSAMRecordIterator(it),
                new LIBSDownsamplingInfo(false, 0),
                true,
                new GenomeLocParser(reader.getFileHeader().getSequenceDictionary()),
                SampleUtils.getSAMFileSamples(reader.getFileHeader()),
                false);
    }
View Full Code Here

    public ArtificialBAMBuilder(final IndexedFastaSequenceFile reference, int nReadsPerLocus, int nLoci) {
        this.nReadsPerLocus = nReadsPerLocus;
        this.nLoci = nLoci;

        this.reference = reference;
        this.parser = new GenomeLocParser(reference);
        createAndSetHeader(1);
    }
View Full Code Here

    public ArtificialBAMBuilder(final SAMSequenceDictionary dict, int nReadsPerLocus, int nLoci) {
        this.nReadsPerLocus = nReadsPerLocus;
        this.nLoci = nLoci;
        this.reference = null;
        this.parser = new GenomeLocParser(dict);
        createAndSetHeader(1);
    }
View Full Code Here

TOP

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

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.