/** * If true, uses the caching version of the index reader. * @param enabled true to use the caching version of the reader. */ @Override protected void enableIndexCaching(final boolean enabled) { if(mIndex != null) throw new SAMException("Unable to turn on index caching; index file has already been loaded."); this.mEnableIndexCaching = enabled; }
@Test(dataProvider = "pathsForWritableDirectory") public void testAssertDirectoryIsWritablePath(final Path path, final boolean writable) { try { IOUtil.assertDirectoryIsWritable(path); } catch (SAMException e) { if (writable) { Assert.fail(e.getMessage()); } } }
public String md5() { if(hash == null) { throw new SAMException("Attempting to access md5 digest before the entire file is read! Call close first."); } return hash; }
private void validatePositive(final String attributeName, final int attribute) { if (attribute <= 0) { throw new SAMException(attributeName + " is not positive: " + attribute + " for chain " + id); } }
/** * If true, uses the caching version of the index reader. * @param enabled true to use the caching version of the reader. */ @Override protected void enableIndexCaching(final boolean enabled) { if(mIndex != null) throw new SAMException("Unable to turn on index caching; index file has already been loaded."); this.mEnableIndexCaching = enabled; }
private void validatePositive(final String attributeName, final int attribute) { if (attribute <= 0) { throw new SAMException(attributeName + " is not positive: " + attribute + " for chain " + id); } }
private void validateNonNegative(final String attributeName, final int attribute) { if (attribute < 0) { throw new SAMException(attributeName + " is negative: " + attribute + " for chain " + id); } }
public String md5() { if(hash == null) { throw new SAMException("Attempting to access md5 digest before the entire file is read! Call close first."); } return hash; }
public String md5() { if(hash == null) { throw new SAMException("Attempting to access md5 digest before the entire file is written! Call close first."); } return hash; }
public InsertSizeFilter(final int minInsertSize, final int maxInsertSize) { if (minInsertSize > maxInsertSize) throw new SAMException("Cannot have minInsertSize > maxInsertSize"); this.minInsertSize = minInsertSize; this.maxInsertSize = maxInsertSize; }
/** * If false, disable the use of memory mapping for accessing index files (default behavior is to use memory mapping). * This is slower but more scalable when accessing large numbers of BAM files sequentially. * @param enabled True to use memory mapping, false to use regular I/O. */ @Override protected void enableIndexMemoryMapping(final boolean enabled) { if (mIndex != null) { throw new SAMException("Unable to change index memory mapping; index file has already been loaded."); } this.mEnableIndexMemoryMapping = enabled; }
/** * If false, disable the use of memory mapping for accessing index files (default behavior is to use memory mapping). * This is slower but more scalable when accessing large numbers of BAM files sequentially. * @param enabled True to use memory mapping, false to use regular I/O. */ protected void enableIndexMemoryMapping(final boolean enabled) { if (mIndex != null) { throw new SAMException("Unable to change index memory mapping; index file has already been loaded."); } this.mEnableIndexMemoryMapping = enabled; }
private void validateNonNegative(final String attributeName, final int attribute) { if (attribute < 0) { throw new SAMException(attributeName + " is negative: " + attribute + " for chain " + id); } }
public String md5() { if(hash == null) { throw new SAMException("Attempting to access md5 digest before the entire file is written! Call close first."); } return hash; }
/** * If false, disable the use of memory mapping for accessing index files (default behavior is to use memory mapping). * This is slower but more scalable when accessing large numbers of BAM files sequentially. * @param enabled True to use memory mapping, false to use regular I/O. */ @Override protected void enableIndexMemoryMapping(final boolean enabled) { if (mIndex != null) { throw new SAMException("Unable to change index memory mapping; index file has already been loaded."); } this.mEnableIndexMemoryMapping = enabled; }
public String md5() { if(hash == null) { throw new SAMException("Attempting to access md5 digest before the entire file is read! Call close first."); } return hash; }
/** * If true, uses the caching version of the index reader. * @param enabled true to write source information into each SAMRecord. */ protected void enableIndexCaching(final boolean enabled) { if(mIndex != null) throw new SAMException("Unable to turn on index caching; index file has already been loaded."); this.mEnableIndexCaching = enabled; }
@Override public Interval clone() { try { return (Interval) super.clone(); } catch (CloneNotSupportedException cnse) { throw new SAMException("That's unpossible", cnse); } }
@Override public Interval clone() { try { return (Interval) super.clone(); } catch (CloneNotSupportedException cnse) { throw new SAMException("That's unpossible", cnse); } } }
/** Parses a String into a date. */ public Date parseDate(String value) { try { return this.dateFormat.parse(value); } catch (ParseException pe) { throw new SAMException("Could not parse value as date: " + value, pe); } }