BrefWriter, java.io.Closeable, java.lang.AutoCloseablepublic class CompressBref3Writer extends java.lang.Object implements BrefWriter
Class CompressBref3Writer writes phased, non-missing genotypes
to a binary reference format v3 (bref) file.
The close() method must be called after the last invocation of
the write() method in order to ensure that all buffered
data is written to the output binary reference file.
Instances of class CompressBrerf3Writer are not thread-safe.
| Constructor | Description |
|---|---|
CompressBref3Writer(java.lang.String program,
Samples samples,
int maxNSeq,
java.io.File brefFile) |
Constructs a new
CompressBref3fWriter for the specified data. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Flushes any buffered output and releases any system resources that are
held by this
BrefWriter. |
Samples |
samples() |
Returns the list of samples.
|
void |
write(RefGTRec rec) |
Writes the specified phased genotype data in binary reference format.
|
public CompressBref3Writer(java.lang.String program,
Samples samples,
int maxNSeq,
java.io.File brefFile)
CompressBref3fWriter for the specified data.
The Java virtual machine will exit with an error message if an I/O
error occurs.program - the name of the program which is creating the
binary reference file.samples - the list of samples whose genotype data will
be written in binary reference formatmaxNSeq - the maximum number of distinct allele sequences
in a compressed blockbrefFile - name of the output binary reference file or
null if the output should be directed to standard outputjava.lang.IllegalArgumentException - maxNSeq < 0 || maxNSeq >= Chracter.MAX_VALUEjava.lang.NullPointerException - if program == null || samples == nullpublic Samples samples()
BrefWritersamples in interface BrefWriterpublic void write(RefGTRec rec)
BrefWriterthis.close()
has previously been invoked, or if
rec.samples().equals(this.samples()) == false.write in interface BrefWriterrec - phased genotype datapublic void close()
BrefWriterBrefWriter. The Java virtual machine will exit
with an error message if an I/O error occurs during method execution.close in interface java.lang.AutoCloseableclose in interface BrefWriterclose in interface java.io.Closeable