/** * Sets the input stream that records will be read from. */ public void setInputStream(final InputStream is, final String filename) { this.binaryCodec.setInputStream(is); this.binaryCodec.setInputFileName(filename); }
/** * Sets the input stream that records will be read from. */ public void setInputStream(final InputStream is, final String filename) { this.binaryCodec.setInputStream(is); this.binaryCodec.setInputFileName(filename); }
/** Sets the input stream that records will be read from. */ public void setInputStream(final InputStream is, final String filename) { this.binaryCodec.setInputStream(is); this.binaryCodec.setInputFileName(filename); }
/** * Sets the input stream that records will be read from. */ public void setInputStream(final InputStream is, final String filename) { this.binaryCodec.setInputStream(is); this.binaryCodec.setInputFileName(filename); }
/** * Prepare to read BAM from a file (seekable) * @param file source of bytes. * @param eagerDecode if true, decode all BAM fields as reading rather than lazily. * @param validationStringency Controls how to handle invalidate reads or header lines. */ BAMFileReader(final File file, final File indexFile, final boolean eagerDecode, final ValidationStringency validationStringency, final SAMRecordFactory factory) throws IOException { this(new BlockCompressedInputStream(file), indexFile!=null ? indexFile : SamFiles.findIndex(file), eagerDecode, file.getAbsolutePath(), validationStringency, factory); if (mIndexFile != null && mIndexFile.lastModified() < file.lastModified()) { System.err.println("WARNING: BAM index file " + mIndexFile.getAbsolutePath() + " is older than BAM " + file.getAbsolutePath()); } // Provide better error message when there is an error reading. mStream.setInputFileName(file.getAbsolutePath()); }
/** * Prepare to read BAM from a file (seekable) * @param file source of bytes. * @param indexFile BAM index file * @param eagerDecode if true, decode all BAM fields as reading rather than lazily. * @param useAsynchronousIO if true, use asynchronous I/O * @param validationStringency Controls how to handle invalidate reads or header lines. * @param samRecordFactory SAM record factory * @param inflaterFactory InflaterFactory used by BlockCompressedInputStream * @throws IOException */ BAMFileReader(final File file, final File indexFile, final boolean eagerDecode, final boolean useAsynchronousIO, final ValidationStringency validationStringency, final SAMRecordFactory samRecordFactory, final InflaterFactory inflaterFactory) throws IOException { this(useAsynchronousIO ? new AsyncBlockCompressedInputStream(file, inflaterFactory) : new BlockCompressedInputStream(file, inflaterFactory), indexFile!=null ? indexFile : SamFiles.findIndex(file), eagerDecode, useAsynchronousIO, file.getAbsolutePath(), validationStringency, samRecordFactory); if (mIndexFile != null && mIndexFile.lastModified() < file.lastModified()) { System.err.println("WARNING: BAM index file " + mIndexFile.getAbsolutePath() + " is older than BAM " + file.getAbsolutePath()); } // Provide better error message when there is an error reading. mStream.setInputFileName(file.getAbsolutePath()); }
/** * Prepare to read BAM from a file (seekable) * @param file source of bytes. * @param indexFile BAM index file * @param eagerDecode if true, decode all BAM fields as reading rather than lazily. * @param useAsynchronousIO if true, use asynchronous I/O * @param validationStringency Controls how to handle invalidate reads or header lines. * @param samRecordFactory SAM record factory * @param inflaterFactory InflaterFactory used by BlockCompressedInputStream * @throws IOException */ BAMFileReader(final File file, final File indexFile, final boolean eagerDecode, final boolean useAsynchronousIO, final ValidationStringency validationStringency, final SAMRecordFactory samRecordFactory, final InflaterFactory inflaterFactory) throws IOException { this(useAsynchronousIO ? new AsyncBlockCompressedInputStream(file, inflaterFactory) : new BlockCompressedInputStream(file, inflaterFactory), indexFile!=null ? indexFile : SamFiles.findIndex(file), eagerDecode, useAsynchronousIO, file.getAbsolutePath(), validationStringency, samRecordFactory); if (mIndexFile != null && mIndexFile.lastModified() < file.lastModified()) { System.err.println("WARNING: BAM index file " + mIndexFile.getAbsolutePath() + " is older than BAM " + file.getAbsolutePath()); } // Provide better error message when there is an error reading. mStream.setInputFileName(file.getAbsolutePath()); }
/** * Prepare to read BAM from a file (seekable) * @param file source of bytes. * @param indexFile BAM index file * @param eagerDecode if true, decode all BAM fields as reading rather than lazily. * @param useAsynchronousIO if true, use asynchronous I/O * @param validationStringency Controls how to handle invalidate reads or header lines. * @param samRecordFactory SAM record factory * @param inflaterFactory InflaterFactory used by BlockCompressedInputStream * @throws IOException */ BAMFileReader(final File file, final File indexFile, final boolean eagerDecode, final boolean useAsynchronousIO, final ValidationStringency validationStringency, final SAMRecordFactory samRecordFactory, final InflaterFactory inflaterFactory) throws IOException { this(useAsynchronousIO ? new AsyncBlockCompressedInputStream(file, inflaterFactory) : new BlockCompressedInputStream(file, inflaterFactory), indexFile!=null ? indexFile : SamFiles.findIndex(file), eagerDecode, useAsynchronousIO, file.getAbsolutePath(), validationStringency, samRecordFactory); if (mIndexFile != null && mIndexFile.lastModified() < file.lastModified()) { System.err.println("WARNING: BAM index file " + mIndexFile.getAbsolutePath() + " is older than BAM " + file.getAbsolutePath()); } // Provide better error message when there is an error reading. mStream.setInputFileName(file.getAbsolutePath()); }