NVBIO
|
The output file interface.
This class is the base class for all file output classes. By itself, it implements a "null" output, which discards all data sent into it. Other classes derive from this to implement various file output formats.
After each alignment pass in the pipeline, the aligner should call OutputFile::process. This call takes a handle to the alignment buffers in GPU memory (a DeviceOutputBatchSE structure). The implementation ensures that any data required is copied out before the call returns, allowing the caller to invalidate the GPU memory immediately.
Sequence alignment is generally done in batches of reads; for each batch multiple OutputFile::process calls can be made. Two extra enum parameters serve to identify which alignment pass we're handling at each call. Each batch should be preceded by a OutputFile::start_batch call; at the end of each batch, OutputFile::end_batch should be called. In most cases, data is only written to disk after OutputFile::end_batch is called.
The factory method OutputFile::open is used to create OutputFile objects. It parses the file name extension to determine the file format for the output.
Definition at line 71 of file output_file.h.
#include <output_file.h>
Public Methods | |
virtual | ~OutputFile () |
void | set_program (const char *_pg_id, const char *_pg_name, const char *_pg_version, const char *_pg_args) |
void | set_rg (const char *_rg_id, const char *_rg_string) |
virtual void | header () |
virtual void | configure_mapq_evaluator (int mapq_filter) |
virtual void | process (struct HostOutputBatchSE &batch) |
virtual void | process (struct HostOutputBatchPE &batch) |
virtual void | close (void) |
Flush and close the output file. More... | |
virtual IOStats & | get_aggregate_statistics (void) |
Returns aggregate I/O statistics for this object. More... | |
Static Public Methods | |
static OutputFile * | open (const char *file_name, AlignmentType aln_type, BNT bnt) |
Proteced Methods | |
OutputFile (const char *file_name, AlignmentType alignment_type, BNT bnt) | |
Protected Members | |
const char * | file_name |
Name of the file we're writing. More... | |
AlignmentType | alignment_type |
The type of alignment we're running (single or paired-end) More... | |
BNT | bnt |
Reference genome data handle. More... | |
int | mapq_filter |
The current mapping quality filter: reads with a mapq below this value will be marked as not aligned. More... | |
IOStats | iostats |
I/O statistics. More... | |
std::string | pg_id |
std::string | pg_name |
std::string | pg_version |
std::string | pg_args |
std::string | rg_id |
std::string | rg_string |
|
protected |
Definition at line 36 of file output_file.cpp.
|
virtual |
Definition at line 44 of file output_file.cpp.
|
virtual |
Flush and close the output file.
Reimplemented in nvbio::io::SamOutput, nvbio::io::DebugOutput, and nvbio::io::BamOutput.
Definition at line 53 of file output_file.cpp.
|
virtual |
Configure the MapQ evaluator. Must be called prior to any batch processing.
Definition at line 48 of file output_file.cpp.
|
virtual |
Returns aggregate I/O statistics for this object.
Definition at line 57 of file output_file.cpp.
|
inlinevirtual |
write the header out
Reimplemented in nvbio::io::SamOutput, and nvbio::io::BamOutput.
Definition at line 102 of file output_file.h.
|
static |
Factory method to create OutputFile objects
[in] | file_name | The name of the file to create (will be silently overwritten if it already exists). This method parses out the extension from the file name to determine what kind of file format to write. |
[in] | aln_type | The type of alignment (single or paired-end) |
[in] | bnt | A handle to the reference genome |
Definition at line 62 of file output_file.cpp.
|
inlinevirtual |
Process a set of alignment results for the current batch.
batch | Handle to the buffers containing the alignment results |
Reimplemented in nvbio::io::SamOutput, nvbio::io::DebugOutput, and nvbio::io::BamOutput.
Definition at line 112 of file output_file.h.
|
inlinevirtual |
Process a set of alignment results for the current batch.
batch | Handle to the buffers containing the alignment results |
Reimplemented in nvbio::io::SamOutput, nvbio::io::DebugOutput, and nvbio::io::BamOutput.
Definition at line 118 of file output_file.h.
|
inline |
Definition at line 80 of file output_file.h.
Definition at line 92 of file output_file.h.
|
protected |
The type of alignment we're running (single or paired-end)
Definition at line 130 of file output_file.h.
|
protected |
Reference genome data handle.
Definition at line 132 of file output_file.h.
|
protected |
Name of the file we're writing.
Definition at line 128 of file output_file.h.
|
protected |
I/O statistics.
Definition at line 138 of file output_file.h.
|
protected |
The current mapping quality filter: reads with a mapq below this value will be marked as not aligned.
Definition at line 135 of file output_file.h.
|
protected |
Definition at line 143 of file output_file.h.
|
protected |
Definition at line 140 of file output_file.h.
|
protected |
Definition at line 141 of file output_file.h.
|
protected |
Definition at line 142 of file output_file.h.
|
protected |
Definition at line 145 of file output_file.h.
|
protected |
Definition at line 146 of file output_file.h.