eXpress “1.5”
|
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>
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. |
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.
Definition at line 267 of file mapparser.h.
SAMWriter::SAMWriter | ( | std::ostream * | out, |
bool | sample | ||
) |
SAMWriter constructor stores a pointer to the output stream.
out | SAM output stream |
sample | specifies 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.
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.
f | the processed Fragment to output alignments of. |
Implements Writer.
Definition at line 595 of file mapparser.cpp.