Package htsjdk.samtools

Examples of htsjdk.samtools.SAMException


            IOUtil.assertFileIsReadable(inputFile);
            bam = new SAMFileReader(inputFile);
        }

        if (!bam.isBinary()) {
            throw new SAMException("Input file must be bam file, not sam file.");
        }

        if (!bam.getFileHeader().getSortOrder().equals(SAMFileHeader.SortOrder.coordinate)) {
            throw new SAMException("Input bam file must be sorted by coordinates");
        }

        BAMIndexer.createIndex(bam, OUTPUT);

        log.info("Successfully wrote bam index file " + OUTPUT);
View Full Code Here


        program.SEQUENCE_DICTIONARY = new File(TEST_DATA_DIR, header);
        program.OUTPUT = outputFile;
        program.doWork();

        // Assert they are equal
        SAMException unexpectedException = null;
        try {
            IOUtil.assertFilesEqual(new File(inputBedFile.getAbsolutePath() + ".interval_list"), outputFile);
        } catch (final SAMException e) {
            unexpectedException = e;
        }
View Full Code Here

TOP

Related Classes of htsjdk.samtools.SAMException

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.