#include <Bioseq.hh>
Inheritance diagram for RazorBack::Bioseq_:
Public Methods | |
Bioseq_ (Monomer_::Type_ Mt=Monomer_::PROT) | |
Create a sequence object with the prescribed monomer type (amino acid codes by default). More... | |
Bioseq_ (const char *Codes) | |
Create a sequence object with the prescribed monomer alphabet given in Codes. More... | |
Bioseq_ (const Bioseq_ &B) | |
copy ctor. | |
const string& | id () const |
id(), id(I), title(), title(T), annot(), annot(A), nocase(), nocase(N): methods for getting and setting the corresponding members. | |
string& | id () |
void | id (const string &I) |
const string& | title () const |
string& | title () |
void | title (const string &T) |
const string& | annot () const |
string& | annot () |
void | annot (const string &A) |
bool | nocase () const |
bool | nocase (bool N) |
const Monomer_& | monomer () const |
monomer(): const access to the monomer alphabet. More... | |
const string& | seq () const |
seq(): returns the sequence contained in the object. More... | |
virtual void | seq (const string &S) |
seq(S): stores the sequence S in the calling object. More... | |
size_t | length () const |
Returns the length of the sequence in the calling object. | |
char | operator[] (size_t Idx) const |
[]: unsafe index operator for the Idx:th char in the sequence. | |
char& | operator[] (size_t Idx) |
virtual char | at_1 (size_t Idx) const |
at_1(Idx), at_1(Idx, C): safe index operator for the Idx:th char in the sequence. More... | |
virtual bool | at_1 (size_t Idx, char C) |
const char* | at_3 (size_t Idx) const |
at_3(Idx), at_3(Idx, Ccc): safe index operator for getting and setting a monomer using the 3-letter abbreviations. More... | |
bool | at_3 (size_t Idx, const char *Ccc) |
int | uppercase () |
uppercase(), lowercase(): convert the sequence string to all-uppercase or all-lowercase. More... | |
int | lowercase () |
virtual bool | is_legal (char C) const |
is_legal(C): returns true if C is a legal character in the calling object under the current monomer alphabet and case-sensitivity setting. More... | |
virtual bool | is_legal (const char *Ccc) const |
bool | is_legal (const string &S) const |
virtual Errtype_ | read_seq (istream &Inf, int Type=Monomer_::USER, int Format=ANYFORMAT) |
read_seq(Inf, Type, Format): tries to read a sequence from the input stream Inf. More... | |
virtual Errtype_ | write_seq (ostream &Outf, int Format) const |
write_seq(Outf, Format): writes the contents of the calling object to Outf according to the format specification in Format. More... | |
Protected Methods | |
Monomer_& | chg_monomer () |
virtual bool | is_legal (int Mt, char C) const |
string& | sequence () |
Private Attributes | |
Monomer_ | Monomer |
the monomer alphabet. | |
bool | Nocase |
allows case-independent monomer match when true. | |
string | Seq |
the sequence (1-char abbreviations). | |
string | ID |
the short identification tag of the sequence. | |
string | Title |
the "title" of the sequence (max. one line). | |
string | Annot |
annotation (free format). |
Stores the monomer alphabet, the sequence, its ID, title and some annotation. Uses the I/O methods inherited from Bioseqio_.
Definition at line 49 of file Bioseq.hh.
|
Create a sequence object with the prescribed monomer type (amino acid codes by default). Consult "Monomer.hh" for available monomer types. |
|
Create a sequence object with the prescribed monomer alphabet given in Codes. Consult "Monomer.hh" for code string syntax. |
|
copy ctor.
|
|
id(), id(I), title(), title(T), annot(), annot(A), nocase(), nocase(N): methods for getting and setting the corresponding members.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 99 of file Bioseq.hh. Referenced by RazorBack::Gapseq_::is_legal(). |
|
|
|
monomer(): const access to the monomer alphabet. The monomer type of a sequence object can be changed only through assignment or input. Definition at line 107 of file Bioseq.hh. Referenced by RazorBack::Gapseq_::is_legal(). |
|
seq(): returns the sequence contained in the object. See sequence() for hidden non-const access. Reimplemented in RazorBack::Gapseq_. Definition at line 113 of file Bioseq.hh. Referenced by length(). |
|
seq(S): stores the sequence S in the calling object. Refuses storage if S does not correspond to calling obj type. Reimplemented in RazorBack::Gapseq_. |
|
Returns the length of the sequence in the calling object.
|
|
[]: unsafe index operator for the Idx:th char in the sequence.
|
|
|
|
at_1(Idx), at_1(Idx, C): safe index operator for the Idx:th char in the sequence. The non-const version refuses to store characters not corresponding to the current type of the calling object. Throws Indexrangexc_ if Idx is illegal. Returns true on success, false when C was illegal. Reimplemented in RazorBack::Gapseq_. |
|
Reimplemented in RazorBack::Gapseq_. |
|
at_3(Idx), at_3(Idx, Ccc): safe index operator for getting and setting a monomer using the 3-letter abbreviations. The non-const version refuses to store abbreviations that are illegal. Throws Indexrangexc_ if Idx is illegal. Returns true on success, false when Ccc was illegal. Reimplemented in RazorBack::Gapseq_. |
|
Reimplemented in RazorBack::Gapseq_. |
|
uppercase(), lowercase(): convert the sequence string to all-uppercase or all-lowercase. Return the number of characters converted. |
|
|
|
is_legal(C): returns true if C is a legal character in the calling object under the current monomer alphabet and case-sensitivity setting. is_legal(Ccc): does the same for 3-letter abbreviations. is_legal(S): does the same for the complete sequence string S. Reimplemented in RazorBack::Gapseq_. Definition at line 177 of file Bioseq.hh. Referenced by seq(). |
|
Reimplemented in RazorBack::Gapseq_. |
|
Reimplemented in RazorBack::Gapseq_. |
|
read_seq(Inf, Type, Format): tries to read a sequence from the input stream Inf. If Type is set to Monomer_::PROT, then only protein sequences will be read, if it is set to Monomer_::[DEOXY[RIBO]]NUCL, then only the corresponding nucleic acide sequences will be read, if Type is Monomer_::USER (default) or an OR-ed combination of PROT and *NUCL, then all types are considered and a polymer type autodetection is attempted. This is not foolproof. Format can be set to ANYFORMAT (default), in this case automatic file format detection is performed, or to a concrete file format. Type and Format may be incompatible:- PIR, SWISS are for proteins only, EMBL is for nucleic acids only. No read is performed and FORMATERR is returned when incompatible type and format are specified. Return value: OK or an error enum if something went wrong. Reimplemented in RazorBack::Gapseq_. |
|
write_seq(Outf, Format): writes the contents of the calling object to Outf according to the format specification in Format. Returns OK or an error enum if something went wrong. Reimplemented in RazorBack::Gapseq_. |
|
|
|
Reimplemented in RazorBack::Gapseq_. |
|
Definition at line 218 of file Bioseq.hh. Referenced by RazorBack::Gapseq_::seq(). |
|
the monomer alphabet.
|
|
allows case-independent monomer match when true.
|
|
the sequence (1-char abbreviations).
|
|
the short identification tag of the sequence.
|
|
the "title" of the sequence (max. one line).
|
|
annotation (free format).
|