public class KeyIgnoringCRAMOutputFormat<K> extends CRAMOutputFormat<K>
A SAMFileHeader must be provided via setSAMHeader(htsjdk.samtools.SAMFileHeader) or
readSAMHeaderFrom(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration) before getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext) is called.
By default, writes the SAM 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.samtools.SAMFileHeader |
header |
| Constructor and Description |
|---|
KeyIgnoringCRAMOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx)
setSAMHeader or readSAMHeaderFrom must have
been called first. |
org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx,
org.apache.hadoop.fs.Path out) |
htsjdk.samtools.SAMFileHeader |
getSAMHeader() |
boolean |
getWriteHeader()
Whether the header will be written or not.
|
void |
readSAMHeaderFrom(InputStream in,
org.apache.hadoop.conf.Configuration conf) |
void |
readSAMHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
void |
setSAMHeader(htsjdk.samtools.SAMFileHeader header) |
void |
setWriteHeader(boolean b)
Set whether the header will be written or not.
|
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPathpublic boolean getWriteHeader()
public void setWriteHeader(boolean b)
public htsjdk.samtools.SAMFileHeader getSAMHeader()
public void setSAMHeader(htsjdk.samtools.SAMFileHeader header)
public void readSAMHeaderFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionpublic void readSAMHeaderFrom(InputStream in, org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx) throws IOException
setSAMHeader or readSAMHeaderFrom must have
been called first.getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,SAMRecordWritable>IOExceptionpublic org.apache.hadoop.mapreduce.RecordWriter<K,SAMRecordWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext ctx, org.apache.hadoop.fs.Path out) throws IOException
IOExceptionCopyright © 2017. All rights reserved.