#include "inttypes_AMOS.hh"
#include "exceptions_AMOS.hh"
#include <new>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <cassert>
#include <errno.h>
Include dependency graph for utility_AMOS.hh:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | AMOS |
Defines | |
#define | __utility_AMOS_HH 1 |
#define | HASHMAP std |
Functions | |
void * | SafeCalloc (size_t num, size_t size) |
Safe calloc wrapper. | |
void * | SafeMalloc (size_t size) |
Safe malloc wrapper. | |
void * | SafeRealloc (void *P, size_t size) |
Safe realloc wrapper. | |
char * | SafeStrdup (const char *str) |
Safe strdup wrapper. | |
char | Complement (char ch) |
Returns the DNA complement of an IUPAC character. | |
void | ReverseComplement (std::string &str) |
Takes the DNA reverse complement of an IUPAC string. | |
void | ReverseComplement (char *str) |
Takes the DNA reverse complement of an IUPAC string. | |
void | Reverse (std::string &str) |
Reverses the contents of a string. | |
void | Reverse (char *str) |
Reverses the contents of a string. | |
void | writeLE (std::ostream &out, const uint8_t *i) |
Writes an 8-bit int in little-endian byte order. | |
void | writeLE (std::ostream &out, const int8_t *i) |
void | writeLE (std::ostream &out, const BankFlags_t *i) |
void | writeLE (std::ostream &out, const uint16_t *i) |
Writes a 16-bit int in little-endian byte order. | |
void | writeLE (std::ostream &out, const int16_t *i) |
void | writeLE (std::ostream &out, const uint32_t *i) |
Writes a 32-bit int in little-endian byte order. | |
void | writeLE (std::ostream &out, const int32_t *i) |
void | writeLE (std::ostream &out, const uint64_t *i) |
Writes a 64-bit int in little-endian byte order. | |
void | writeLE (std::ostream &out, const int64_t *i) |
void | readLE (std::istream &in, uint8_t *i) |
Reads a little-endian 8-bit int. | |
void | readLE (std::istream &in, int8_t *i) |
void | readLE (std::istream &in, BankFlags_t *i) |
void | readLE (std::istream &in, uint16_t *i) |
Reads a little-endian 16-bit int. | |
void | readLE (std::istream &in, int16_t *i) |
void | readLE (std::istream &in, uint32_t *i) |
Reads a little-endian 32-bit int. | |
void | readLE (std::istream &in, int32_t *i) |
void | readLE (std::istream &in, uint64_t *i) |
Reads a little-endian 64-bit int. | |
void | readLE (std::istream &in, int64_t *i) |
Definition in file utility_AMOS.hh.
|
Definition at line 11 of file utility_AMOS.hh. |
|
Definition at line 40 of file utility_AMOS.hh. |
|
Returns the DNA complement of an IUPAC character. Complement-able IUPAC characters are ACGTUMRWSYKVHDB, while NX*- are also acceptable but are self-complementary. Characters other than these will throw an exception.
References AMOS_THROW_ARGUMENT. Referenced by AMOS::ReverseComplement(). |
|
Definition at line 357 of file utility_AMOS.hh. References AMOS::readLE(). Referenced by main(). |
|
Reads a little-endian 64-bit int.
References ltoh64. |
|
Definition at line 337 of file utility_AMOS.hh. References AMOS::readLE(). |
|
Reads a little-endian 32-bit int.
References ltoh32. |
|
Definition at line 317 of file utility_AMOS.hh. References AMOS::readLE(). |
|
Reads a little-endian 16-bit int.
References ltoh16. |
|
Definition at line 296 of file utility_AMOS.hh. References AMOS::readLE(). |
|
Definition at line 292 of file utility_AMOS.hh. References AMOS::readLE(). |
|
Reads a little-endian 8-bit int.
Referenced by AMOS::Bank_t::concat(), AMOS::Bank_t::fetchBID(), AMOS::BankStream_t::ignore(), AMOS::BankStream_t::operator>>(), AMOS::readLE(), AMOS::Sequence_t::readRecord(), AMOS::Scaffold_t::readRecord(), AMOS::Read_t::readRecord(), AMOS::Overlap_t::readRecord(), AMOS::Link_t::readRecord(), AMOS::Layout_t::readRecord(), AMOS::Kmer_t::readRecord(), AMOS::Index_t::readRecord(), AMOS::Group_t::readRecord(), AMOS::Fragment_t::readRecord(), AMOS::Feature_t::readRecord(), AMOS::IEdge_t::readRecord(), AMOS::Tile_t::readRecord(), AMOS::Distribution_t::readRecord(), AMOS::Contig_t::readRecord(), and AMOS::Bank_t::removeBID(). |
|
Reverses the contents of a string.
|
|
Reverses the contents of a string. Simply calls the STL reverse "algorithm" but in an AMOS way
Referenced by AMOS::Sequence_t::getQualString(), AMOS::Contig_t::getUngappedQualString(), and AMOS::ReverseComplement(). |
|
Takes the DNA reverse complement of an IUPAC string. Complement-able IUPAC characters are ACGTUMRWSYKVHDB, while NX*- are also acceptable but are self-complementary. Characters other than these will throw an exception.
References AMOS::Complement(), and AMOS::Reverse(). |
|
Takes the DNA reverse complement of an IUPAC string. Complement-able IUPAC characters are ACGTUMRWSYKVHDB, while NX*- are also acceptable but are self-complementary. Characters other than these will throw an exception.
References AMOS::Complement(), and AMOS::Reverse(). Referenced by AMOS::Sequence_t::getSeqString(), and AMOS::Contig_t::getUngappedSeqString(). |
|
Safe calloc wrapper. Detects calloc failure and throws AMOS::AllocException_t exception instead of returning a NULL pointer.
References AMOS_THROW_ALLOC. |
|
Safe malloc wrapper. Detects malloc failure and throws AMOS::AllocException_t exception instead of returning a NULL pointer.
References AMOS_THROW_ALLOC. Referenced by AMOS::Bank_t::BankPartition_t::BankPartition_t(), and AMOS::Bank_t::concat(). |
|
Safe realloc wrapper. Detects realloc failure and throws AMOS::AllocException_t exception instead of returning a NULL pointer. This helps prevent memory leaks by preventing the original memory block from being lost when the realloc function returns NULL.
References AMOS_THROW_ALLOC. Referenced by AMOS::Bank_t::concat(), AMOS::Sequence_t::operator=(), AMOS::Kmer_t::operator=(), AMOS::Sequence_t::readRecord(), AMOS::Kmer_t::readRecord(), AMOS::Kmer_t::setSeqString(), AMOS::Sequence_t::setSequence(), and AMOS::Sequence_t::uncompress(). |
|
Safe strdup wrapper. Detects malloc failure and throws AMOS::AllocException_t exception instead of returning a NULL pointer.
References AMOS_THROW_ALLOC. |
|
Definition at line 274 of file utility_AMOS.hh. References AMOS::writeLE(). Referenced by main(). |
|
Writes a 64-bit int in little-endian byte order.
References htol64. |
|
Definition at line 254 of file utility_AMOS.hh. References AMOS::writeLE(). |
|
Writes a 32-bit int in little-endian byte order.
References htol32. |
|
Definition at line 234 of file utility_AMOS.hh. References AMOS::writeLE(). |
|
Writes a 16-bit int in little-endian byte order.
References htol16. |
|
Definition at line 213 of file utility_AMOS.hh. References AMOS::writeLE(). |
|
Definition at line 209 of file utility_AMOS.hh. References AMOS::writeLE(). |
|
Writes an 8-bit int in little-endian byte order.
Referenced by AMOS::Bank_t::appendBID(), AMOS::Bank_t::concat(), AMOS::BankStream_t::operator<<(), AMOS::Bank_t::removeBID(), AMOS::Bank_t::replaceBID(), AMOS::writeLE(), AMOS::Sequence_t::writeRecord(), AMOS::Scaffold_t::writeRecord(), AMOS::Read_t::writeRecord(), AMOS::Overlap_t::writeRecord(), AMOS::Link_t::writeRecord(), AMOS::Layout_t::writeRecord(), AMOS::Kmer_t::writeRecord(), AMOS::Index_t::writeRecord(), AMOS::Group_t::writeRecord(), AMOS::Fragment_t::writeRecord(), AMOS::Feature_t::writeRecord(), AMOS::IEdge_t::writeRecord(), AMOS::Tile_t::writeRecord(), AMOS::Distribution_t::writeRecord(), and AMOS::Contig_t::writeRecord(). |