/usr/include/Bpp/Raa/RaaList.h is in libbpp-raa-dev 2.0.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | #ifndef _RAALIST_H_
#define _RAALIST_H_
#include <string>
namespace bpp {
class RAA;
/**
* @brief 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.
*/
class RaaList {
friend class RAA;
RAA *myraa;
int rank;
std::string name;
const std::string *type;
int from;
std::string elementname;
int elementlength;
public:
/**
* @brief Refers to a sequence list.
*/
static const std::string LIST_SEQUENCES;
/**
* @brief Refers to a keyword list.
*/
static const std::string LIST_KEYWORDS;
/**
* @brief Refers to a species list.
*/
static const std::string LIST_SPECIES;
/**
* @brief Gives the number of elements (often sequences) in the list.
*/
int getCount();
/**
* @brief Gives the database rank of the first element of the list.
*/
int firstElement();
/**
* @brief Gives the database rank of the list element following the last considered element.
*/
int nextElement();
/**
* @brief Sets an element of the list from which nextElement() will start.
*
* @param element_rank The database rank of an element of the list, typically returned by
* a previous nextElement() call.
*/
void setFrom(int element_rank);
/**
* @brief Gives the name of the last considered list element.
*/
std::string elementName() {return elementname; };
/**
* @brief Gives the length of the last considered list element (meaningful only for sequence lists).
*/
int elementLength() {return elementlength; };
/**
* @brief 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.
*/
std::string residueCount();
/**
* @brief Adds an element identified by its database rank to the list.
*/
void addElement(int rank);
/**
* @brief Removes an element identified by its database rank from the list.
*/
void removeElement(int rank);
/**
* @brief Tests whether an element identified by its database rank belongs to the list.
*/
bool isInList(int rank);
/**
* @brief Removes all elements from the list.
*/
void zeroList();
/**
* @brief Gives the rank of the list.
*/
int getRank() {return rank; };
/**
* @brief true means that list contains only parent sequences (does not contain any subsequence).
*/
bool parentsOnly();
/**
* @brief Indicates whether the list contains sequences, species or keywords.
*
* @return can be "sequence list", "species list", or "keyword list"
*/
std::string getType() {return *type; };
/**
* @brief Gives the list name.
*/
std::string getName() {return name; };
/**
* @brief Modifies a sequence list by a length criterion.
*
* @param criterion Length criterion such as "> 1000" or "<5000".
* @param listname Name to be given to created list of sequences matching the length criterion.
* @return A new list of sequences matching the length criterion, or NULL if error.
*/
RaaList *modifyByLength(const std::string &criterion, const std::string &listname);
/**
* @brief 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.
*
* @param 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.
* @param listname Name to be given to the created list of sequences matching the date criterion.
* @return A new list of sequences matching the date criterion, or NULL if error.
*/
RaaList *modifyByDate(const std::string &criterion, const std::string &listname);
private:
RaaList();
};
} //end of namespace bpp.
#endif //_RAALIST_H_
|