libMems/DNAFileSML.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * $Id: DNAFileSML.h,v 1.6 2004/03/01 02:40:08 darling Exp $
00003  * This file is copyright 2002-2007 Aaron Darling and authors listed in the AUTHORS file.
00004  * This file is licensed under the GPL.
00005  * Please see the file called COPYING for licensing details.
00006  * **************
00007  ******************************************************************************/
00008 
00009 #ifndef _DNAFileSML_h_
00010 #define _DNAFileSML_h_
00011 
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #include "libMems/FileSML.h"
00017 
00018 namespace mems {
00019 
00023 class DNAFileSML : public FileSML
00024 {
00025 public:
00026         DNAFileSML();
00027         
00037         DNAFileSML(const std::string& fname, const uint8* table = SortedMerList::BasicDNATable(), const uint32 alpha_bits = DNA_ALPHA_BITS);
00038         DNAFileSML(const SortedMerList& sa);
00039         DNAFileSML& operator=(const DNAFileSML& msa );
00040         ~DNAFileSML();
00041         
00042         DNAFileSML* Clone() const;
00043         
00044         virtual uint64 GetMer(gnSeqI position) const;
00045         
00046         virtual uint32 FormatVersion();
00047 
00048         virtual uint64 GetSeedMer( gnSeqI offset ) const;
00049 
00050 protected:
00051         virtual void FillSML(const genome::gnSequence& seq, std::vector<bmer>& sml_array);
00052         virtual uint32 CalculateMaxMerSize() const;
00053         virtual uint64 GetNeededMemory(gnSeqI len);
00054 };
00055 
00056 // version 3 was original DNAFileSML format
00057 // version 4 was introduction of inexact seeds
00058 // version 5 was fix in header struct for 64-bit seed size
00059 inline
00060 uint32 DNAFileSML::FormatVersion(){
00061         static uint32 f_version = 5;
00062         return f_version;
00063 }
00064 
00065 }
00066 
00067 #endif   //_DNAFileSML_h_

Generated on Fri Mar 14 06:01:02 2008 for libMems by doxygen 1.3.6