Package org.broadinstitute.gatk.utils.fasta

Examples of org.broadinstitute.gatk.utils.fasta.CachingIndexedFastaSequenceFile


        Assert.assertEquals(loc.getStop(), feature.getEnd());
    }

    @Test
    public void testcreateGenomeLocOnContig() throws FileNotFoundException {
        final CachingIndexedFastaSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(b37KGReference));
        final SAMSequenceDictionary dict = seq.getSequenceDictionary();
        final GenomeLocParser genomeLocParser = new GenomeLocParser(dict);

        for ( final SAMSequenceRecord rec : dict.getSequences() ) {
            final GenomeLoc loc = genomeLocParser.createOverEntireContig(rec.getSequenceName());
            Assert.assertEquals(loc.getContig(), rec.getSequenceName());
View Full Code Here


    RMDTrackBuilder builder = null;

    @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

    private GenomeAnalysisEngine engine = null;

    @BeforeClass
    public void doOnce() {
        try {
            ref = new CachingIndexedFastaSequenceFile(refFile);
        }
        catch(FileNotFoundException ex) {
            throw new UserException.CouldNotReadInputFile(refFile,ex);
        }
        genomeLocParser = new GenomeLocParser(ref);
View Full Code Here

    private IndexedFastaSequenceFile seq;

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

    private File testBAM;

    @BeforeClass
    private void init() throws IOException {
        //reference = new CachingIndexedFastaSequenceFile(new File("/Users/depristo/Desktop/broadLocal/localData/human_g1k_v37.fasta")); // hg19Reference));
        reference = new CachingIndexedFastaSequenceFile(new File(hg19Reference));
        dictionary = reference.getSequenceDictionary();
        genomeLocParser = new GenomeLocParser(dictionary);

        // TODO: reads with indels
        // TODO: reads which span many regions
View Full Code Here

    /**
     * Initialize the fasta.
     */
    @BeforeClass
    public void initialize() throws FileNotFoundException {
        sequenceFile = new CachingIndexedFastaSequenceFile( new File(hg18Reference) );
        genomeLocParser = new GenomeLocParser(sequenceFile);
    }
View Full Code Here

    private GenomeLoc testInterval2; // an interval matching testSite2 -> testSite3 for queries


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

    @Test
    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);

        for (int i = 0; i < 3; i++) {
            // Ensure our tribble iterators are closed.
            CheckableCloseableTribbleIterator.clearThreadIterators();
            Assert.assertTrue(CheckableCloseableTribbleIterator.getThreadIterators().isEmpty(), "Tribble iterators list was not cleared.");
View Full Code Here

    @Argument(fullName = "dt", shortName = "dt", doc = "Enable downsampling", required = false)
    public boolean downsample = false;

    @Override
    public int execute() throws IOException {
        final IndexedFastaSequenceFile reference = new CachingIndexedFastaSequenceFile(referenceFile);
        final GenomeLocParser genomeLocParser = new GenomeLocParser(reference);

        final SAMFileReader reader = new SAMFileReader(samFile);
        reader.setSAMRecordFactory(new GATKSamRecordFactory());
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.fasta.CachingIndexedFastaSequenceFile

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.