Slice Tools
  • Home
  • SourceForge Page


  • libSlice
  • Home
  • Modules
  • Files
  • Examples
  • Additional Information


  • SourceForge.net Logo
     

    libSlice::ReadData Class Reference
    [C++ Interface]


    Detailed Description

    Maintains information about a given read.

    Definition at line 34 of file ReadData.hh.

    Public Member Functions

     ReadData (const char *id, const char *seqname, const char *dir, const char *chem)
     Simple constructor copies the values and parses the direction.

    void addClrData (const char *left, const char *right)
     Adds CLR data from Slice XML.

    void addNucData (const char *buffer, bool isLeft)
     Adds TrimmedSeq Nuc Data.

    void addQualData (const char *buffer, bool isLeft)
     Adds TrimmedSeq QualData.

    void flushTrimmedSeq ()
     Truncates the TrimmedSeq nucs and quals.

    void flushTrimmedSeqSide (bool flushLeft)
     Truncates the TrimmedSeq nucs and quals on a single side.

    void reverseCompliment ()
     Reverse compliments the read.

    void resetId (const string &id)
     Resets the id of a read.

    char isReverseCompliment () const
     Simple getter to get if read is reverse compliment.

    void printXML (ostream &out, const string &prefix="") const
     Prints out all of the read information in XML format.

    long getSeqleft () const
     Gets the seq left from a read.

    long getSeqright () const
     Gets the seq right from a read.

    long getClrleft () const
     Gets the clr left from a read.

    long getClrright () const
     Gets the clr right from a read.

    const string & getId () const
     Gets the id of a read.

    const string & getSeqname () const
     Gets the seqname of a read.

    const string & getChem () const
     Gets the chem of a read.

    const string & getRawNucData (bool getLeft) const
     Get the raw left or right nuc data without any reverse compliment.

    const string & getRawQualData (bool getLeft) const
     Get the raw left or right qual data without any reverse compliment.

    const string getNucData (bool getLeft) const
     Gets the left or right Nuc Data.

    const string getQualData (bool getLeft) const
     Gets the left or right Qual Data.


    Constructor & Destructor Documentation

    libSlice::ReadData::ReadData const char *  id,
    const char *  seqname,
    const char *  dir,
    const char *  chem
     

    Simple constructor copies the values and parses the direction.

    Parameters:
    id Id for the read as referenced by slice information
    seqname Internal name of the sequence [optional]
    dir Direction of read [forward if null]
    chem Chemistry of read [optional]
    Exceptions:
    Exception if id is NULL
    See also:
    parseDirection

    Definition at line 24 of file ReadData.cc.


    Member Function Documentation

    void libSlice::ReadData::addClrData const char *  left,
    const char *  right
     

    Adds CLR data from Slice XML.

    m_seqleft is atol(left), m_seqright is atol(right)

    m_clrleft is m_seqleft if !rc, m_seqright if rc
    m_clrright is m_seqright if !rc, m_seqleft if rc

    Exceptions:
    Exception if m_clrright < m_clrleft

    Definition at line 54 of file ReadData.cc.

    const string libSlice::ReadData::getNucData bool  getLeft  )  const
     

    Gets the left or right Nuc Data.

    Prepends "?" for elements that occur outside of the clear range if they were not provided as TrimmedSeq data

    Definition at line 311 of file ReadData.cc.

    const string libSlice::ReadData::getQualData bool  getLeft  )  const
     

    Gets the left or right Qual Data.

    Prepends "0" for elements that occur outside of the clear range if they were not provided as TrimmedSeq data

    Definition at line 343 of file ReadData.cc.

    char libSlice::ReadData::isReverseCompliment  )  const
     

    Simple getter to get if read is reverse compliment.

    Returns:
    (char) 0 or (char) 1 if it is reverse compliment

    Definition at line 119 of file ReadData.cc.

    void libSlice::ReadData::printXML ostream &  out,
    const string &  prefix = " "
    const
     

    Prints out all of the read information in XML format.

    Only prints clr range or trimmed sequences if provided

    Parameters:
    out Stream to write to
    prefix Prefix for each line

    Definition at line 131 of file ReadData.cc.

    void libSlice::ReadData::resetId const string &  id  ) 
     

    Resets the id of a read.

    Use readManager::resetReadId or flatten slice will fail to find the corresponding id

    Note: If you reset the id, you will become responsible for "fixing" the slices that reference it.

    Parameters:
    id New id for slice

    Definition at line 203 of file ReadData.cc.

    void libSlice::ReadData::reverseCompliment  ) 
     

    Reverse compliments the read.

    Reverse the direction, and swap the clear range attributes

    Definition at line 170 of file ReadData.cc.


    The documentation for this class was generated from the following files: