#include <gnSEQSource.h>
Inheritance diagram for gnSEQSource::
Public Methods | |
gnSEQSource () | |
Empty Constructor, does nothing. More... | |
gnSEQSource (const gnSEQSource &s) | |
Clone Constructor copies the specified gnSEQSource. More... | |
~gnSEQSource () | |
Destructor, frees memory. More... | |
gnSEQSource* | Clone () const |
Returns an exact copy of this class. More... | |
uint32 | GetContigListLength () const |
Get the number of sequence contigs in this source. More... | |
boolean | HasContig (const string &name) const |
Looks for a contig by name. More... | |
uint32 | GetContigID (const string &name) const |
Get a contig index by name. More... | |
string | GetContigName (const uint32 i) const |
Get the name of the specified contig. More... | |
gnSeqI | GetContigSeqLength (const uint32 i) const |
Get the total number of base pairs in the specified contig. More... | |
boolean | SeqRead (const gnSeqI start, char *buf, uint32 &bufLen, const uint32 contigI=ALL_CONTIGS) |
Gets sequence data from this source. More... | |
gnGenomeSpec* | GetSpec () const |
Get the annotated sequence data as a gnGenomeSpec. More... | |
gnFileContig* | GetFileContig (const uint32 contigI) const |
Returns a pointer to the file contig corresponding to contigI or null if none exists. More... | |
Static Public Methods | |
boolean | Write (gnSequence &sequence, const string &filename) |
Writes the specified gnSequence to a .SEQ file named "filename". More... | |
boolean | Write (gnBaseSource *source, const string &filename) |
Writes the specified source to a .SEQ file named "filename". More... | |
boolean | Write (gnGenomeSpec *spec, const string &filename) |
Writes the given spec to a .SEQ file named "filename". More... | |
Private Methods | |
boolean | SeqSeek (const gnSeqI start, const uint32 &contigI, uint64 &startPos, uint64 &readableBytes) |
boolean | SeqStartPos (const gnSeqI start, gnFileContig &contig, uint64 &startPos, uint64 &readableBytes) |
boolean | ParseStream (istream &fin) |
Static Private Methods | |
string& | Filler (uint32 length) |
void | FormatString (string &data, uint32 offset, uint32 width) |
void | BaseCount (const string &bases, gnSeqI &a_count, gnSeqI &c_count, gnSeqI &g_count, gnSeqI &t_count, gnSeqI &other_count) |
Private Attributes | |
gnGenomeSpec* | m_spec |
vector< gnFileContig* > | m_contigList |
This class reads and writes the DNAStar SEQ file format. gnSEQSource is used by gnSourceFactory to read files and should only be used directly.when writing out files in SEQ file format by calling gnSEQSource::Write( mySpec, "C:\mySeqFile.seq");
Definition at line 35 of file gnSEQSource.h.
|
Empty Constructor, does nothing.
Definition at line 24 of file gnSEQSource.cpp. Referenced by Clone().
|
|
Clone Constructor copies the specified gnSEQSource.
Definition at line 32 of file gnSEQSource.cpp. |
|
Destructor, frees memory.
Definition at line 40 of file gnSEQSource.cpp. |
|
Definition at line 263 of file gnSEQSource.cpp. |
|
Returns an exact copy of this class.
Reimplemented from gnFileSource. Definition at line 102 of file gnSEQSource.h. |
|
|
|
Definition at line 283 of file gnSEQSource.cpp. |
|
Get a contig index by name. If the source does not contain a contig by the specified name GetContigID returns UINT32_MAX.
Reimplemented from gnBaseSource. Definition at line 60 of file gnSEQSource.cpp. |
|
Get the number of sequence contigs in this source.
Reimplemented from gnBaseSource. Definition at line 108 of file gnSEQSource.h. |
|
Get the name of the specified contig. Returns an empty string if the specified contig is out of range.
Reimplemented from gnBaseSource. Definition at line 69 of file gnSEQSource.cpp. |
|
Get the total number of base pairs in the specified contig.
Reimplemented from gnBaseSource. Definition at line 77 of file gnSEQSource.cpp. |
|
Returns a pointer to the file contig corresponding to contigI or null if none exists.
Reimplemented from gnFileSource. Definition at line 329 of file gnSEQSource.cpp. |
|
Get the annotated sequence data as a gnGenomeSpec. GetSpec returns a gnGenomeSpec which contains the sequence, header, and feature data contained by this source.
Reimplemented from gnBaseSource. Definition at line 121 of file gnSEQSource.h. |
|
Looks for a contig by name. Returns true if it finds the contig, otherwise false.
Reimplemented from gnBaseSource. Definition at line 51 of file gnSEQSource.cpp. |
|
Reimplemented from gnFileSource. Definition at line 336 of file gnSEQSource.cpp. |
|
Gets sequence data from this source. SeqRead will attempt to read "bufLen" base pairs starting at "start", an offset into the sequence. Reading inside a specific contig can be accomplished by supplying the "contigI" parameter with a valid contig index. SeqRead stores the sequence data in "buf" and returns the actual number of bases read in "bufLen". SeqRead will return false if a serious error occurs.
Reimplemented from gnBaseSource. Definition at line 88 of file gnSEQSource.cpp. |
|
Definition at line 171 of file gnSEQSource.cpp. Referenced by SeqRead().
|
|
Definition at line 198 of file gnSEQSource.cpp. Referenced by SeqSeek().
|
|
Writes the given spec to a .SEQ file named "filename".
Definition at line 324 of file gnSEQSource.cpp. |
|
Writes the specified source to a .SEQ file named "filename".
Definition at line 117 of file gnSEQSource.h. |
|
Writes the specified gnSequence to a .SEQ file named "filename".
Definition at line 113 of file gnSEQSource.h. Referenced by Write().
|
|
Definition at line 98 of file gnSEQSource.h. |
|
Definition at line 97 of file gnSEQSource.h. |