#include <gnFASSource.h>
Inheritance diagram for gnFASSource::
Public Methods | |
gnFASSource () | |
Empty Constructor, does nothing. More... | |
gnFASSource (const gnFASSource &s) | |
Clone Constructor copies the specified gnFASSource. More... | |
~gnFASSource () | |
Destructor, frees memory. More... | |
gnFASSource* | 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 &nameStr) const |
Looks for a contig by name. More... | |
uint32 | GetContigID (const string &nameStr) 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... | |
gnFileContig* | GetContig (const uint32 i) const |
boolean | SeqRead (const gnSeqI start, char *buf, uint32 &bufLen, const uint32 contigI=ALL_CONTIGS) |
Gets sequence data from this source. More... | |
gnGenomeSpec* | GetSpec () const |
deprecated - do not use Writes the given spec to a FastA file named "filename". 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 | |
void | Write (gnSequence &sequence, const string &filename, boolean write_coords=true, boolean enforce_unique_names=true) |
Write the given gnSequence to a FastA file. More... | |
void | Write (gnSequence &sequence, ostream &m_ostream, boolean write_coords=true, boolean enforce_unique_names=true) |
Write the given gnSequence to an ostream. More... | |
boolean | Write (gnBaseSource *source, const string &filename) |
Deprecated - do not use. 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) |
Private Attributes | |
vector< gnFileContig* > | m_contigList |
gnFASSource is used by gnSourceFactory to read files. Files can be written in the FastA file format by calling gnFASSource::Write( mySpec, "C:\myFasFile.fas");
Definition at line 33 of file gnFASSource.h.
|
Empty Constructor, does nothing.
Definition at line 21 of file gnFASSource.cpp. Referenced by Clone().
|
|
Clone Constructor copies the specified gnFASSource.
Definition at line 29 of file gnFASSource.cpp. |
|
Destructor, frees memory.
Definition at line 37 of file gnFASSource.cpp. |
|
Returns an exact copy of this class.
Reimplemented from gnFileSource. Definition at line 121 of file gnFASSource.h. |
|
Definition at line 85 of file gnFASSource.cpp. Referenced by main().
|
|
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 57 of file gnFASSource.cpp. |
|
Get the number of sequence contigs in this source.
Reimplemented from gnBaseSource. Definition at line 127 of file gnFASSource.h. Referenced by main().
|
|
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 66 of file gnFASSource.cpp. |
|
Get the total number of base pairs in the specified contig.
Reimplemented from gnBaseSource. Definition at line 73 of file gnFASSource.cpp. |
|
Returns a pointer to the file contig corresponding to contigI or null if none exists.
Reimplemented from gnFileSource. Definition at line 384 of file gnFASSource.cpp. |
|
deprecated - do not use Writes the given spec to a FastA file named "filename".
Reimplemented from gnBaseSource. Definition at line 360 of file gnFASSource.cpp. |
|
Looks for a contig by name. Returns true if it finds the contig, otherwise false.
Reimplemented from gnBaseSource. Definition at line 48 of file gnFASSource.cpp. |
|
Reimplemented from gnFileSource. Definition at line 390 of file gnFASSource.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 93 of file gnFASSource.cpp. Referenced by main().
|
|
Definition at line 178 of file gnFASSource.cpp. Referenced by SeqRead().
|
|
Definition at line 206 of file gnFASSource.cpp. Referenced by SeqSeek().
|
|
Deprecated - do not use. Write the given source to a FastA file.
Definition at line 261 of file gnFASSource.cpp. |
|
Write the given gnSequence to an ostream.
Definition at line 295 of file gnFASSource.cpp. |
|
Write the given gnSequence to a FastA file.
Definition at line 287 of file gnFASSource.cpp. Referenced by WriteData(), and main().
|
|
Definition at line 117 of file gnFASSource.h. |