vg
tools for working with variation graphs
|
#include <alignment_emitter.hpp>
Public Member Functions | |
GafAlignmentEmitter (const string &filename, const string &format, const HandleGraph &_graph, size_t max_threads, const handlegraph::NamedNodeBackTranslation *translate_through=nullptr) | |
Create a GafAlignmentEmitter writing to the given file (or "-") More... | |
~GafAlignmentEmitter () | |
Finish and drstroy a VGAlignmentEmitter. More... | |
virtual void | emit_singles (vector< Alignment > &&aln_batch) |
Emit a batch of Alignments. More... | |
virtual void | emit_mapped_singles (vector< vector< Alignment >> &&alns_batch) |
virtual void | emit_pairs (vector< Alignment > &&aln1_batch, vector< Alignment > &&aln2_batch, vector< int64_t > &&tlen_limit_batch) |
Emit a batch of pairs of Alignments. More... | |
virtual void | emit_mapped_pairs (vector< vector< Alignment >> &&alns1_batch, vector< vector< Alignment >> &&alns2_batch, vector< int64_t > &&tlen_limit_batch) |
Public Member Functions inherited from vg::io::AlignmentEmitter | |
virtual void | emit_extra_message (const std::string &tag, std::string &&data) |
Emit some extra type-tagged data, if the backing format supports it. More... | |
virtual void | emit_single (Alignment &&aln) |
Emit a single Alignment. More... | |
virtual void | emit_mapped_single (vector< Alignment > &&alns) |
Emit a single Alignment with secondaries. All secondaries must have is_secondary set already. More... | |
virtual void | emit_pair (Alignment &&aln1, Alignment &&aln2, int64_t tlen_limit=0) |
virtual void | emit_mapped_pair (vector< Alignment > &&alns1, vector< Alignment > &&alns2, int64_t tlen_limit=0) |
virtual | ~AlignmentEmitter ()=default |
Allow destruction through base class pointer. More... | |
Private Attributes | |
unique_ptr< ofstream > | out_file |
If we are doing output to a file, this will hold the open file. Otherwise (for stdout) it will be empty. More... | |
vg::io::StreamMultiplexer | multiplexer |
This holds a StreamMultiplexer on the output stream, for sharing it between threads. More... | |
const HandleGraph & | graph |
Graph that alignments were aligned against. More... | |
const handlegraph::NamedNodeBackTranslation * | translate_through |
Translation we should use to report in named segment coordinates, if any. More... | |
Emit Alignments to a stream in GAF format Thread safe.
vg::io::GafAlignmentEmitter::GafAlignmentEmitter | ( | const string & | filename, |
const string & | format, | ||
const HandleGraph & | _graph, | ||
size_t | max_threads, | ||
const handlegraph::NamedNodeBackTranslation * | translate_through = nullptr |
||
) |
Create a GafAlignmentEmitter writing to the given file (or "-")
vg::io::GafAlignmentEmitter::~GafAlignmentEmitter | ( | ) |
Finish and drstroy a VGAlignmentEmitter.
|
virtual |
Emit the mappings of a batch of pairs of Alignments. All secondaries must have is_secondary set already.
Implements vg::io::AlignmentEmitter.
|
virtual |
Emit a batch of Alignments with secondaries. All secondaries must have is_secondary set already.
Implements vg::io::AlignmentEmitter.
|
virtual |
Emit a batch of pairs of Alignments.
Implements vg::io::AlignmentEmitter.
|
virtual |
Emit a batch of Alignments.
Implements vg::io::AlignmentEmitter.
|
private |
Graph that alignments were aligned against.
|
private |
This holds a StreamMultiplexer on the output stream, for sharing it between threads.
|
private |
If we are doing output to a file, this will hold the open file. Otherwise (for stdout) it will be empty.
|
private |
Translation we should use to report in named segment coordinates, if any.