public class BAMRecordCodec extends java.lang.Object implements SortingCollection.Codec<SAMRecord>
| Constructor and Description |
|---|
BAMRecordCodec(SAMFileHeader header) |
BAMRecordCodec(SAMFileHeader header,
SAMRecordFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
BAMRecordCodec |
clone()
Must return a cloned copy of the codec that can be used independently of
the original instance.
|
SAMRecord |
decode()
Read the next record from the input stream and convert into a java object.
|
void |
encode(SAMRecord alignment)
Write object to OutputStream.
|
static Cigar |
makeSentinelCigar(Cigar cigar)
Create a "Sentinel" cigar that will be placed in BAM file when the actual cigar has more than 0xffff operator,
which are not supported by the bam format.
|
void |
setInputStream(java.io.InputStream is)
Sets the input stream that records will be read from.
|
void |
setInputStream(java.io.InputStream is,
java.lang.String filename)
Sets the input stream that records will be read from.
|
void |
setOutputStream(java.io.OutputStream os)
Sets the output stream that records will be written to.
|
void |
setOutputStream(java.io.OutputStream os,
java.lang.String filename)
Sets the output stream that records will be written to.
|
public BAMRecordCodec(SAMFileHeader header)
public BAMRecordCodec(SAMFileHeader header, SAMRecordFactory factory)
public BAMRecordCodec clone()
SortingCollection.Codecclone in interface SortingCollection.Codec<SAMRecord>clone in class java.lang.Objectpublic void setOutputStream(java.io.OutputStream os)
setOutputStream in interface SortingCollection.Codec<SAMRecord>public void setOutputStream(java.io.OutputStream os,
java.lang.String filename)
public void setInputStream(java.io.InputStream is)
setInputStream in interface SortingCollection.Codec<SAMRecord>public void setInputStream(java.io.InputStream is,
java.lang.String filename)
public void encode(SAMRecord alignment)
encode in interface SortingCollection.Codec<SAMRecord>alignment - Record to be written.public static Cigar makeSentinelCigar(Cigar cigar)
cigar - actual cigar to create sentinel cigar forpublic SAMRecord decode()
decode in interface SortingCollection.Codec<SAMRecord>