OpenMS
|
Representation of a nucleic acid sequence. More...
#include <OpenMS/CHEMISTRY/NASequence.h>
Classes | |
class | ConstIterator |
ConstIterator of NASequence class. More... | |
class | Iterator |
Iterator of NASequence class. More... | |
Public Types | |
enum | NASFragmentType { Full = 0 , Internal , FivePrime , ThreePrime , AIon , BIon , CIon , XIon , YIon , ZIon , Precursor , BIonMinusH20 , YIonMinusH20 , BIonMinusNH3 , YIonMinusNH3 , NonIdentified , Unannotated , WIon , AminusB , DIon , SizeOfNASFragmentType } |
an enum of all possible fragment ion types More... | |
using | ConstRibonucleotidePtr = const Ribonucleotide * |
Public Member Functions | |
NASequence ()=default | |
NASequence (const NASequence &)=default | |
default constructor More... | |
NASequence (NASequence &&)=default | |
Move constructor. More... | |
NASequence & | operator= (const NASequence &) &=default |
Copy assignment operator. More... | |
NASequence & | operator= (NASequence &&) &=default |
Move assignment operator. More... | |
NASequence (std::vector< const Ribonucleotide * > s, const RibonucleotideChainEnd *five_prime, const RibonucleotideChainEnd *three_prime) | |
full constructor More... | |
virtual | ~NASequence ()=default |
bool | operator== (const NASequence &rhs) const |
destructor More... | |
bool | operator!= (const NASequence &rhs) const |
not quality More... | |
bool | operator< (const NASequence &rhs) const |
less operator More... | |
void | setSequence (const std::vector< const Ribonucleotide * > &seq) |
getter / setter for sequence More... | |
const std::vector< const Ribonucleotide * > & | getSequence () const |
std::vector< const Ribonucleotide * > & | getSequence () |
void | set (size_t index, const Ribonucleotide *r) |
getter / setter for ribonucleotide elements (easily wrapped using pyOpenMS) More... | |
const Ribonucleotide * | get (size_t index) |
const Ribonucleotide *& | operator[] (size_t index) |
getter / setter for sequence elements (C++ container style) More... | |
const Ribonucleotide *const & | operator[] (size_t index) const |
bool | empty () const |
size_t | size () const |
void | clear () |
bool | hasFivePrimeMod () const |
5' and 3' modifications More... | |
void | setFivePrimeMod (const RibonucleotideChainEnd *r) |
const RibonucleotideChainEnd * | getFivePrimeMod () const |
bool | hasThreePrimeMod () const |
void | setThreePrimeMod (const RibonucleotideChainEnd *r) |
const RibonucleotideChainEnd * | getThreePrimeMod () const |
Iterator | begin () |
iterators More... | |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
ConstIterator | cbegin () const |
ConstIterator | cend () const |
double | getMonoWeight (NASFragmentType type=Full, Int charge=0) const |
utility functions More... | |
double | getAverageWeight (NASFragmentType type=Full, Int charge=0) const |
Get the Average Weight of a NASequence. NB returns the uncharged mass + or - proton masses to match the charge param. More... | |
EmpiricalFormula | getFormula (NASFragmentType type=Full, Int charge=0) const |
Get the formula for a NASequence. More... | |
NASequence | getPrefix (Size length) const |
Return sequence prefix of the given length (not end index!) More... | |
NASequence | getSuffix (Size length) const |
Return sequence suffix of the given length (not start index!) More... | |
NASequence | getSubsequence (Size start=0, Size length=Size(-1)) const |
Return subsequence with given starting position and length. More... | |
Static Public Member Functions | |
static NASequence | fromString (const String &s) |
create NASequence object by parsing an OpenMS string More... | |
Stream operators | |
writes a NASequence to an output stream | |
std::vector< const Ribonucleotide * > | seq_ |
const RibonucleotideChainEnd * | five_prime_ = nullptr |
const RibonucleotideChainEnd * | three_prime_ = nullptr |
std::string | toString () const |
static NASequence | fromString (const char *s) |
create NASequence object by parsing a C string (character array) More... | |
std::ostream & | operator<< (std::ostream &os, const NASequence &seq) |
static void | parseString_ (const String &s, NASequence &nas) |
static String::ConstIterator | parseMod_ (const String::ConstIterator str_it, const String &str, NASequence &nas) |
Parses modifications in square brackets. More... | |
Representation of a nucleic acid sequence.
NASequence represents nucleic acid sequences (RNA) in OpenMS. Each NASequence consists of a vector of pointers to Ribonucleotides as well as RibonucleotideChainEnds representing the 5' and 3' ends of the sequence. Each Ribonucleotide has only a single instance. These are accessible through RibonucleotideDB. Modified Ribonucleotides are included in RibonucleotideDB and are expressed as the Modomics Short name surrounded by brackets when converted to string.
using ConstRibonucleotidePtr = const Ribonucleotide* |
enum NASFragmentType |
an enum of all possible fragment ion types
Enumerator | |
---|---|
Full | with N-terminus and C-terminus |
Internal | internal, without any termini |
FivePrime | only 5' terminus |
ThreePrime | only 3' terminus |
AIon | MS:1001229 N-terminus up to the C-alpha/carbonyl carbon bond. |
BIon | MS:1001224 N-terminus up to the peptide bond. |
CIon | MS:1001231 N-terminus up to the amide/C-alpha bond. |
XIon | MS:1001228 amide/C-alpha bond up to the C-terminus. |
YIon | MS:1001220 peptide bond up to the C-terminus. |
ZIon | MS:1001230 C-alpha/carbonyl carbon bond. |
Precursor | MS:1001523 Precursor ion. |
BIonMinusH20 | MS:1001222 b ion without water. |
YIonMinusH20 | MS:1001223 y ion without water. |
BIonMinusNH3 | MS:1001232 b ion without ammonia. |
YIonMinusNH3 | MS:1001233 y ion without ammonia. |
NonIdentified | MS:1001240 Non-identified ion. |
Unannotated | no stored annotation |
WIon | W ion, added for nucleic acid support. |
AminusB | A ion with base loss, added for nucleic acid support. |
DIon | D ion, added for nucleic acid support. |
SizeOfNASFragmentType |
|
default |
|
default |
default constructor
Copy constructor
|
default |
Move constructor.
NASequence | ( | std::vector< const Ribonucleotide * > | s, |
const RibonucleotideChainEnd * | five_prime, | ||
const RibonucleotideChainEnd * | three_prime | ||
) |
full constructor
|
virtualdefault |
|
inline |
iterators
|
inline |
|
inline |
|
inline |
void clear | ( | ) |
bool empty | ( | ) | const |
Referenced by NucleicAcidSearchEngine::resolveAmbiguousMods_().
|
inline |
|
inline |
|
static |
create NASequence object by parsing a C string (character array)
s | Input string |
Exception::ParseError | if an invalid string representation of a nucleic acid sequence is passed |
|
static |
create NASequence object by parsing an OpenMS string
s | Input string |
Exception::ParseError | if an invalid string representation of a nucleic acid sequence is passed |
|
inline |
double getAverageWeight | ( | NASFragmentType | type = Full , |
Int | charge = 0 |
||
) | const |
Get the Average Weight of a NASequence. NB returns the uncharged mass + or - proton masses to match the charge param.
type | fragment type to return |
charge | how many protons to add or subtract, NB the mass returned is the UNCHARGED MASS |
const RibonucleotideChainEnd* getFivePrimeMod | ( | ) | const |
EmpiricalFormula getFormula | ( | NASFragmentType | type = Full , |
Int | charge = 0 |
||
) | const |
Get the formula for a NASequence.
type | fragment type for formula |
charge | how many H to add or subtract |
double getMonoWeight | ( | NASFragmentType | type = Full , |
Int | charge = 0 |
||
) | const |
utility functions
Get the Monoisotopic Weight of a NASequence. NB returns the uncharged mass + or - proton masses to match the charge param
type | fragment type to return |
charge | how many protons to add or subtract, NB the mass returned is the UNCHARGED MASS |
NASequence getPrefix | ( | Size | length | ) | const |
|
inline |
|
inline |
NASequence getSubsequence | ( | Size | start = 0 , |
Size | length = Size(-1) |
||
) | const |
Return subsequence with given starting position and length.
start | |
length |
NASequence getSuffix | ( | Size | length | ) | const |
const RibonucleotideChainEnd* getThreePrimeMod | ( | ) | const |
bool hasFivePrimeMod | ( | ) | const |
5' and 3' modifications
bool hasThreePrimeMod | ( | ) | const |
bool operator!= | ( | const NASequence & | rhs | ) | const |
not quality
bool operator< | ( | const NASequence & | rhs | ) | const |
less operator
|
default |
Copy assignment operator.
|
default |
Move assignment operator.
bool operator== | ( | const NASequence & | rhs | ) | const |
destructor
element-wise equality
|
inline |
getter / setter for sequence elements (C++ container style)
|
inline |
|
staticprivate |
Parses modifications in square brackets.
str_it | Current position in the string to be parsed |
str | Full input string |
nas | Current AASequence object (will be modified with the correct ribo added) |
|
staticprivate |
void set | ( | size_t | index, |
const Ribonucleotide * | r | ||
) |
getter / setter for ribonucleotide elements (easily wrapped using pyOpenMS)
void setFivePrimeMod | ( | const RibonucleotideChainEnd * | r | ) |
void setSequence | ( | const std::vector< const Ribonucleotide * > & | seq | ) |
getter / setter for sequence
void setThreePrimeMod | ( | const RibonucleotideChainEnd * | r | ) |
size_t size | ( | ) | const |
std::string toString | ( | ) | const |
Referenced by NucleicAcidSearchEngine::main_(), and NucleicAcidSearchEngine::postProcessHits_().
|
friend |
|
private |
|
private |
|
private |