include/gn/gnABISource.h

Go to the documentation of this file.
00001 00002 // File: gnABISource.h 00003 // Purpose: Implements gnBaseSource for ABI files 00004 // Description: 00005 // Changes: 00006 // Version: libGenome 0.5.1 00007 // Author: Aaron Darling 00008 // Modified by: 00009 // Copyright: (c) Aaron Darling 00010 // Licenses: See COPYING file for details 00012 #ifndef _gnABISource_h_ 00013 #define _gnABISource_h_ 00014 00015 #include "gn/gnDefs.h" 00016 00017 #include <string> 00018 #include "gn/gnFileSource.h" 00019 #include "gn/gnFileContig.h" 00020 #include "gn/gnSourceSpec.h" 00021 #include "gn/gnFilter.h" 00022 00026 class GNDLLEXPORT gnABISource : public gnFileSource 00027 { 00028 public: 00029 gnABISource(); 00034 gnABISource( const gnABISource& s ); 00035 ~gnABISource(); 00036 gnABISource* Clone() const; 00037 00038 uint32 GetContigListLength() const; 00039 boolean HasContig( const string& name ) const; 00040 uint32 GetContigID( const string& name ) const; 00041 string GetContigName( uint32 i ) const; 00042 gnSeqI GetContigSeqLength( uint32 i ) const; 00043 gnFileContig* GetContig( const uint32 i ) const; 00044 00045 boolean SeqRead( const gnSeqI start, char* buf, gnSeqI& bufLen, const uint32 contigI=ALL_CONTIGS ); 00046 00053 static boolean Write(gnSequence& sequence, const string& filename); 00054 gnGenomeSpec *GetSpec() const; 00055 00056 gnFileContig* GetFileContig( const uint32 contigI ) const; 00057 private: 00058 boolean SeqSeek( const gnSeqI start, const uint32& contigI, uint64& startPos, uint64& readableBytes ); 00059 boolean SeqStartPos( const gnSeqI start, gnFileContig& contig, uint64& startPos, uint64& readableBytes ); 00060 boolean ParseStream( istream& fin ); 00061 00062 gnGenomeSpec *m_spec; 00063 vector< gnFileContig* > m_contigList; 00064 00065 };// class gnABISource 00066 00067 inline 00068 gnABISource* gnABISource::Clone() const 00069 { 00070 return new gnABISource( *this ); 00071 } 00072 inline 00073 uint32 gnABISource::GetContigListLength() const 00074 { 00075 return m_contigList.size(); 00076 } 00077 inline 00078 gnGenomeSpec *gnABISource::GetSpec() const 00079 { 00080 return m_spec->Clone(); 00081 } 00082 00083 #endif 00084 // _gnABISource_h_

Generated on Mon Feb 14 19:28:17 2005 for libGenome by doxygen 1.3.8