1 /////////////////////////////////////////////////////////////
3 // Profile Stem Candidate calcurated by profile base pairing
5 ////////////////////////////////////////////////////////////
7 #ifndef __STEMCANDIDATE_HPP__
8 #define __STEMCANDIDATE_HPP__
18 int numSeq; /* the number of sequences in the profile */
19 int length; /* length of profile stem candidate of fixed length */
20 int position; /* 5' start position of SC in profile */
22 std::vector<std::string> substr; /* profile base string of SC */
23 std::vector<std::string> rvstr; /* profile base string of stem partner of SC */
24 int rvposition; /* 3' end position of stem partner of SC */
25 int rvscnumber; /* SC number of stem partner */
26 int contPos; /* previous stem that corresponds continuous stem and has position -1. */
27 int beforePos; /* most recent stem that doesn't overlap to SC and has position -len. */
28 float score; /* score of the sum of base pairing probability matrix */
29 std::vector<float> baseScore;
30 float stacking; /* the mean of stacking energy */
31 float stemStacking; /* the mean of 1-continuous stacking energy */
34 StemCandidate() : numSeq(0), length(0), position(0), distance(0),
35 rvposition(0), rvscnumber(0), contPos(-1), beforePos(0),
36 score(0), stacking(0), stemStacking(0) {}
37 StemCandidate(int numSeq, int length) : numSeq(numSeq), length(length),
38 substr(numSeq), rvstr(numSeq),
41 void SetNumSeq(int num) { numSeq = num; }
42 void SetLength(int len) { length = len; }
43 void SetNumSubstr(int num) {
45 for(int i = 0; i < num; i++) {
46 string &tmpStr = substr[i];
51 void SetNumRvstr(int num) {
54 for(int i = 0; i < num; i++) {
55 string &tmpStr = rvstr[i];
60 void SetPosition(int pos) { position = pos; }
62 void AddSubstr(int num, char word) {
63 std::string &tmpStr = substr[num];
68 void AddRvstr(int num, char word) {
69 std::string &tmpStr = rvstr[num];
74 void AddBaseScore(float score) {
75 baseScore.push_back(score);
78 void SetRvposition(int pos) { rvposition = pos; }
79 void SetRvscnumber(int num) { rvscnumber = num; }
80 void SetContPos(int pos) { contPos = pos; }
81 void SetBeforePos(int pos) { beforePos = pos; }
82 void SetDistance(int d) { distance = d; }
83 void SetScore(float s) { score = s; }
84 void AddScore(float s) { score += s; }
85 void SetStacking(float s) { stacking = s; }
86 void AddStacking(float s) { stacking += s; }
87 void SetStemStacking(float s) { stemStacking = s; }
88 int GetNumSeq() const { return numSeq; }
89 int GetLength() const { return length; }
90 int GetPosition() const { return position; }
92 string GetSubstr(int num) const {
93 const std::string &tmpStr = substr[num];
96 string GetRvstr(int num) const {
97 const std::string &tmpStr = rvstr[num];
100 float GetBaseScore(int i) const {
103 int GetRvposition() const {
106 int GetRvscnumber() const {
109 int GetContPos() const {
112 int GetBeforePos() const {
115 int GetDistance() const {
118 float GetScore() const {
121 float GetStacking() const {
124 float GetStemStacking() const {
129 #endif // __STEMCANDIDATE_HPP__