vg
tools for working with variation graphs
Loading...
Searching...
No Matches
vg::BackTranslatingAlignmentEmitter Class Reference

#include <back_translating_alignment_emitter.hpp>

Inheritance diagram for vg::BackTranslatingAlignmentEmitter:

Public Member Functions

 BackTranslatingAlignmentEmitter (const NamedNodeBackTranslation *translation, unique_ptr< AlignmentEmitter > &&backing)
virtual void emit_singles (vector< Alignment > &&aln_batch)
 Emit a batch of Alignments.
virtual void emit_mapped_singles (vector< vector< Alignment > > &&alns_batch)
 Emit batch of Alignments with secondaries. All secondaries must have is_secondary set already.
virtual void emit_pairs (vector< Alignment > &&aln1_batch, vector< Alignment > &&aln2_batch, vector< int64_t > &&tlen_limit_batch)
virtual void emit_mapped_pairs (vector< vector< Alignment > > &&alns1_batch, vector< vector< Alignment > > &&alns2_batch, vector< int64_t > &&tlen_limit_batch)
virtual void emit_extra_message (const std::string &tag, std::string &&data)
 Emit some extra type-tagged data, if the backing format supports it.

Protected Member Functions

void back_translate_alignments_in_place (vector< Alignment > &alns) const
 Back-translate alignments in place.

Protected Attributes

const NamedNodeBackTranslation * translation
 Translation to use to translate node IDs to pieces of named segments.
unique_ptr< AlignmentEmitter > backing
 AlignmentEmitter to emit to once done.

Detailed Description

An AlignmentEmitter implementation that translates alignments into named-segment space coordinates before emitting them via a backing AlignmentEmitter, which it owns.

Constructor & Destructor Documentation

◆ BackTranslatingAlignmentEmitter()

vg::BackTranslatingAlignmentEmitter::BackTranslatingAlignmentEmitter ( const NamedNodeBackTranslation * translation,
unique_ptr< AlignmentEmitter > && backing )

Make an alignment emitter that translates alignments using the given translation and emits them to the given backing AlignmentEmitter. Takes ownership of the AlignmentEmitter.

Member Function Documentation

◆ back_translate_alignments_in_place()

void vg::BackTranslatingAlignmentEmitter::back_translate_alignments_in_place ( vector< Alignment > & alns) const
protected

Back-translate alignments in place.

◆ emit_extra_message()

void vg::BackTranslatingAlignmentEmitter::emit_extra_message ( const std::string & tag,
std::string && data )
virtual

Emit some extra type-tagged data, if the backing format supports it.

◆ emit_mapped_pairs()

void vg::BackTranslatingAlignmentEmitter::emit_mapped_pairs ( vector< vector< Alignment > > && alns1_batch,
vector< vector< Alignment > > && alns2_batch,
vector< int64_t > && tlen_limit_batch )
virtual

Emit the mappings of a batch of pairs of Alignments. All secondaries must have is_secondary set already. The tlen_limit_batch, if specified, is the maximum pairing distance for each pair to flag properly paired, if the output format cares about such things. TODO: Move to a properly paired annotation that runs with the Alignment.

Both ends of each pair must have the same number of mappings.

◆ emit_mapped_singles()

void vg::BackTranslatingAlignmentEmitter::emit_mapped_singles ( vector< vector< Alignment > > && alns_batch)
virtual

Emit batch of Alignments with secondaries. All secondaries must have is_secondary set already.

◆ emit_pairs()

void vg::BackTranslatingAlignmentEmitter::emit_pairs ( vector< Alignment > && aln1_batch,
vector< Alignment > && aln2_batch,
vector< int64_t > && tlen_limit_batch )
virtual

Emit a batch of pairs of Alignments. The tlen_limit_batch, if specified, is the maximum pairing distance for ewch pair to flag properly paired, if the output format cares about such things. TODO: Move to a properly paired annotation that runs with the Alignment.

◆ emit_singles()

void vg::BackTranslatingAlignmentEmitter::emit_singles ( vector< Alignment > && aln_batch)
virtual

Emit a batch of Alignments.

Member Data Documentation

◆ backing

unique_ptr<AlignmentEmitter> vg::BackTranslatingAlignmentEmitter::backing
protected

AlignmentEmitter to emit to once done.

◆ translation

const NamedNodeBackTranslation* vg::BackTranslatingAlignmentEmitter::translation
protected

Translation to use to translate node IDs to pieces of named segments.


The documentation for this class was generated from the following files: