15 #ifndef _GLIBCXX_STRING
35 int count_strong_helix;
42 static GBDATA *helix_gb_main;
45 static void updateHelixAndPairdef(
GBDATA *
gb_main,
const char *ali_name);
54 return count_no_helix;
57 return count_weak_helix;
60 return count_strong_helix;
71 void SQ_helix::updateHelixAndPairdef(
GBDATA *
gb_main,
const char *ali_name) {
73 gb_main != helix_gb_main ||
74 strcmp(helix_ali_name.c_str(), ali_name) != 0)
77 helix->
init(gb_main, ali_name);
82 helix_ali_name = ali_name;
88 count_strong_helix(0),
98 updateHelixAndPairdef(gb_main, alignment_name);
103 std::map<int, int> filterMap;
104 for (
size_t filter_pos = 0; filter_pos < filterLen; filter_pos++) {
105 filterMap[filterpos_2_seqpos[filter_pos]] = filter_pos;
109 count_strong_helix = 1;
110 count_weak_helix = 1;
115 std::map<int, int>::iterator it;
117 for (
size_t filter_pos = 0; filter_pos < filterLen; filter_pos++) {
118 int seq_pos = filterpos_2_seqpos[filter_pos];
123 if (v_seq_pos > seq_pos) {
124 it = filterMap.find(v_seq_pos);
126 if (it != filterMap.end()) {
127 char left = seq[filter_pos];
128 char right = seq[it->second];
135 count_strong_helix++;
141 if (!((left ==
'-') && (right ==
'-')))
bool is_pairpos(size_t pos) const
const size_t * get_filterpos_2_seqpos() const
return string(buffer, length)
int SQ_get_no_helix() const
int SQ_get_strong_helix() const
int pair_strength(char left, char right)
size_t opposite_position(size_t pos) const
static char * alignment_name
int SQ_get_weak_helix() const
bool isNull() const
test if SmartPtr is NULp
void SQ_calc_helix_layout(const char *sequence, GBDATA *gb_main, char *alignment_name, GBDATA *gb_quality, AP_filter *filter)
GB_ERROR GB_write_int(GBDATA *gbd, long i)
size_t get_filtered_length() const
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
GB_ERROR init(GBDATA *gb_main)