#include <gnBaseSource.h>
Inheritance diagram for gnBaseSource:
Public Member Functions | |
gnBaseSource () | |
virtual | ~gnBaseSource () |
Destructor, frees memory used by this source class. | |
virtual gnBaseSource * | Clone () const=0 |
virtual void | Open (string openString)=0 |
Opens the source given in "openString" for reading. | |
virtual void | Open ()=0 |
Opens this source for reading. | |
virtual void | Close ()=0 |
Closes the file or connection this source is reading from. | |
virtual string | GetOpenString () const=0 |
Get the location of the source that is being used. | |
virtual uint32 | GetContigListLength () const=0 |
Get the number of sequence contigs in this source. | |
virtual boolean | HasContig (const string &name) const=0 |
Looks for a contig by name. | |
virtual uint32 | GetContigID (const string &name) const=0 |
Get a contig index by name. | |
virtual string | GetContigName (const uint32 i) const=0 |
Get the name of the specified contig. | |
virtual gnSeqI | GetContigSeqLength (const uint32 i) const=0 |
Get the total number of base pairs in the specified contig. | |
virtual const gnFilter * | GetFilter () const=0 |
Get the filter currently being used to filter unwanted characters out of read sequences. | |
virtual void | SetFilter (gnFilter *filter)=0 |
Set the filter that will be used to filter unwanted characters out of the sequence data. | |
virtual boolean | Read (const uint64 pos, char *buf, uint32 &bufLen)=0 |
Gets raw input from this source. | |
virtual boolean | SeqRead (const gnSeqI start, char *buf, uint32 &bufLen, const uint32 contigI=ALL_CONTIGS)=0 |
Gets sequence data from this source. | |
virtual gnGenomeSpec * | GetSpec () const=0 |
Get the annotated sequence data as a gnGenomeSpec. |
First the data source is opened and parsed, using the open() function. The source class then creates and a gnGenomeSpec containing references to its sequence data. The gnGenomeSpec can then be used by gnSequence to give programmer friendly access to the sequence data.
Definition at line 31 of file gnBaseSource.h.
|
Definition at line 34 of file gnBaseSource.h. |
|
Destructor, frees memory used by this source class.
Definition at line 38 of file gnBaseSource.h. |
|
Implements gnClone. Implemented in gnABISource, gnDataBaseSource, gnDataBaseSource, gnDNXSource, gnFASSource, gnFileSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnSourceFactory::AddSource(), gnSourceFactory::SetDefaultSourceClass(), and gnSourceFactory::SetSourceClass(). |
|
Closes the file or connection this source is reading from.
Implemented in gnDataBaseSource, and gnFileSource. Referenced by gnSourceFactory::DelSource(). |
|
Get a contig index by name. If the source does not contain a contig by the specified name GetContigID returns UINT32_MAX.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnDNXSource::ParseStream(). |
|
Get the number of sequence contigs in this source.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnFASSource::Write(). |
|
Get the name of the specified contig. Returns an empty string if the specified contig is out of range.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnFASSource::Write(). |
|
Get the total number of base pairs in the specified contig.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnSourceSpec::GetSourceLength(), and gnFASSource::Write(). |
|
Get the filter currently being used to filter unwanted characters out of read sequences.
Implemented in gnDataBaseSource, and gnFileSource. |
|
Get the location of the source that is being used.
Implemented in gnDataBaseSource, and gnFileSource. |
|
Get the annotated sequence data as a gnGenomeSpec. GetSpec returns a gnGenomeSpec which contains the sequence, header, and feature data contained by this source.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnSequence::LoadSource(), gnSEQSource::Write(), gnRAWSource::Write(), gnGBKSource::Write(), and gnDNXSource::Write(). |
|
Looks for a contig by name. Returns true if it finds the contig, otherwise false.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. |
|
Opens this source for reading.
Implemented in gnDataBaseSource, and gnFileSource. |
|
Opens the source given in "openString" for reading.
Implemented in gnDataBaseSource, and gnFileSource. Referenced by gnSourceFactory::AddSource(). |
|
Gets raw input from this source. Read will attempt to read "bufLen" bytes starting at "pos" directly from the source. It stores the data in "buf", and returns the actual number of bytes read in bufLen. Read will return false if a serious error occurs.
Implemented in gnDataBaseSource, and gnFileSource. Referenced by gnSourceHeader::GetHeader(), and gnSourceQualifier::GetValue(). |
|
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.
Implemented in gnABISource, gnDataBaseSource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource. Referenced by gnSourceSpec::Read(), and gnFASSource::Write(). |
|
Set the filter that will be used to filter unwanted characters out of the sequence data.
Implemented in gnDataBaseSource, and gnFileSource. |