Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
gnDNXSource Class Reference gnDNXSource implements the DNX file source.
More...
#include <gnDNXSource.h >
Inheritance diagram for gnDNXSource::
List of all members.
Detailed Description
gnDNXSource implements the DNX file source.
This class reads and writes the Blattner Lab DNX file format. DNX files may be written by calling: gnDNXSource::Write ( mySpec, "C:\myFile.dnx");
Definition at line 36 of file gnDNXSource.h .
Constructor & Destructor Documentation
gnDNXSource::gnDNXSource (
)
gnDNXSource::gnDNXSource (
const gnDNXSource & s )
The copy constructor copies the given gnDNXSource.
Parameters:
Definition at line 34 of file gnDNXSource.cpp .
gnDNXSource::~gnDNXSource (
)
Member Function Documentation
gnDNXSource * gnDNXSource::Clone (
) const [inline, virtual]
uint32 gnDNXSource::GetContigID (
const string & name ) const [virtual]
Get a contig index by name.
If the source does not contain a contig by the specified name GetContigID returns UINT32_MAX.
Parameters:
name
The name of the contig to look for.
Returns:
The index of the named contig or UINT32_MAX.
Reimplemented from gnBaseSource .
Definition at line 53 of file gnDNXSource.cpp .
uint32 gnDNXSource::GetContigListLength (
) const [inline, virtual]
Get the number of sequence contigs in this source.
Returns:
The number of contigs in this source.
Reimplemented from gnBaseSource .
Definition at line 108 of file gnDNXSource.h .
string gnDNXSource::GetContigName (
const uint32 i ) const [virtual]
Get the name of the specified contig.
Returns an empty string if the specified contig is out of range.
Parameters:
i
The index of the contig or ALL_CONTIGS.
Returns:
The name of the contig or an empty string.
Reimplemented from gnBaseSource .
Definition at line 61 of file gnDNXSource.cpp .
gnSeqI gnDNXSource::GetContigSeqLength (
const uint32 i ) const [virtual]
Get the total number of base pairs in the specified contig.
Parameters:
i
The index of the contig or ALL_CONTIGS.
Returns:
The length in base pairs of the specified contig.
Reimplemented from gnBaseSource .
Definition at line 69 of file gnDNXSource.cpp .
Returns a pointer to the file contig corresponding to contigI or null if none exists.
Reimplemented from gnFileSource .
Definition at line 137 of file gnDNXSource.cpp .
gnGenomeSpec * gnDNXSource::GetSpec (
) const [inline, virtual]
Get the annotated sequence data as a gnGenomeSpec .
GetSpec returns a gnGenomeSpec which contains the sequence, header, and feature data contained by this source.
Returns:
The annotated sequence data.
Reimplemented from gnBaseSource .
Definition at line 128 of file gnDNXSource.h .
boolean gnDNXSource::HasContig (
const string & name ) const [virtual]
Looks for a contig by name.
Returns true if it finds the contig, otherwise false.
Parameters:
name
The name of the contig to look for.
Returns:
True if the named contig exists, false otherwise.
Reimplemented from gnBaseSource .
Definition at line 45 of file gnDNXSource.cpp .
boolean gnDNXSource::ParseStream (
istream & fin ) [private, virtual]
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.
Parameters:
start
The base pair to start reading at.
buf
The character array to store base pairs into.
len
The number of base pairs to read.
contigI
The index of the contig to read or ALL_CONTIGS by default.
Returns:
True if the operation was successful.
Reimplemented from gnBaseSource .
Definition at line 114 of file gnDNXSource.h .
void gnDNXSource::ValidateName (
string & name ) [static, private]
Writes the given gnGenomeSpec to a DNX file named "filename".
Actual sequence and annotation data will be written to GenBank files. The DNX file will then reference any created GenBank files.
Parameters:
spec
The spec to write out.
filename
The name of the file to write.
Returns:
True if successful, false otherwise.
Definition at line 90 of file gnDNXSource.cpp .
This method is deprecated.
Writes the given gnBaseSource to a DNX file named "filename". Actual sequence and annotation data will be written to GenBank files. The DNX file will then reference any created GenBank files.
Parameters:
source
The source to write out.
filename
The name of the file to write.
Returns:
True if successful, false otherwise.
Definition at line 124 of file gnDNXSource.h .
boolean gnDNXSource::Write (
gnSequence & sequence ,
const string & filename ) [inline, static]
Writes the given gnSequence to a DNX file named "filename".
Actual sequence and annotation data will be written to GenBank files. The DNX file will then reference any created GenBank files.
Parameters:
sequence
The gnSequence to write out.
filename
The name of the file to write.
Returns:
True if successful, false otherwise.
Definition at line 120 of file gnDNXSource.h .
Referenced by Write ().
Member Data Documentation
The documentation for this class was generated from the following files:
Generated at Fri Nov 30 15:36:54 2001 for libGenome by
1.2.8.1 written by Dimitri van Heesch ,
© 1997-2001