eXpress “1.5”

BAMWriter Class Reference

The BAMWriter class writes Fragment objects back to file in BAM format with per-mapping probabilistic assignments, or by sampling a single mapping based on assignment probabilities. More...

#include <mapparser.h>

Inheritance diagram for BAMWriter:
Writer

List of all members.

Public Member Functions

 BAMWriter (BamTools::BamWriter *writer, bool sample)
 BAMWriter constructor stores a pointer to the BamTools::BamWriter object that will directly write to the BAM file.
 ~BAMWriter ()
 BAMWriter destructor closes the BamTools::BamWriter object.
void write_fragment (Fragment &f)
 A member function that writes the mappings to the output BAM file.

Detailed Description

The BAMWriter class writes Fragment objects back to file in BAM format with per-mapping probabilistic assignments, or by sampling a single mapping based on assignment probabilities.

Author:
Adam Roberts
Date:
2011 Artistic License 2.0

Definition at line 226 of file mapparser.h.


Constructor & Destructor Documentation

BAMWriter::BAMWriter ( BamTools::BamWriter *  writer,
bool  sample 
)

BAMWriter constructor stores a pointer to the BamTools::BamWriter object that will directly write to the BAM file.

Parameters:
writerpointer to the BamTools::BamWriter objected assocaited with the output BAM file.
samplespecifies if a single alignment should be sampled based on posteriors (true) or all output with their respective posterior

probabilities (false).

Definition at line 550 of file mapparser.cpp.


Member Function Documentation

void BAMWriter::write_fragment ( Fragment f) [virtual]

A member function that writes the mappings to the output BAM file.

If _sample is true, a only one alignment is output, otherwise all mappings are output along with their probabilities in the "XP" field.

Parameters:
fthe processed Fragment to output alignments of.

Implements Writer.

Definition at line 559 of file mapparser.cpp.


The documentation for this class was generated from the following files:
 All Classes Functions Variables