bpp-seq  2.2.0
bpp::SequenceWithQualityTools Class Reference

The SequenceWithQualityTools static class. More...

#include <Bpp/Seq/SequenceWithQualityTools.h>

+ Collaboration diagram for bpp::SequenceWithQualityTools:

Static Public Member Functions

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

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

◆ complement()

SequenceWithQuality * SequenceWithQualityTools::complement ( const SequenceWithQuality sequence)
throw (AlphabetException
)
static

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()

SequenceWithQuality * SequenceWithQualityTools::concatenate ( const SequenceWithQuality seqwq1,
const SequenceWithQuality seqwq2 
)
throw (AlphabetMismatchException,
Exception
)
static

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.

◆ invert()

SequenceWithQuality * SequenceWithQualityTools::invert ( const SequenceWithQuality sequence)
static

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().

◆ removeGaps()

◆ reverseTranscript()

SequenceWithQuality * SequenceWithQualityTools::reverseTranscript ( const SequenceWithQuality sequence)
throw (AlphabetException
)
static

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().

◆ subseq()

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.

◆ transcript()

SequenceWithQuality * SequenceWithQualityTools::transcript ( const SequenceWithQuality sequence)
throw (AlphabetException
)
static

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().

◆ trimLeft()

SequenceWithQuality & SequenceWithQualityTools::trimLeft ( SequenceWithQuality seq)
static

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

◆ _DNA

DNA SequenceWithQualityTools::_DNA
staticprivate

Definition at line 62 of file SequenceWithQualityTools.h.

◆ _DNARep

NucleicAcidsReplication bpp::SequenceWithQualityTools::_DNARep
staticprivate

Definition at line 64 of file SequenceWithQualityTools.h.

◆ _RNA

RNA SequenceWithQualityTools::_RNA
staticprivate

Definition at line 63 of file SequenceWithQualityTools.h.

◆ _RNARep

NucleicAcidsReplication bpp::SequenceWithQualityTools::_RNARep
staticprivate

Definition at line 65 of file SequenceWithQualityTools.h.

◆ _transc

NucleicAcidsReplication bpp::SequenceWithQualityTools::_transc
staticprivate

Definition at line 66 of file SequenceWithQualityTools.h.


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