public abstract class BCFRecordWriter<K> extends org.apache.hadoop.mapreduce.RecordWriter<K,VariantContextWritable>
RecordWriter for compressed BCF.
Handles the output stream, writing the header if requested, and provides
the writeRecord(htsjdk.variant.variantcontext.VariantContext) function for subclasses.
| Constructor and Description |
|---|
BCFRecordWriter(OutputStream output,
htsjdk.variant.vcf.VCFHeader header,
boolean writeHeader) |
BCFRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
A VCF header is read from the input Path, which should refer to a VCF or
BCF file.
|
BCFRecordWriter(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) |
void |
setInputHeader(htsjdk.variant.vcf.VCFHeader header)
Used for lazy decoding of genotype data.
|
protected void |
writeRecord(htsjdk.variant.variantcontext.VariantContext vc) |
public BCFRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic BCFRecordWriter(org.apache.hadoop.fs.Path output,
htsjdk.variant.vcf.VCFHeader header,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic BCFRecordWriter(OutputStream output, htsjdk.variant.vcf.VCFHeader header, boolean writeHeader) throws IOException
IOExceptionpublic 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.