ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/PrimerMatch/filter_bitvec.h
Revision: 1.2
Committed: Wed May 4 18:03:45 2005 UTC (11 years, 1 month ago) by nje01
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -1 lines
Log Message:
Small bug fixes, plus codon based edit distance for peptide searching.

Line File contents
1 /**************************************************************************
2 * This code is part of the supporting infrastructure for ATA Mapper.
3 * Copyright (C) 2002,2003,2004 Applera Corporation. All rights reserved.
4 * Author: Nathan Edwards
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received (LICENSE.txt) a copy of the GNU General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *************************************************************************/
20
21
22 #ifndef _IBPEP_FILTER_BITVEC_H
23 #define _IBPEP_FILTER_BITVEC_H
24
25 #include <iostream>
26 #include <utility>
27 #include <vector>
28 #include <map>
29 #include "char_io.h"
30 #include "keyword_tree.h"
31 #include "types.h"
32 #include "shift_and_inexact.h"
33
34 #if !defined(NO_STD_NAMESPACE)
35 using namespace std;
36 #endif
37
38 class filter_bitvec : public PatternMatch {
39 private:
40 shift_and_inexact *pm_;
41 long unsigned int num_patterns_;
42 long unsigned int max_patlen_;
43 pattern_hit_vector l;
44 std::vector<pattern_list::const_iterator> plit_;
45 public:
46 filter_bitvec(unsigned int k=0, char eos='\n',
47 bool wc=false, bool tn=false, bool indels=true, bool dna_mut=false);
48 filter_bitvec();
49 ~filter_bitvec();
50 long unsigned int add_pattern(std::string const & pat, unsigned long id=0,
51 int esb=0, int eeb=0);
52 bool find_patterns(CharacterProducer & cp,
53 pattern_hit_vector & kas,
54 long unsigned minka=1);
55 void init(CharacterProducer & cp);
56 void reset();
57 unsigned int mismatches() const;
58 void mismatches(unsigned int k);
59 bool wildcards() const;
60 void wildcards(bool wc);
61 bool wildcard_text_N() const;
62 void wildcard_text_N(bool tn);
63 bool indels() const;
64 void indels(bool id);
65 bool dna_mut() const;
66 void dna_mut(bool dm);
67 char eos_char() const;
68 void eos_char(char c);
69 };
70
71 #endif