public class KeyIgnoringVCFOutputFormat<K> extends VCFOutputFormat<K>
A VCFHeader must be provided via setHeader(htsjdk.variant.vcf.VCFHeader) or readHeaderFrom(org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileSystem) before getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext) is called.
By default, writes the VCF header to the output file(s). This can be disabled, because in distributed usage one often ends up with (and, for decent performance, wants to end up with) the output split into multiple parts, which are easier to concatenate if the header is not present in each file.
| Modifier and Type | Field and Description |
|---|---|
protected htsjdk.variant.vcf.VCFHeader |
header |
static String |
WRITE_HEADER_PROPERTY
Whether the header will be written, defaults to true.
|
format, OUTPUT_VCF_FORMAT_PROPERTY| Constructor and Description |
|---|
KeyIgnoringVCFOutputFormat(org.apache.hadoop.conf.Configuration conf) |
KeyIgnoringVCFOutputFormat(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path) |
KeyIgnoringVCFOutputFormat(VCFFormat fmt) |
| Modifier and Type | Method and Description |
|---|---|
htsjdk.variant.vcf.VCFHeader |
getHeader() |
org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
setHeader or readHeaderFrom must have been
called first. |
org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx,
org.apache.hadoop.fs.Path out) |
void |
readHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs) |
void |
readHeaderFrom(htsjdk.samtools.seekablestream.SeekableStream in) |
void |
setHeader(htsjdk.variant.vcf.VCFHeader header) |
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPathprotected htsjdk.variant.vcf.VCFHeader header
public static final String WRITE_HEADER_PROPERTY
public KeyIgnoringVCFOutputFormat(VCFFormat fmt)
public KeyIgnoringVCFOutputFormat(org.apache.hadoop.conf.Configuration conf)
public KeyIgnoringVCFOutputFormat(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
public htsjdk.variant.vcf.VCFHeader getHeader()
public void setHeader(htsjdk.variant.vcf.VCFHeader header)
public void readHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs)
throws IOException
IOExceptionpublic void readHeaderFrom(htsjdk.samtools.seekablestream.SeekableStream in)
throws IOException
IOExceptionpublic org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx) throws IOException
setHeader or readHeaderFrom must have been
called first.getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,VariantContextWritable>IOExceptionpublic org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx, org.apache.hadoop.fs.Path out) throws IOException
IOExceptionCopyright © 2016. All rights reserved.