vg
tools for working with variation graphs
Public Member Functions | List of all members
vg::io::AlignmentEmitter Class Referenceabstract

#include <alignment_emitter.hpp>

Inheritance diagram for vg::io::AlignmentEmitter:
vg::BackTranslatingAlignmentEmitter vg::HTSAlignmentEmitter vg::io::GafAlignmentEmitter vg::io::NullAlignmentEmitter vg::io::TSVAlignmentEmitter vg::io::VGAlignmentEmitter vg::SurjectingAlignmentEmitter vg::SplicedHTSAlignmentEmitter

Public Member Functions

virtual void emit_singles (vector< Alignment > &&aln_batch)=0
 Emit a batch of Alignments. More...
 
virtual void emit_mapped_singles (vector< vector< Alignment >> &&alns_batch)=0
 Emit batch of Alignments with secondaries. All secondaries must have is_secondary set already. More...
 
virtual void emit_pairs (vector< Alignment > &&aln1_batch, vector< Alignment > &&aln2_batch, vector< int64_t > &&tlen_limit_batch)=0
 
virtual void emit_mapped_pairs (vector< vector< Alignment >> &&alns1_batch, vector< vector< Alignment >> &&alns2_batch, vector< int64_t > &&tlen_limit_batch)=0
 
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...
 

Detailed Description

Base class for a sink that takes alignments, possibly with pairing/secondary relationships, and writes them out somewhere.

All implementations must be thread safe.

All implementations assume OMP threading.

Constructor & Destructor Documentation

◆ ~AlignmentEmitter()

virtual vg::io::AlignmentEmitter::~AlignmentEmitter ( )
virtualdefault

Allow destruction through base class pointer.

Member Function Documentation

◆ emit_extra_message()

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

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

Reimplemented in vg::io::VGAlignmentEmitter.

◆ emit_mapped_pair()

void vg::io::AlignmentEmitter::emit_mapped_pair ( vector< Alignment > &&  alns1,
vector< Alignment > &&  alns2,
int64_t  tlen_limit = 0 
)
virtual

Emit the mappings of a pair of Alignments. All secondaries must have is_secondary set already. The tlen_limit, if specified, is the maximum pairing distance 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 the pair must have the same number of mappings.

◆ emit_mapped_pairs()

virtual void vg::io::AlignmentEmitter::emit_mapped_pairs ( vector< vector< Alignment >> &&  alns1_batch,
vector< vector< Alignment >> &&  alns2_batch,
vector< int64_t > &&  tlen_limit_batch 
)
pure 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.

Implemented in vg::io::GafAlignmentEmitter, vg::HTSAlignmentEmitter, vg::io::VGAlignmentEmitter, vg::io::TSVAlignmentEmitter, vg::io::NullAlignmentEmitter, vg::SurjectingAlignmentEmitter, and vg::BackTranslatingAlignmentEmitter.

◆ emit_mapped_single()

void vg::io::AlignmentEmitter::emit_mapped_single ( vector< Alignment > &&  alns)
virtual

Emit a single Alignment with secondaries. All secondaries must have is_secondary set already.

◆ emit_mapped_singles()

virtual void vg::io::AlignmentEmitter::emit_mapped_singles ( vector< vector< Alignment >> &&  alns_batch)
pure virtual

◆ emit_pair()

void vg::io::AlignmentEmitter::emit_pair ( Alignment &&  aln1,
Alignment &&  aln2,
int64_t  tlen_limit = 0 
)
virtual

Emit a pair of Alignments. The tlen_limit, if specified, is the maximum pairing distance 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_pairs()

virtual void vg::io::AlignmentEmitter::emit_pairs ( vector< Alignment > &&  aln1_batch,
vector< Alignment > &&  aln2_batch,
vector< int64_t > &&  tlen_limit_batch 
)
pure 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.

Implemented in vg::HTSAlignmentEmitter, vg::io::GafAlignmentEmitter, vg::io::VGAlignmentEmitter, vg::io::TSVAlignmentEmitter, vg::io::NullAlignmentEmitter, vg::SurjectingAlignmentEmitter, and vg::BackTranslatingAlignmentEmitter.

◆ emit_single()

void vg::io::AlignmentEmitter::emit_single ( Alignment &&  aln)
virtual

Emit a single Alignment.

◆ emit_singles()

virtual void vg::io::AlignmentEmitter::emit_singles ( vector< Alignment > &&  aln_batch)
pure virtual

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