gnDNASequence.h Source File

Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# gnDNASequence.h

Go to the documentation of this file.

    00001 /////////////////////////////////////////////////////////////////////////////
    00002 // File:            gnDNASequence.h
    00003 // Purpose:         Sequence class
    00004 // Description:     Provides a high level sequence interface to all types of
    00005 //                                      sequence data.
    00006 // Changes:
    00007 // Version:         libGenome 0.5.1
    00008 // Author:          Aaron Darling
    00009 // Modified by:
    00010 // Copyright:       (c) Aaron Darling
    00011 // Licenses:        See COPYING file for details
    00012 /////////////////////////////////////////////////////////////////////////////
    00013 #ifndef _gnDNASequence_h_
    00014 #define _gnDNASequence_h_
    00015
    00016 #include "gn/gnDefs.h"
    00017
    00018 #include <string>
    00019 #include <list>
    00020 #include "gn/gnSequence.h"
    00021 #include "gn/gnFilter.h"
    00022 /**
    00023  * gnDNASequence is a special kind of gnSequence which can be used for DNA sequences
    00024  * It sets the default filters and comparators to the DNA filters and comparators.
    00025  */
    00026
    00027 class GNDLLEXPORT gnDNASequence : public gnSequence
    00028 {
    00029 public:
    00030         /**
    00031          * Empty Constructor, creates an empty gnDNASequence.
    00032          */
    00033         gnDNASequence();
    00034         /**
    00035          * Creates a gnDNASequence with a single contig containing the bases in "seq".
    00036          * @param seq The null terminated array of base pairs to use.
    00037          */
    00038         gnDNASequence( const gnSeqC* seq );
    00039         /**
    00040          * Creates a gnDNASequence with a single contig containing the bases in "str".
    00041          * @param str The base pairs to use.
    00042          */
    00043         gnDNASequence( const string& str );
    00044         /**
    00045          * Creates a gnDNASequence with the contigs stored in "gngs".
    00046          * @param gngs the gnGenomeSpec to get contigs from.
    00047          */
    00048         gnDNASequence( const gnGenomeSpec& gngs );
    00049         /**
    00050          * Creates a gnDNASequence with the contigs stored in "gnfs".
    00051          * @param gnfs the gnFragmentSpec to get contigs from.
    00052          */
    00053         gnDNASequence( const gnFragmentSpec& gnfs );
    00054         /**
    00055          * Creates a gnDNASequence with the contigs stored in "gncs".
    00056          * @param gncs the gnContigSpec to get contigs from.
    00057          */
    00058         gnDNASequence( const gnContigSpec& gncs );
    00059         /**
    00060          * Creates a gnDNASequence with a single contig containing the bases in "bases".
    00061          * @param bases The base pairs to use
    00062          * @param length The length of the base pair array.
    00063          */
    00064         gnDNASequence( gnSeqC *bases, const gnSeqI length);
    00065         /**
    00066          * Copies the gnDNASequence "seq".
    00067          * @param seq The gnDNASequence to copy.
    00068          */
    00069         gnDNASequence( const gnDNASequence& seq);
    00070 private:
    00071         gnGenomeSpec *spec;
    00072         list<const gnBaseFilter*> filter_list;
    00073         const gnCompare* comparator;
    00074 }; // class gnDNASequence
    00075
    00076 inline
    00077 gnDNASequence::gnDNASequence() : gnSequence(){
    00078         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00079         comparator = gnCompare::DNASeqCompare();
    00080 }
    00081 inline
    00082 gnDNASequence::gnDNASequence( const gnSeqC* seq ) : gnSequence(seq){
    00083         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00084         comparator = gnCompare::DNASeqCompare();
    00085 }
    00086 inline
    00087 gnDNASequence::gnDNASequence( const string& str ) : gnSequence(str){
    00088         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00089         comparator = gnCompare::DNASeqCompare();
    00090 }
    00091 inline
    00092 gnDNASequence::gnDNASequence( const gnGenomeSpec& gngs ) : gnSequence(gngs){
    00093         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00094         comparator = gnCompare::DNASeqCompare();
    00095 }
    00096 inline
    00097 gnDNASequence::gnDNASequence( const gnFragmentSpec& gnfs ) : gnSequence(gnfs){
    00098         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00099         comparator = gnCompare::DNASeqCompare();
    00100 }
    00101 inline
    00102 gnDNASequence::gnDNASequence( const gnContigSpec& gncs ) : gnSequence(gncs){
    00103         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00104         comparator = gnCompare::DNASeqCompare();
    00105 }
    00106 inline
    00107 gnDNASequence::gnDNASequence( gnSeqC *bases, const gnSeqI length) : gnSequence(bases, length){
    00108         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00109         comparator = gnCompare::DNASeqCompare();
    00110 }
    00111 inline
    00112 gnDNASequence::gnDNASequence( const gnDNASequence& seq) : gnSequence(seq){
    00113         filter_list.push_back(gnFilter::fullDNASeqFilter());
    00114         comparator = gnCompare::DNASeqCompare();
    00115 }
    00116
    00117 #endif
    00118         // _gnDNASequence_h_