Package org.broad.igv.sam.reader

Examples of org.broad.igv.sam.reader.BAMFileReader


        String chr = "chr1";
        int end = 300000000;
        int start = end / 5;
        int stopafter = 10;
        int counter = 0;
        BAMFileReader bamreader = new BAMFileReader(new File(bamfile));
        CloseableIterator<PicardAlignment> bamiter = bamreader.query(chr, start, end, true);
        while (bamiter.hasNext()) {
            Alignment bamrecord = bamiter.next();
            if (counter >= stopafter) {
                break;
            } else {
                counter++;
            }
        }
        bamreader.close();
        boolean closeSucceeded = false;
        try {
            CloseableIterator<PicardAlignment> bamiter2 = bamreader.query(chr, start, end, true);
        } catch (NullPointerException npe) {
            closeSucceeded = true;
        }
        assertTrue(closeSucceeded);
View Full Code Here


        String samfile = TestUtils.LARGE_DATA_DIR + "HG00171.hg18.sam";
        String chr = "chr1";
        int end = 300000000;
        int start = end / 5;

        BAMFileReader bamreader = new BAMFileReader(new File(bamfile));
        SAMReader samreader = new SAMReader(samfile);
        CloseableIterator<PicardAlignment> bamiter = bamreader.query(chr, start, end, true);
        CloseableIterator<PicardAlignment> samiter = samreader.iterator();
        int count = 0;
        while (bamiter.hasNext()) {
            Alignment bamrecord = bamiter.next();
            Alignment samrecord = samiter.next();
View Full Code Here

TOP

Related Classes of org.broad.igv.sam.reader.BAMFileReader

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.