-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public abstract class BigFile<T extends Object> implements Closeable
A common superclass for Big files.
Supported format versions
3 full support 4 partial support, specifically, extra indices aren't supported 5 custom version, requires Snappy instead of DEFLATE for compressed data blocks
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBigFile.Companionpublic enumBigFile.Type
-
Field Summary
Fields Modifier and Type Field Description private final BigSummarytotalSummaryprivate final TIntObjectMap<String>chromosomesprivate final CompressionTypecompressionprivate final Stringsource
-
Method Summary
Modifier and Type Method Description final List<BigSummary>summarize(String name, Integer startOffset, Integer endOffset, Integer numBins, Boolean index, Function0<Unit> cancelledChecker)Splits the interval [startOffset, endOffset)intonumBinsnon-intersecting sub-intervals (aka bins) and computes a summary of the data values for each bin.final List<T>query(String name, Integer startOffset, Integer endOffset, Boolean overlaps, Function0<Unit> cancelledChecker)Queries an R+-tree. Unitclose()final BigSummarygetTotalSummary()Whole-file summary. final TIntObjectMap<String>getChromosomes()An in-memory mapping of chromosome IDs to chromosome names. final CompressionTypegetCompression()final StringgetSource()-
-
Method Detail
-
summarize
final List<BigSummary> summarize(String name, Integer startOffset, Integer endOffset, Integer numBins, Boolean index, Function0<Unit> cancelledChecker)
Splits the interval
[startOffset, endOffset)intonumBinsnon-intersecting sub-intervals (aka bins) and computes a summary of the data values for each bin.- Parameters:
name- human-readable chromosome name, e.g.startOffset- 0-based start offset (inclusive).endOffset- 0-based end offset (exclusive), if 0 than the whole chromosome is used.numBins- number of summaries to compute.index- iftruepre-computed is index is used if possible.cancelledChecker- Throw cancelled exception to abort operation
-
query
@JvmOverloads() final List<T> query(String name, Integer startOffset, Integer endOffset, Boolean overlaps, Function0<Unit> cancelledChecker)
Queries an R+-tree.
- Parameters:
name- human-readable chromosome name, e.g.startOffset- 0-based start offset (inclusive).endOffset- 0-based end offset (exclusive), if 0 than the whole chromosome is used.overlaps- iffalsethe resulting list contains only the items completely contained within the query, otherwise it also includes the items overlapping the query.cancelledChecker- Throw cancelled exception to abort operation
-
getTotalSummary
final BigSummary getTotalSummary()
Whole-file summary.
-
getChromosomes
final TIntObjectMap<String> getChromosomes()
An in-memory mapping of chromosome IDs to chromosome names.
Because sometimes (always) you don't need a B+ tree for that.
-
getCompression
final CompressionType getCompression()
-
-
-
-