-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class TdfFile implements Closeable
A Tiled Data Format (TDF) reader.
TDF format is a binary format for track data designed by IGV team for their browser.
TDF lacks an accurate and complete spec, thus the implementation is based on the high-level format overview in
notes.txtand the sources of IGV itself.See https://github.com/igvteam/igv/blob/master/src/org/broad/igv/tdf/notes.txt. See https://www.broadinstitute.org/software/igv/TDF.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTdfFile.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integerversionprivate final Set<String>dataSetNamesprivate final Set<String>groupNamesprivate final Stringsourceprivate final List<WindowFunction>windowFunctionsprivate final TrackTypetrackTypeprivate final StringtrackLineprivate final List<String>trackNamesprivate final Stringbuildprivate final Booleancompressed
-
Method Summary
Modifier and Type Method Description final List<TdfTile>query(TdfDataset dataset, Integer startOffset, Integer endOffset, Function0<Unit> cancelledChecker)Returns a list of dataset tiles overlapping a given interval. final TdfSummarysummarize(String chromosome, Integer startOffset, Integer endOffset, Integer zoom, Function0<Unit> cancelledChecker)Returns a summary of the data within a given interval. final TdfTilegetTile(TdfDataset ds, Integer tileNumber)final TdfDatasetgetDataset(String chromosome, Integer zoom, WindowFunction windowFunction)final TdfGroupgetGroup(String name)Unitclose()final Stringcomponent1()final List<WindowFunction>component5()final TrackTypecomponent6()final Stringcomponent7()final List<String>component8()final Stringcomponent9()final Booleancomponent10()final TdfFilecopy(String source, RomBufferFactory buffFactory, TdfFile.Header header, TdfMasterIndex index, List<WindowFunction> windowFunctions, TrackType trackType, String trackLine, List<String> trackNames, String build, Boolean compressed)final IntegergetVersion()final Set<String>getDataSetNames()final Set<String>getGroupNames()final StringgetSource()final List<WindowFunction>getWindowFunctions()Window functions supported by the data, e.g. final TrackTypegetTrackType()Data type, e.g. final StringgetTrackLine()Track description, see BED format spec for details. final List<String>getTrackNames()Human-readable track names. final StringgetBuild()Genome build, e.g. final BooleangetCompressed()Whether the data sections are compressed with DEFLATE. -
-
Method Detail
-
query
final List<TdfTile> query(TdfDataset dataset, Integer startOffset, Integer endOffset, Function0<Unit> cancelledChecker)
Returns a list of dataset tiles overlapping a given interval.
- Parameters:
dataset- dataset to query.startOffset- 0-based start offset.endOffset- 0-based end offset.cancelledChecker- Throw cancelled exception to abort operation
-
summarize
final TdfSummary summarize(String chromosome, Integer startOffset, Integer endOffset, Integer zoom, Function0<Unit> cancelledChecker)
Returns a summary of the data within a given interval.
-
getTile
final TdfTile getTile(TdfDataset ds, Integer tileNumber)
-
getDataset
@JvmOverloads() final TdfDataset getDataset(String chromosome, Integer zoom, WindowFunction windowFunction)
-
component1
final String component1()
-
component5
final List<WindowFunction> component5()
-
component6
final TrackType component6()
-
component7
final String component7()
-
component8
final List<String> component8()
-
component9
final String component9()
-
component10
final Boolean component10()
-
copy
final TdfFile copy(String source, RomBufferFactory buffFactory, TdfFile.Header header, TdfMasterIndex index, List<WindowFunction> windowFunctions, TrackType trackType, String trackLine, List<String> trackNames, String build, Boolean compressed)
-
getVersion
final Integer getVersion()
-
getDataSetNames
final Set<String> getDataSetNames()
-
getGroupNames
final Set<String> getGroupNames()
-
getWindowFunctions
final List<WindowFunction> getWindowFunctions()
Window functions supported by the data, e.g.
"mean".
-
getTrackType
final TrackType getTrackType()
Data type, e.g.
"GENE_EXPRESSION".
-
getTrackLine
final String getTrackLine()
Track description, see BED format spec for details.
-
getTrackNames
final List<String> getTrackNames()
Human-readable track names.
-
getCompressed
final Boolean getCompressed()
Whether the data sections are compressed with DEFLATE.
-
-
-
-