#include <RaaList.h>
Public Member Functions | |
int | getCount () |
Gives the number of elements (often sequences) in the list. | |
int | firstElement () |
Gives the database rank of the first element of the list. | |
int | nextElement () |
Gives the database rank of the list element following the last considered element. | |
void | setFrom (int element_rank) |
Sets an element of the list from which nextElement() will start. | |
std::string | elementName () |
Gives the name of the last considered list element. | |
int | elementLength () |
Gives the length of the last considered list element (meaningful only for sequence lists). | |
std::string | residueCount () |
Returns the total # of residues in all sequences of list (meaningful only for sequence lists). | |
void | addElement (int rank) |
Adds an element identified by its database rank to the list. | |
void | removeElement (int rank) |
Removes an element identified by its database rank from the list. | |
bool | isInList (int rank) |
Tests whether an element identified by its database rank belongs to the list. | |
void | zeroList () |
Removes all elements from the list. | |
int | getRank () |
Gives the rank of the list. | |
bool | parentsOnly () |
true means that list contains only parent sequences (does not contain any subsequence). | |
std::string | getType () |
Indicates whether the list contains sequences, species or keywords. | |
std::string | getName () |
Gives the list name. | |
RaaList * | modifyByLength (const std::string &criterion, const std::string &listname) |
Modifies a sequence list by a length criterion. | |
RaaList * | modifyByDate (const std::string &criterion, const std::string &listname) |
Modifies a sequence list by a database insertion date criterion. | |
Static Public Attributes | |
static const std::string | LIST_SEQUENCES = "sequence list" |
Refers to a sequence list. | |
static const std::string | LIST_KEYWORDS = "keyword list" |
Refers to a keyword list. | |
static const std::string | LIST_SPECIES = "species list" |
Refers to a species list. | |
Friends | |
class | RAA |
Instances of this class are created by database queries. Each instance contains one or several elements that are often sequences, but can also be species or keywords. Iteration through all elements of the list is possible.
std::string bpp::RaaList::getType | ( | ) | [inline] |
Indicates whether the list contains sequences, species or keywords.
RaaList* bpp::RaaList::modifyByDate | ( | const std::string & | criterion, | |
const std::string & | listname | |||
) |
Modifies a sequence list by a database insertion date criterion.
The database insertion date of each sequence is that of the last DT record for the embl/swissprot format, or that of the LOCUS record for the GenBank format.
criterion | Date criterion such as "> 1/jun/98" or "<10/DEC/2004". Year can be expressed with 2 or 4 digits. Case is not significant. | |
listname | Name to be given to the created list of sequences matching the date criterion. |
RaaList* bpp::RaaList::modifyByLength | ( | const std::string & | criterion, | |
const std::string & | listname | |||
) |
Modifies a sequence list by a length criterion.
criterion | Length criterion such as "> 1000" or "<5000". | |
listname | Name to be given to created list of sequences matching the length criterion. |
string RaaList::residueCount | ( | ) |
Returns the total # of residues in all sequences of list (meaningful only for sequence lists).
Because this count can exceed a long integer, it is returned as a string.
void RaaList::setFrom | ( | int | element_rank | ) |
Sets an element of the list from which nextElement() will start.
element_rank | The database rank of an element of the list, typically returned by a previous nextElement() call. |