Package org.broadinstitute.gatk.utils

Examples of org.broadinstitute.gatk.utils.GenomeLocParser


    @BeforeClass
    public void init() throws FileNotFoundException {
        // sequence
        final SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1, 1, 100);
        genomeLocParser = new GenomeLocParser(header.getSequenceDictionary());
    }
View Full Code Here


    @BeforeClass
    public void init() throws FileNotFoundException {
        // sequence
        ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(b37KGReference));
        genomeLocParser = new GenomeLocParser(seq);
    }
View Full Code Here

    @BeforeClass
    public void init() throws FileNotFoundException {
        // sequence
        ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(hg18Reference));
        genomeLocParser = new GenomeLocParser(seq);
        startLoc = genomeLocParser.createGenomeLoc("chr1", 1, 1, 100);
    }
View Full Code Here

    TableFeature span10_10, span1_20, span10_20;

    @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");
View Full Code Here

    private String firstContig;
    private GenomeLocParser genomeLocParser;

    @BeforeMethod
    public void setup() {
        genomeLocParser = new GenomeLocParser(header.getSequenceDictionary());
        firstContig = header.getSequenceDictionary().getSequence(0).getSequenceName();
    }
View Full Code Here

        try {
            ReferenceDataSource referenceDataSource = new ReferenceDataSource(hg18Ref);
            hg18Header = new SAMFileHeader();
            hg18Header.setSequenceDictionary(referenceDataSource.getReference().getSequenceDictionary());
            ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(hg18Ref);
            hg18GenomeLocParser = new GenomeLocParser(seq);
            hg18ReferenceLocs = Collections.unmodifiableList(GenomeLocSortedSet.createSetFromSequenceDictionary(referenceDataSource.getReference().getSequenceDictionary()).toList()) ;
        }
        catch(FileNotFoundException ex) {
            throw new UserException.CouldNotReadInputFile(hg18Ref,ex);
        }

        File hg19Ref = new File(BaseTest.hg19Reference);
        try {
            ReferenceDataSource referenceDataSource = new ReferenceDataSource(hg19Ref);
            hg19Header = new SAMFileHeader();
            hg19Header.setSequenceDictionary(referenceDataSource.getReference().getSequenceDictionary());
            ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(hg19Ref);
            hg19GenomeLocParser = new GenomeLocParser(seq);
            hg19ReferenceLocs = Collections.unmodifiableList(GenomeLocSortedSet.createSetFromSequenceDictionary(referenceDataSource.getReference().getSequenceDictionary()).toList()) ;

            hg19exomeIntervals = Collections.unmodifiableList(IntervalUtils.parseIntervalArguments(hg19GenomeLocParser, Arrays.asList(hg19Intervals)));
        }
        catch(FileNotFoundException ex) {
View Full Code Here

    }

    @Test(expectedExceptions=UserException.BadArgumentValue.class)
    public void testExceptionUponLegacyIntervalSyntax() throws Exception {
        GenomeAnalysisEngine toolkit = new GenomeAnalysisEngine();
        toolkit.setGenomeLocParser(new GenomeLocParser(new CachingIndexedFastaSequenceFile(new File(BaseTest.hg19Reference))));

        // Attempting to use the legacy -L "interval1;interval2" syntax should produce an exception:
        IntervalBinding<Feature> binding = new IntervalBinding<Feature>("1;2");
        binding.getIntervals(toolkit);
    }
View Full Code Here

    @DataProvider(name="invalidIntervalTestData")
    public Object[][] invalidIntervalDataProvider() throws Exception {
        GATKArgumentCollection argCollection = new GATKArgumentCollection();
        File fastaFile = new File(publicTestDir + "exampleFASTA.fasta");
        GenomeLocParser genomeLocParser = new GenomeLocParser(new IndexedFastaSequenceFile(fastaFile));

        return new Object[][] {
                new Object[] {argCollection, genomeLocParser, "chr1", 10000000, 20000000},
                new Object[] {argCollection, genomeLocParser, "chr2", 1, 2},
                new Object[] {argCollection, genomeLocParser, "chr1", -1, 50}
View Full Code Here

    private GenomeLoc loc;

    @BeforeClass
    public void beforeClass() {
        header = ArtificialSAMUtils.createArtificialSamHeader(1, 1, 1000);
        genomeLocParser = new GenomeLocParser(header.getSequenceDictionary());
        loc = genomeLocParser.createGenomeLoc("chr1", 1);
    }
View Full Code Here

    @BeforeClass
    public void init() throws FileNotFoundException {
        // sequence
        seq = new CachingIndexedFastaSequenceFile(new File(hg18Reference));
        genomeLocParser = new GenomeLocParser(seq);
        // disable auto-index creation/locking in the RMDTrackBuilder for tests
        builder = new RMDTrackBuilder(seq.getSequenceDictionary(),genomeLocParser,null,true,null);
    }
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.