bpp::RaaList Class Reference

List of sequences, keywords, or species returned by a database query. More...

#include <RaaList.h>

List of all members.

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.
RaaListmodifyByLength (const std::string &criterion, const std::string &listname)
 Modifies a sequence list by a length criterion.
RaaListmodifyByDate (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


Detailed Description

List of sequences, keywords, or species returned by a database query.

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.


Member Function Documentation

std::string bpp::RaaList::getType (  )  [inline]

Indicates whether the list contains sequences, species or keywords.

Returns:
can be "sequence list", "species list", or "keyword list"

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.

Parameters:
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.
Returns:
A new list of sequences matching the date criterion, or NULL if error.

RaaList* bpp::RaaList::modifyByLength ( const std::string &  criterion,
const std::string &  listname 
)

Modifies a sequence list by a length criterion.

Parameters:
criterion Length criterion such as "> 1000" or "<5000".
listname Name to be given to created list of sequences matching the length criterion.
Returns:
A new list of sequences matching the length criterion, or NULL if error.

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.

Parameters:
element_rank The database rank of an element of the list, typically returned by a previous nextElement() call.


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

Generated on Sat Sep 5 17:53:47 2009 for RAA by  doxygen 1.5.9