#include <FileSML.h>
Inheritance diagram for mems::FileSML:


Public Member Functions | |||||
| virtual void | BigCreate (const genome::gnSequence &seq, const uint32 split_levels, const uint32 mersize=DNA_MER_SIZE) | ||||
| Creates large sorted mer lists which do not fit entirely in memory. | |||||
| virtual void | Clear () | ||||
| Set data structures to default values. | |||||
| virtual FileSML * | Clone () const=0 | ||||
| virtual void | Create (const genome::gnSequence &seq, const uint64 seed) | ||||
| Creates a new sorted mer list. | |||||
| void | dmCreate (const genome::gnSequence &seq, const uint64 seed) | ||||
| FileSML () | |||||
| virtual uint32 | FormatVersion () | ||||
| const std::vector< int64 > & | getUsedCoordinates () const | ||||
| virtual void | LoadFile (const std::string &fname) | ||||
| Loads an existing sorted mer list from a file on disk. | |||||
| virtual void | Merge (SortedMerList &sa, SortedMerList &sa2) | ||||
| Merges two SortedMerLists. | |||||
| FileSML & | operator= (const FileSML &sa) | ||||
| virtual bmer | operator[] (gnSeqI index) | ||||
| Get the mer at the specified index in the sorted mer list. | |||||
| virtual void | RadixSort (std::vector< bmer > &s_array) | ||||
| virtual boolean | Read (std::vector< bmer > &readVector, gnSeqI size, gnSeqI offset=0) | ||||
| Read a range of mers in the sorted mer list. | |||||
| virtual void | SetDescription (const std::string &d) | ||||
| Sets the freeform text description of the SML. | |||||
| virtual void | SetID (const sarID_t d) | ||||
| Ignore this. | |||||
| virtual gnSeqI | UniqueMerCount () | ||||
| Returns the number of unique mers in the sequence. | |||||
Static Public Member Functions | |||||
| const char * | getTempPath (int pathI) | ||||
| int | getTempPathCount () | ||||
| uint64 | MemoryMinimum () | ||||
| void | registerTempPath (const std::string &tmp_path) | ||||
Protected Member Functions | |||||
| smlSeqI_t * | base () | ||||
| virtual uint64 | GetNeededMemory (gnSeqI len)=0 | ||||
| Calculates and returns the amount of memory needed to create a sorted mer list for a sequence of the specified length. | |||||
| virtual void | OpenForWriting (boolean truncate=false) | ||||
Reopens the sarfile fstream in read/write mode
| |||||
| virtual boolean | WriteHeader () | ||||
Writes the SML header to disk
| |||||
Protected Attributes | |||||
| std::string | filename | ||||
| boost::iostreams::mapped_file_source | sardata | ||||
| std::fstream | sarfile | ||||
| uint64 | sarray_start_offset | ||||
| std::vector< int64 > | seq_coords | ||||
| If Ns are masked, contains coordinates of regions without Ns. | |||||
Static Protected Attributes | |||||
| char ** | tmp_paths = NULL | ||||
| paths to scratch disk space that can be used for an external sort | |||||
|
|
|
|
|
Definition at line 111 of file FileSML.h. References sardata, sarray_start_offset, and mems::smlSeqI_t. |
|
||||||||||||||||
|
Creates large sorted mer lists which do not fit entirely in memory. BigCreate uses an external mergesort to create large sorted mer lists. It will divide the data a number of times specified by the split_levels parameter. Each split is written to temp files on disk and merged.
Definition at line 1721 of file FileSML.cpp. |
|
|
Set data structures to default values.
Reimplemented from mems::SortedMerList. Definition at line 38 of file FileSML.cpp. References filename, sarfile, sarray_start_offset, and seq_coords. |
|
|
Implemented in mems::DNAFileSML. |
|
||||||||||||
|
Creates a new sorted mer list. This function enumerates each possible mer of the specified size and sorts them alphabetically in order to construct a sorted mer list.
Reimplemented from mems::SortedMerList. Definition at line 1620 of file FileSML.cpp. |
|
||||||||||||
|
Definition at line 1582 of file FileSML.cpp. Referenced by mems::SearchLCBGaps(). |
|
|
Reimplemented in mems::DNAFileSML. Definition at line 120 of file FileSML.h. References mems::uint32. Referenced by LoadFile(). |
|
|
Calculates and returns the amount of memory needed to create a sorted mer list for a sequence of the specified length.
Implemented in mems::DNAFileSML. |
|
|
Definition at line 1524 of file FileSML.cpp. |
|
|
Definition at line 1528 of file FileSML.cpp. |
|
|
Definition at line 84 of file FileSML.h. References seq_coords. |
|
|
Loads an existing sorted mer list from a file on disk.
Definition at line 46 of file FileSML.cpp. References mems::SMLHeader::alphabet_bits, mems::SMLHeader::circular, filename, FormatVersion(), mems::SMLHeader::length, sardata, sarfile, sarray_start_offset, mems::SMLHeader::seed_length, mems::SortedMerList::seed_mask, mems::SMLHeader::seed_weight, seq_coords, mems::SortedMerList::SetMerMaskSize(), mems::uint32, and mems::uint64. Referenced by mems::RepeatMatchList::LoadSMLs(), and mems::GenericMatchList< MatchPtrType >::LoadSMLs(). |
|
|
Definition at line 126 of file FileSML.h. References DEFAULT_MEMORY_MINIMUM, mems::uint32, and mems::uint64. |
|
||||||||||||
|
Merges two SortedMerLists.
Implements mems::SortedMerList. Definition at line 1812 of file FileSML.cpp. |
|
|
Reopens the sarfile fstream in read/write mode
Definition at line 112 of file FileSML.cpp. References filename, and sarfile. Referenced by WriteHeader(). |
|
|
Definition at line 23 of file FileSML.cpp. References filename, sarfile, sarray_start_offset, and seq_coords. |
|
|
Get the mer at the specified index in the sorted mer list.
Implements mems::SortedMerList. Definition at line 1680 of file FileSML.cpp. |
|
|
Definition at line 1761 of file FileSML.cpp. |
|
||||||||||||||||
|
Read a range of mers in the sorted mer list. This function reads a section of data from the sorted mer list starting at 'offset' and continuing for 'size' mers. The mers are placed into readVector. Anything already in readVector is cleared. Returns false if there was a problem completing the read. If the end of the list is reached, all mers which could be read will be placed into readVector and false will be returned
Implements mems::SortedMerList. Definition at line 1689 of file FileSML.cpp. |
|
|
Definition at line 1485 of file FileSML.cpp. |
|
|
Sets the freeform text description of the SML.
Reimplemented from mems::SortedMerList. Definition at line 164 of file FileSML.cpp. References mems::SMLHeader::description, DESCRIPTION_SIZE, and WriteHeader(). |
|
|
Ignore this.
Reimplemented from mems::SortedMerList. Definition at line 169 of file FileSML.cpp. References mems::SMLHeader::id, mems::sarID_t, and WriteHeader(). |
|
|
Returns the number of unique mers in the sequence.
Reimplemented from mems::SortedMerList. Definition at line 155 of file FileSML.cpp. References mems::SMLHeader::unique_mers, and WriteHeader(). |
|
|
Writes the SML header to disk
Definition at line 129 of file FileSML.cpp. References filename, OpenForWriting(), and sarfile. Referenced by SetDescription(), SetID(), and UniqueMerCount(). |
|
|
Definition at line 106 of file FileSML.h. Referenced by Clear(), LoadFile(), OpenForWriting(), operator=(), and WriteHeader(). |
|
|
Definition at line 110 of file FileSML.h. Referenced by base(), and LoadFile(). |
|
|
Definition at line 107 of file FileSML.h. Referenced by Clear(), LoadFile(), OpenForWriting(), operator=(), and WriteHeader(). |
|
|
Definition at line 108 of file FileSML.h. Referenced by base(), Clear(), LoadFile(), and operator=(). |
|
|
If Ns are masked, contains coordinates of regions without Ns.
Definition at line 114 of file FileSML.h. Referenced by Clear(), getUsedCoordinates(), LoadFile(), and operator=(). |
|
|
paths to scratch disk space that can be used for an external sort
Definition at line 1483 of file FileSML.cpp. |
1.3.6