bpp-seq3  3.0.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 void subseq (const SequenceWithQuality &sequence, size_t begin, size_t end, SequenceWithQuality &output)
 Get a sub-sequence. More...
 
static std::unique_ptr< SequenceWithQualitysubseq (const SequenceWithQuality &sequence, size_t begin, size_t end)
 Get a sub-sequence. More...
 
static std::unique_ptr< SequenceWithQualityconcatenate (const SequenceWithQuality &seqwq1, const SequenceWithQuality &seqwq2)
 Concatenate two sequences. More...
 
static std::unique_ptr< SequenceWithQualitycomplement (const SequenceWithQuality &sequence)
 Get the complementary sequence of a nucleotide sequence. More...
 
static std::unique_ptr< SequenceWithQualitytranscript (const SequenceWithQuality &sequence)
 Get the transcription sequence of a DNA sequence. More...
 
static std::unique_ptr< SequenceWithQualityreverseTranscript (const SequenceWithQuality &sequence)
 Get the reverse-transcription sequence of a RNA sequence. More...
 
static std::unique_ptr< SequenceWithQualityinvert (const SequenceWithQuality &sequence)
 Inverse a sequence from 5'->3' to 3'->5' and vice-versa. More...
 
static std::unique_ptr< SequenceWithQualityremoveGaps (const SequenceWithQuality &seq)
 Remove gaps from a SequenceWithQuality. 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 26 of file SequenceWithQualityTools.h.

Member Function Documentation

◆ complement()

unique_ptr< SequenceWithQuality > SequenceWithQualityTools::complement ( const SequenceWithQuality sequence)
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 42 of file SequenceWithQualityTools.cpp.

References bpp::CruxSymbolListInterface::getAlphabet(), bpp::SequenceWithQuality::getQualities(), and bpp::NucleicAcidsReplication::translate().

◆ concatenate()

unique_ptr< SequenceWithQuality > SequenceWithQualityTools::concatenate ( const SequenceWithQuality seqwq1,
const SequenceWithQuality seqwq2 
)
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 16 of file SequenceWithQualityTools.cpp.

References bpp::CruxSymbolListInterface::getAlphabet(), bpp::SimpleCommentable::getComments(), bpp::TemplateCoreSymbolListInterface< T >::getContent(), bpp::AbstractCoreSequence::getName(), and bpp::SequenceWithQuality::getQualities().

◆ invert()

unique_ptr< 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 99 of file SequenceWithQualityTools.cpp.

References bpp::SequenceWithQuality::clone(), bpp::TemplateCoreSymbolListInterface< T >::getContent(), and bpp::SequenceWithQuality::getQualities().

◆ removeGaps()

unique_ptr< SequenceWithQuality > SequenceWithQualityTools::removeGaps ( const SequenceWithQuality seq)
static

Remove gaps from a SequenceWithQuality.

Parameters
seqThe sequence to analyse.
Returns
A new SequenceWithQuality object without gaps.

Definition at line 113 of file SequenceWithQualityTools.cpp.

References bpp::SequenceWithQuality::clone(), bpp::CruxSymbolListInterface::getAlphabet(), bpp::SequenceWithQuality::getQualities(), and bpp::CruxSymbolListInterface::size().

◆ reverseTranscript()

unique_ptr< SequenceWithQuality > SequenceWithQualityTools::reverseTranscript ( const SequenceWithQuality sequence)
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 81 of file SequenceWithQualityTools.cpp.

References bpp::CruxSymbolListInterface::getAlphabet(), and bpp::SequenceWithQuality::getQualities().

◆ subseq() [1/2]

static std::unique_ptr<SequenceWithQuality> bpp::SequenceWithQualityTools::subseq ( const SequenceWithQuality sequence,
size_t  begin,
size_t  end 
)
inlinestatic

Get a sub-sequence.

Parameters
sequenceThe sequence to trunc.
beginThe first position of the subsequence.
endThe last position of the subsequence.
Returns
A new sequence object with the given subsequence.

Definition at line 66 of file SequenceWithQualityTools.h.

References bpp::CruxSymbolListInterface::getAlphabet(), bpp::SimpleCommentable::getComments(), bpp::AbstractCoreSequence::getName(), and subseq().

◆ subseq() [2/2]

static void bpp::SequenceWithQualityTools::subseq ( const SequenceWithQuality sequence,
size_t  begin,
size_t  end,
SequenceWithQuality output 
)
inlinestatic

Get a sub-sequence.

Parameters
sequenceThe sequence to trunc.
beginThe first position of the subsequence.
endThe last position of the subsequence (included).
outputA sequence object to be appended with the given subsequence.

Definition at line 44 of file SequenceWithQualityTools.h.

References bpp::SequenceWithQuality::append(), bpp::SequenceWithQuality::getQuality(), bpp::CruxSymbolListInterface::size(), and bpp::TextTools::toString().

Referenced by subseq().

◆ transcript()

unique_ptr< SequenceWithQuality > SequenceWithQualityTools::transcript ( const SequenceWithQuality sequence)
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 66 of file SequenceWithQualityTools.cpp.

References bpp::CruxSymbolListInterface::getAlphabet(), and bpp::SequenceWithQuality::getQualities().

Member Data Documentation

◆ DNA_

DNA bpp::SequenceWithQualityTools::DNA_
staticprivate

Definition at line 29 of file SequenceWithQualityTools.h.

◆ DNARep_

NucleicAcidsReplication SequenceWithQualityTools::DNARep_
staticprivate

Definition at line 31 of file SequenceWithQualityTools.h.

◆ RNA_

RNA bpp::SequenceWithQualityTools::RNA_
staticprivate

Definition at line 30 of file SequenceWithQualityTools.h.

◆ RNARep_

NucleicAcidsReplication SequenceWithQualityTools::RNARep_
staticprivate

Definition at line 32 of file SequenceWithQualityTools.h.

◆ transc_

NucleicAcidsReplication SequenceWithQualityTools::transc_
staticprivate

Definition at line 33 of file SequenceWithQualityTools.h.


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