public abstract class VCFRecordWriter<K> extends org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable>
RecordWriter for VCF.
Handles the output stream, writing the header if requested, and provides
the writeRecord(htsjdk.variant.variantcontext.VariantContext) function for subclasses.
| Constructor and Description |
|---|
VCFRecordWriter(OutputStream output,
htsjdk.variant.vcf.VCFHeader header,
boolean writeHeader) |
VCFRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
A VCFHeader is read from the input Path.
|
VCFRecordWriter(org.apache.hadoop.fs.Path output,
htsjdk.variant.vcf.VCFHeader header,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext ctx) |
protected htsjdk.variant.variantcontext.writer.VariantContextWriter |
createVariantContextWriter(org.apache.hadoop.conf.Configuration conf,
OutputStream out) |
void |
setInputHeader(htsjdk.variant.vcf.VCFHeader header)
Used for lazy decoding of genotype data.
|
protected void |
writeRecord(htsjdk.variant.variantcontext.VariantContext vc) |
public VCFRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic VCFRecordWriter(org.apache.hadoop.fs.Path output,
htsjdk.variant.vcf.VCFHeader header,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic VCFRecordWriter(OutputStream output, htsjdk.variant.vcf.VCFHeader header, boolean writeHeader) throws IOException
IOExceptionprotected htsjdk.variant.variantcontext.writer.VariantContextWriter createVariantContextWriter(org.apache.hadoop.conf.Configuration conf,
OutputStream out)
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable>IOExceptionpublic void setInputHeader(htsjdk.variant.vcf.VCFHeader header)
protected void writeRecord(htsjdk.variant.variantcontext.VariantContext vc)
Copyright © 2017. All rights reserved.