bpp-seq  2.1.0
bpp::SequenceWithQualityTools Class Reference

The SequenceWithQualityTools static class. More...

#include <Bpp/Seq/SequenceWithQualityTools.h>

+ Collaboration diagram for bpp::SequenceWithQualityTools:

List of all members.

Static Public Member Functions

static SequenceWithQualitysubseq (const SequenceWithQuality &sequence, unsigned int begin, unsigned int end) throw (IndexOutOfBoundsException, Exception)
 Get a sub-sequence.
static SequenceWithQualityconcatenate (const SequenceWithQuality &seqwq1, const SequenceWithQuality &seqwq2) throw (AlphabetMismatchException, Exception)
 Concatenate two sequences.
static SequenceWithQualitycomplement (const SequenceWithQuality &sequence) throw (AlphabetException)
 Get the complementary sequence of a nucleotide sequence.
static SequenceWithQualitytranscript (const SequenceWithQuality &sequence) throw (AlphabetException)
 Get the transcription sequence of a DNA sequence.
static SequenceWithQualityreverseTranscript (const SequenceWithQuality &sequence) throw (AlphabetException)
 Get the reverse-transcription sequence of a RNA sequence.
static SequenceWithQualityinvert (const SequenceWithQuality &sequence)
 Inverse a sequence from 5'->3' to 3'->5' and vice-versa.
static SequenceWithQualityremoveGaps (const SequenceWithQuality &seq)
 Remove gaps from a SequenceWithQuality.
static SequenceWithQualitytrimLeft (SequenceWithQuality &seq)
 Trim the left part of the sequence according to quality.

Static Private Attributes

static DNA _DNA
static RNA _RNA
static NucleicAcidsReplication _DNARep
static NucleicAcidsReplication _RNARep
static NucleicAcidsReplication _transc

Detailed Description

The SequenceWithQualityTools static class.

Implement methods to manipulate SequencesWithQuality

Todo:
  • does complement, transcript and reverseTranscript have a meaning on SequenceWithQuality as the quality is not transferable
Author:
Cahais Vincent

Definition at line 60 of file SequenceWithQualityTools.h.


Member Function Documentation

Get the complementary sequence of a nucleotide sequence.

See also:
DNAReplication
Returns:
sequence A new SequenceWithQuality object with the complementary sequence.
Parameters:
sequenceThe sequence to complement.
Exceptions:
AlphabetExceptionIf the sequence is not a nucleotide sequence.

Definition at line 100 of file SequenceWithQualityTools.cpp.

References bpp::SymbolList::getContent(), and bpp::NucleicAcidsReplication::translate().

Concatenate two sequences.

Sequences must have the same name and alphabets. Only first sequence's commentaries are kept.

Parameters:
seqwq1The first SequenceWithQuality.
seqwq2The second SequenceWithQuality.
Returns:
A new SequenceWithQuality object with the concatenation of the two sequences.
Exceptions:
AlphabetMismatchExceptionIf the two alphabets do not match.
ExceptionIf the sequence names do not match.

Definition at line 77 of file SequenceWithQualityTools.cpp.

Inverse a sequence from 5'->3' to 3'->5' and vice-versa.

ABCDEF becomes FEDCBA, and the sense attribute is changed (may be inhibited).

Returns:
A new SequenceWithQuality object containing the inverted sequence.
Parameters:
sequenceThe SequenceWithQuality to inverse.

Definition at line 155 of file SequenceWithQualityTools.cpp.

References bpp::SequenceWithQuality::clone(), bpp::EdSymbolList::getContent(), and bpp::SequenceWithQuality::getQualities().

Get the reverse-transcription sequence of a RNA sequence.

See also:
DNAReplication
Returns:
sequence A new SequenceWithQuality object with the reverse- transcription sequence.
Parameters:
sequenceThe SequenceWithQuality to reverse-transcript.
Exceptions:
AlphabetExceptionIf the sequence is not a RNA sequence.

Definition at line 139 of file SequenceWithQualityTools.cpp.

References bpp::SymbolList::getContent().

SequenceWithQuality * SequenceWithQualityTools::subseq ( const SequenceWithQuality sequence,
unsigned int  begin,
unsigned int  end 
) throw (IndexOutOfBoundsException, Exception) [static]

Get a sub-sequence.

Parameters:
sequenceThe sequence to trunc.
beginThe first position of the subsequence.
endThe last position of the subsequence.
Returns:
A new SequenceWithQuality object with the given subsequence.
Exceptions:
IndexOutOfBoundsException,ExceptionIn case of bad indices.

Definition at line 54 of file SequenceWithQualityTools.cpp.

Get the transcription sequence of a DNA sequence.

See also:
DNAReplication
Returns:
sequence A new SequenceWithQuality object with the transcription sequence.
Parameters:
sequenceThe sequence to transcript.
Exceptions:
AlphabetExceptionIf the sequence is not a DNA sequence.

Definition at line 124 of file SequenceWithQualityTools.cpp.

References bpp::SymbolList::getContent().

Trim the left part of the sequence according to quality.

Parameters:
seqThe sequence to analyse.
Returns:
The modified sequence.

Definition at line 189 of file SequenceWithQualityTools.cpp.


Member Data Documentation

Definition at line 62 of file SequenceWithQualityTools.h.

Definition at line 63 of file SequenceWithQualityTools.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends