genome::gnRAWSequence Class Reference

gnRAWSequence is a bastardization of gnSequence that creates a lightweight wrapper around a memory-mapped file of raw sequence data More...

#include <gnRAWSequence.h>

List of all members.

Public Member Functions

virtual uint32 addFeature (gnBaseFeature *feature)
virtual void addHeader (const uint32 contigI, gnBaseHeader *header, const uint32 headerI)
gnRAWSequenceClone () const
gnRAWSequence contig (const uint32 contigI) const
gnRAWSequence contigByBase (const gnSeqI baseI) const
virtual gnSequence contigByName (std::string &contigName) const
uint32 contigIndexByBase (const gnSeqI baseI) const
virtual uint32 contigIndexByName (std::string &contigName) const
virtual gnSeqI contigLength (const uint32 contigI) const
gnSeqI contigListLength () const
gnSeqI contigListSize () const
virtual std::string contigName (const uint32 contigI) const
virtual gnSeqI contigStart (const uint32 contigI) const
virtual gnSeqI find (const gnRAWSequence &search, const gnSeqI offset=0) const
virtual void getBrokenFeatures (const gnLocation &lt, std::vector< gnBaseFeature * > &feature_vector) const
virtual void getContainedFeatures (const gnLocation &lt, std::vector< gnBaseFeature * > &feature_vector, std::vector< uint32 > &index_vector) const
virtual gnBaseFeature * getFeature (const uint32 featureI) const
virtual uint32 getFeatureListLength () const
virtual gnBaseHeader * getHeader (const uint32 contigI, const uint32 headerI) const
virtual uint32 getHeaderListLength (const uint32 contigI) const
virtual void getIntersectingFeatures (const gnLocation &lt, std::vector< gnBaseFeature * > &feature_vector, std::vector< uint32 > &index_vector) const
virtual gnSeqC GetSeqC (const gnSeqI offset) const
virtual void globalToLocal (uint32 &contigI, gnSeqI &baseI) const
virtual void globalToSource (uint32 &contigI, gnSeqI &baseI) const
 gnRAWSequence (const std::string &filename)
 Creates a gnRAWSequence based on the file specified by filename.

 gnRAWSequence ()
 Empty Constructor, creates an empty gnRAWSequence.

virtual boolean isCircular () const
virtual boolean isReverseComplement (const uint32 contigI=ALL_CONTIGS)
virtual gnSeqI length () const
 Writes the bases in this sequence to the specified output stream (e.g.

virtual bool LoadSource (const std::string sourcename)
virtual void localToGlobal (const uint32 contigI, gnSeqI &baseI) const
virtual void localToSource (uint32 &contigI, gnSeqI &baseI) const
virtual void merge (const gnSeqI startI, const gnSeqI endI)
virtual void mergeContigs (const uint32 startC, const uint32 endC)
gnRAWSequenceoperator+= (const gnRAWSequence &seq)
 Appends the bases in "seq" to this sequence.

gnSeqC operator[] (const gnSeqI offset) const
virtual void removeFeature (const uint32 featureI)
virtual void removeHeader (const uint32 contigI, const uint32 headerI)
virtual void setCircular (const boolean value)
virtual void setContigName (const uint32 contigI, const std::string &contig_name)
virtual void setReverseComplement (const boolean revComp, const uint32 contigI=ALL_CONTIGS)
virtual gnSeqI size () const
virtual void splitContig (const gnSeqI splitI, const uint32 contigI=ALL_CONTIGS)
gnRAWSequence subseq (const gnSeqI offset, const gnSeqI length) const
 Compares the bases in "seq" to this sequence.

virtual boolean ToArray (gnSeqC *pSeqC, gnSeqI length, const gnSeqI offset=1) const
virtual boolean ToString (std::string &str, const gnSeqI length=GNSEQI_END, const gnSeqI offset=1) const
virtual std::string ToString (const gnSeqI length=GNSEQI_END, const gnSeqI offset=1) const

Private Attributes

boost::iostreams::mapped_file_source data
std::string filename


Detailed Description

gnRAWSequence is a bastardization of gnSequence that creates a lightweight wrapper around a memory-mapped file of raw sequence data

Definition at line 35 of file gnRAWSequence.h.


Constructor & Destructor Documentation

genome::gnRAWSequence::gnRAWSequence  ) 
 

Empty Constructor, creates an empty gnRAWSequence.

genome::gnRAWSequence::gnRAWSequence const std::string &  filename  )  [inline]
 

Creates a gnRAWSequence based on the file specified by filename.

Definition at line 45 of file gnRAWSequence.h.


Member Function Documentation

virtual uint32 genome::gnRAWSequence::addFeature gnBaseFeature *  feature  )  [inline, virtual]
 

Definition at line 97 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::addHeader const uint32  contigI,
gnBaseHeader *  header,
const uint32  headerI
[inline, virtual]
 

Definition at line 102 of file gnRAWSequence.h.

gnRAWSequence* genome::gnRAWSequence::Clone  )  const [inline]
 

Definition at line 51 of file gnRAWSequence.h.

gnRAWSequence genome::gnRAWSequence::contig const uint32  contigI  )  const [inline]
 

Definition at line 59 of file gnRAWSequence.h.

gnRAWSequence genome::gnRAWSequence::contigByBase const gnSeqI  baseI  )  const [inline]
 

Definition at line 63 of file gnRAWSequence.h.

virtual gnSequence genome::gnRAWSequence::contigByName std::string &  contigName  )  const [inline, virtual]
 

Definition at line 82 of file gnRAWSequence.h.

uint32 genome::gnRAWSequence::contigIndexByBase const gnSeqI  baseI  )  const [inline]
 

Definition at line 55 of file gnRAWSequence.h.

virtual uint32 genome::gnRAWSequence::contigIndexByName std::string &  contigName  )  const [inline, virtual]
 

Definition at line 75 of file gnRAWSequence.h.

virtual gnSeqI genome::gnRAWSequence::contigLength const uint32  contigI  )  const [inline, virtual]
 

Definition at line 71 of file gnRAWSequence.h.

gnSeqI genome::gnRAWSequence::contigListLength  )  const [inline]
 

Definition at line 54 of file gnRAWSequence.h.

gnSeqI genome::gnRAWSequence::contigListSize  )  const [inline]
 

Definition at line 53 of file gnRAWSequence.h.

virtual std::string genome::gnRAWSequence::contigName const uint32  contigI  )  const [inline, virtual]
 

Definition at line 78 of file gnRAWSequence.h.

virtual gnSeqI genome::gnRAWSequence::contigStart const uint32  contigI  )  const [inline, virtual]
 

Definition at line 67 of file gnRAWSequence.h.

virtual gnSeqI genome::gnRAWSequence::find const gnRAWSequence search,
const gnSeqI  offset = 0
const [inline, virtual]
 

Definition at line 183 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::getBrokenFeatures const gnLocation &  lt,
std::vector< gnBaseFeature * > &  feature_vector
const [inline, virtual]
 

Definition at line 99 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::getContainedFeatures const gnLocation &  lt,
std::vector< gnBaseFeature * > &  feature_vector,
std::vector< uint32 > &  index_vector
const [inline, virtual]
 

Definition at line 95 of file gnRAWSequence.h.

virtual gnBaseFeature* genome::gnRAWSequence::getFeature const uint32  featureI  )  const [inline, virtual]
 

Definition at line 94 of file gnRAWSequence.h.

virtual uint32 genome::gnRAWSequence::getFeatureListLength  )  const [inline, virtual]
 

Definition at line 91 of file gnRAWSequence.h.

virtual gnBaseHeader* genome::gnRAWSequence::getHeader const uint32  contigI,
const uint32  headerI
const [inline, virtual]
 

Definition at line 101 of file gnRAWSequence.h.

virtual uint32 genome::gnRAWSequence::getHeaderListLength const uint32  contigI  )  const [inline, virtual]
 

Definition at line 100 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::getIntersectingFeatures const gnLocation &  lt,
std::vector< gnBaseFeature * > &  feature_vector,
std::vector< uint32 > &  index_vector
const [inline, virtual]
 

Definition at line 96 of file gnRAWSequence.h.

virtual gnSeqC genome::gnRAWSequence::GetSeqC const gnSeqI  offset  )  const [inline, virtual]
 

Definition at line 174 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::globalToLocal uint32 &  contigI,
gnSeqI &  baseI
const [inline, virtual]
 

Definition at line 109 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::globalToSource uint32 &  contigI,
gnSeqI &  baseI
const [inline, virtual]
 

Definition at line 111 of file gnRAWSequence.h.

virtual boolean genome::gnRAWSequence::isCircular  )  const [inline, virtual]
 

Definition at line 106 of file gnRAWSequence.h.

virtual boolean genome::gnRAWSequence::isReverseComplement const uint32  contigI = ALL_CONTIGS  )  [inline, virtual]
 

Definition at line 105 of file gnRAWSequence.h.

virtual gnSeqI genome::gnRAWSequence::length  )  const [inline, virtual]
 

Writes the bases in this sequence to the specified output stream (e.g.

cout).

Definition at line 152 of file gnRAWSequence.h.

References size().

Referenced by mems::LoadAndCreateRawSequences().

virtual bool genome::gnRAWSequence::LoadSource const std::string  sourcename  )  [inline, virtual]
 

Definition at line 113 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::localToGlobal const uint32  contigI,
gnSeqI &  baseI
const [inline, virtual]
 

Definition at line 110 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::localToSource uint32 &  contigI,
gnSeqI &  baseI
const [inline, virtual]
 

Definition at line 112 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::merge const gnSeqI  startI,
const gnSeqI  endI
[inline, virtual]
 

Definition at line 85 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::mergeContigs const uint32  startC,
const uint32  endC
[inline, virtual]
 

Definition at line 86 of file gnRAWSequence.h.

gnRAWSequence& genome::gnRAWSequence::operator+= const gnRAWSequence seq  ) 
 

Appends the bases in "seq" to this sequence.

gnSeqC genome::gnRAWSequence::operator[] const gnSeqI  offset  )  const [inline]
 

Definition at line 178 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::removeFeature const uint32  featureI  )  [inline, virtual]
 

Definition at line 98 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::removeHeader const uint32  contigI,
const uint32  headerI
[inline, virtual]
 

Definition at line 103 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::setCircular const boolean  value  )  [inline, virtual]
 

Definition at line 107 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::setContigName const uint32  contigI,
const std::string &  contig_name
[inline, virtual]
 

Definition at line 89 of file gnRAWSequence.h.

virtual void genome::gnRAWSequence::setReverseComplement const boolean  revComp,
const uint32  contigI = ALL_CONTIGS
[inline, virtual]
 

Definition at line 104 of file gnRAWSequence.h.

virtual gnSeqI genome::gnRAWSequence::size  )  const [inline, virtual]
 

Definition at line 153 of file gnRAWSequence.h.

Referenced by length().

virtual void genome::gnRAWSequence::splitContig const gnSeqI  splitI,
const uint32  contigI = ALL_CONTIGS
[inline, virtual]
 

Definition at line 87 of file gnRAWSequence.h.

gnRAWSequence genome::gnRAWSequence::subseq const gnSeqI  offset,
const gnSeqI  length
const [inline]
 

Compares the bases in "seq" to this sequence.

Parameters:
seq The sequence to compare this sequence to.
Returns:
Negative if this sequence is lesser, 0 if the two sequences are equal, and positive if this sequence is greater.

Definition at line 140 of file gnRAWSequence.h.

References data.

virtual boolean genome::gnRAWSequence::ToArray gnSeqC *  pSeqC,
gnSeqI  length,
const gnSeqI  offset = 1
const [inline, virtual]
 

Definition at line 168 of file gnRAWSequence.h.

virtual boolean genome::gnRAWSequence::ToString std::string &  str,
const gnSeqI  length = GNSEQI_END,
const gnSeqI  offset = 1
const [inline, virtual]
 

Definition at line 162 of file gnRAWSequence.h.

virtual std::string genome::gnRAWSequence::ToString const gnSeqI  length = GNSEQI_END,
const gnSeqI  offset = 1
const [inline, virtual]
 

Definition at line 155 of file gnRAWSequence.h.


Member Data Documentation

boost::iostreams::mapped_file_source genome::gnRAWSequence::data [private]
 

Definition at line 186 of file gnRAWSequence.h.

Referenced by subseq().

std::string genome::gnRAWSequence::filename [private]
 

Definition at line 187 of file gnRAWSequence.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 14 06:01:38 2008 for libMems by doxygen 1.3.6