public class BamFileIoUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BAM_FILE_EXTENSION |
| Constructor and Description |
|---|
BamFileIoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
blockCopyBamFile(java.io.File inputFile,
java.io.OutputStream outputStream,
boolean skipHeader,
boolean skipTerminator)
Copy data from a BAM file to an OutputStream by directly copying the gzip blocks
|
static void |
gatherWithBlockCopying(java.util.List<java.io.File> bams,
java.io.File output,
boolean createIndex,
boolean createMd5)
Assumes that all inputs and outputs are block compressed VCF files and copies them without decompressing and parsing
most of the gzip blocks.
|
static boolean |
isBamFile(java.io.File file) |
static void |
reheaderBamFile(SAMFileHeader samFileHeader,
java.io.File inputFile,
java.io.File outputFile) |
static void |
reheaderBamFile(SAMFileHeader samFileHeader,
java.io.File inputFile,
java.io.File outputFile,
boolean createMd5,
boolean createIndex)
Copy a BAM file but replacing the header
|
public static final java.lang.String BAM_FILE_EXTENSION
public static boolean isBamFile(java.io.File file)
public static void reheaderBamFile(SAMFileHeader samFileHeader, java.io.File inputFile, java.io.File outputFile)
public static void reheaderBamFile(SAMFileHeader samFileHeader, java.io.File inputFile, java.io.File outputFile, boolean createMd5, boolean createIndex)
samFileHeader - The header to use in the new fileinputFile - The BAM file to copy, sans headeroutputFile - The new BAM file, constructed with the new header and the content from inputFilecreateMd5 - Whether or not to create an MD5 file for the new BAMcreateIndex - Whether or not to create an index file for the new BAMpublic static void blockCopyBamFile(java.io.File inputFile,
java.io.OutputStream outputStream,
boolean skipHeader,
boolean skipTerminator)
inputFile - The file to be copiedoutputStream - The stream to write the copied data toskipHeader - If true, the header of the input file will not be copied to the output streamskipTerminator - If true, the terminator block of the input file will not be written to the output streampublic static void gatherWithBlockCopying(java.util.List<java.io.File> bams,
java.io.File output,
boolean createIndex,
boolean createMd5)