Examples of SAMException


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

Examples of htsjdk.samtools.SAMException

        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

Examples of net.sf.samtools.SAMException

            "CRAM index is not compatible with BAM files.");

      SAMFileReader reader = new SAMFileReader(params.inputFile);
      if (!reader.isBinary()) {
        reader.close();
        throw new SAMException(
            "Input file must be bam file, not sam file.");
      }

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

      File indexFile = new File(params.inputFile.getAbsolutePath()
          + ".bai");
View Full Code Here

Examples of net.sf.samtools.SAMException

      buf.putInt(array.length);
      for (final float element : array)
        buf.putFloat(element);

    } else
      throw new SAMException("Unrecognized array value type: "
          + value.getClass());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.