public abstract class CRAMRecordWriter<K> extends org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable>
RecordWriter for CRAM records.
Handles the output stream, writing the header if requested, and provides
the writeAlignment(htsjdk.samtools.SAMRecord) function for subclasses.
Note that each file created by this class consists of a fragment of a complete CRAM file containing only one or more CRAM containers that do not include a CRAM file header, a SAMFileHeader, or a CRAM EOF container.
| Constructor and Description |
|---|
CRAMRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
A SAMFileHeader is read from the input Path.
|
CRAMRecordWriter(org.apache.hadoop.fs.Path output,
htsjdk.samtools.SAMFileHeader header,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext ctx) |
protected void |
writeAlignment(htsjdk.samtools.SAMRecord rec) |
public CRAMRecordWriter(org.apache.hadoop.fs.Path output,
org.apache.hadoop.fs.Path input,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic CRAMRecordWriter(org.apache.hadoop.fs.Path output,
htsjdk.samtools.SAMFileHeader header,
boolean writeHeader,
org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
IOExceptionpublic void close(org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable>IOExceptionprotected void writeAlignment(htsjdk.samtools.SAMRecord rec)
Copyright © 2016. All rights reserved.