11 #ifndef FILTEREDEXPORT_H
12 #define FILTEREDEXPORT_H
17 #ifndef _GLIBCXX_STRING
34 memset(table, 0, 256);
37 for (
int i = 0; chars[i]; ++i) {
39 if (c ==
'-' && prevchar) {
40 uint8_t toChar = chars[i+1];
44 bool expand = prevchar<=toChar;
46 for (
unsigned b = prevchar; b<=toChar && expand; ++b) {
47 if (!isalnum(b)) expand =
false;
52 for (
unsigned b = prevchar; b<=toChar; ++b) {
74 bool isSet(uint8_t i)
const {
return table[i]; }
76 static char buf[256+1];
78 for (
unsigned i = 0; i<256; ++i) {
100 characters(characters_),
101 inverse(!filter_chars)
114 bool accept_missing_data;
127 char *get_filtered_sequence(
GBDATA *gb_species,
const char*& reason)
const;
128 char *get_fasta_header(
GBDATA *gb_species)
const;
130 #if defined(UNIT_TESTS)
131 friend void TEST_FilteredExport();
134 int count_bases(
const char *
seq)
const;
143 minCount = minCount_;
153 filter_added =
false;
167 #error FilteredExport.h included twice
168 #endif // FILTEREDEXPORT_H
#define implicated(hypothesis, conclusion)
return string(buffer, length)
AP_filter * make_filter(GBDATA *gb_main, const char *aliName, size_t aliSize) const
void set_required_baseCount(const char *basesToCount, int minCount_)
GB_ERROR write_fasta(FILE *out)
FilteredExport(GBDATA *gb_main_, const char *aliname_, size_t alisize_)
void reset_required_baseCount()
void do_accept_missing_data()
void set_header_ACI(const char *aci)
FilterDefType get_type() const
bool isSet(uint8_t i) const
const char * get_aliname() const
CharRangeTable(const char *chars)
const char * expandedRange() const
#define __ATTR__USERESULT
FilterDefinition(const char *sai_name_, FilterDefType type_, bool filter_chars, const char *characters_)
void set_sequence_ACI(const char *aci)
GB_ERROR add_SAI_filter(const FilterDefinition &filterDef) __ATTR__USERESULT