eXpress “1.5”

SAMWriter Class Reference

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

#include <mapparser.h>

Inheritance diagram for SAMWriter:
Writer

List of all members.

Public Member Functions

 SAMWriter (std::ostream *out, bool sample)
 SAMWriter constructor stores a pointer to the output stream.
 ~SAMWriter ()
 SAMWriter destructor flushes the output stream.
void write_fragment (Fragment &f)
 A member function that writes the mappings to the output SAM file.

Detailed Description

The SAMWriter class writes Fragment objects back to file in SAM 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 267 of file mapparser.h.


Constructor & Destructor Documentation

SAMWriter::SAMWriter ( std::ostream *  out,
bool  sample 
)

SAMWriter constructor stores a pointer to the output stream.

Parameters:
outSAM output stream
samplespecifies if a single alignment should be sampled based on posteriors (true) or all output with their respective posterior probabilities (false).

Definition at line 587 of file mapparser.cpp.


Member Function Documentation

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

A member function that writes the mappings to the output SAM 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 595 of file mapparser.cpp.


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