public class CRAMFileWriter extends SAMFileWriterImpl
| Constructor and Description |
|---|
CRAMFileWriter(OutputStream outputStream,
CRAMReferenceSource referenceSource,
SAMFileHeader samFileHeader,
String fileName)
Create a CRAMFileWriter on an output stream.
|
CRAMFileWriter(OutputStream outputStream,
OutputStream indexOS,
boolean presorted,
CRAMReferenceSource referenceSource,
SAMFileHeader samFileHeader,
String fileName)
Create a CRAMFileWriter and optional index on output streams.
|
CRAMFileWriter(OutputStream outputStream,
OutputStream indexOS,
CRAMReferenceSource referenceSource,
SAMFileHeader samFileHeader,
String fileName)
Create a CRAMFileWriter and optional index on output streams.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finish()
Do any required flushing here.
|
Set<String> |
getCaptureTags() |
protected String |
getFilename()
For producing error messages.
|
Set<String> |
getIgnoreTags() |
List<PreservationPolicy> |
getPreservationPolicies() |
boolean |
isCaptureAllTags() |
boolean |
isPreserveReadNames() |
void |
setCaptureAllTags(boolean captureAllTags) |
void |
setCaptureTags(Set<String> captureTags) |
void |
setIgnoreTags(Set<String> ignoreTags) |
void |
setPreserveReadNames(boolean preserveReadNames) |
protected void |
writeAlignment(SAMRecord alignment)
Write an alignment record.
|
protected void |
writeHeader(String textHeader)
Write the header to disk.
|
addAlignment, close, getDefaultMaxRecordsInRam, getFileHeader, getSortOrder, setDefaultMaxRecordsInRam, setHeader, setProgressLogger, setSortOrderpublic CRAMFileWriter(OutputStream outputStream, CRAMReferenceSource referenceSource, SAMFileHeader samFileHeader, String fileName)
samFileHeader.outputStream - where to write the output. Can not be null.referenceSource - reference source. Can not be null.samFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.fileName - used for display in error messagesIllegalArgumentException - if the outputStream, referenceSource or samFileHeader are nullpublic CRAMFileWriter(OutputStream outputStream, OutputStream indexOS, CRAMReferenceSource referenceSource, SAMFileHeader samFileHeader, String fileName)
samFileHeader.outputStream - where to write the output. Can not be null.indexOS - where to write the output index. Can be null if no index is required.referenceSource - reference sourcesamFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.fileName - used for display in error messagesIllegalArgumentException - if the outputStream, referenceSource or samFileHeader are nullpublic CRAMFileWriter(OutputStream outputStream, OutputStream indexOS, boolean presorted, CRAMReferenceSource referenceSource, SAMFileHeader samFileHeader, String fileName)
outputStream - where to write the output. Can not be null.indexOS - where to write the output index. Can be null if no index is required.presorted - if true records written to this writer must already be sorted in the order specified by the headerreferenceSource - reference sourcesamFileHeader - SAMFileHeader to be used. Can not be null. Sort order is determined by the sortOrder property of this arg.fileName - used for display in error message displayIllegalArgumentException - if the outputStream, referenceSource or samFileHeader are nullprotected void writeAlignment(SAMRecord alignment)
writeAlignment in class SAMFileWriterImplalignment - must not be null and must have a valid SAMFileHeader.protected void writeHeader(String textHeader)
SAMFileWriterImplwriteHeader in class SAMFileWriterImpltextHeader - for convenience if the implementation needs it.protected void finish()
SAMFileWriterImplfinish in class SAMFileWriterImplprotected String getFilename()
SAMFileWriterImplgetFilename in class SAMFileWriterImplpublic boolean isPreserveReadNames()
public void setPreserveReadNames(boolean preserveReadNames)
public List<PreservationPolicy> getPreservationPolicies()
public boolean isCaptureAllTags()
public void setCaptureAllTags(boolean captureAllTags)