Package htsjdk.tribble.index.tabix
Class TabixIndexMerger
- java.lang.Object
-
- htsjdk.samtools.IndexMerger<TabixIndex>
-
- htsjdk.tribble.index.tabix.TabixIndexMerger
-
public class TabixIndexMerger extends IndexMerger<TabixIndex>
Merges tabix files for parts of a VCF file that have been concatenated. A partitioned VCF is a directory containing the following files:- A file named header containing all header bytes in VCF format.
- Zero or more files named part-00000, part-00001, ... etc, containing a list of VCF records.
- A file named terminator containing a BGZF end-of-file marker block (only if the VCF is bgzip-compressed).
- Parts and their indexes may be written in parallel, since one part file can be written independently of the others.
- A VCF file can be created from a partitioned VCF file by concatenating all the non-hidden files (header, part-00000, part-00001, ..., terminator).
- A VCF index can be created from a partitioned VCF file by merging all of the hidden files with a .tbi suffix. Note that this is not a simple file concatenation operation. See
TabixIndexMerger
.
-
-
Field Summary
-
Fields inherited from class htsjdk.samtools.IndexMerger
out, partLengths
-
-
Constructor Summary
Constructors Constructor Description TabixIndexMerger(OutputStream out, long headerLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish(long dataFileLength)
Finish merging the indexes, and close the output stream.void
processIndex(TabixIndex index, long partLength)
Process the next index and add to the merged index.
-
-
-
Constructor Detail
-
TabixIndexMerger
public TabixIndexMerger(OutputStream out, long headerLength)
-
-
Method Detail
-
processIndex
public void processIndex(TabixIndex index, long partLength)
Description copied from class:IndexMerger
Process the next index and add to the merged index.- Specified by:
processIndex
in classIndexMerger<TabixIndex>
- Parameters:
index
- the index to mergepartLength
- the length of the part file corresponding to the index, in bytes.
-
finish
public void finish(long dataFileLength) throws IOException
Description copied from class:IndexMerger
Finish merging the indexes, and close the output stream.- Specified by:
finish
in classIndexMerger<TabixIndex>
- Parameters:
dataFileLength
- the length of the total data file, in bytes.- Throws:
IOException
- if an error occurs
-
-