File: maskFastaFromBed.h

package info (click to toggle)
bedtools 2.27.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 54,804 kB
  • sloc: cpp: 38,072; sh: 7,307; makefile: 2,241; python: 163
file content (59 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download
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
/*****************************************************************************
  maskFastaFromBed.h
  (c) 2009 - Aaron Quinlan
  Hall Laboratory
  Department of Biochemistry and Molecular Genetics
  University of Virginia
  aaronquinlan@gmail.com

  Licenced under the GNU General Public License 2.0 license.
******************************************************************************/
#ifndef MASKFASTAFROMBED_H
#define MASKFASTAFROMBED_H

#include "bedFile.h"
#include "sequenceUtils.h"
#include "split.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <cctype>   /* for tolower */

using namespace std;

//************************************************
// Class methods and elements
//************************************************
class MaskFastaFromBed {

public:

    // constructor
    MaskFastaFromBed(const string &fastaInFile,  const string &bedFile,
                     const string &fastaOutFile, bool softMask, char maskChar,
                     bool useFullHeader);

    // destructor
    ~MaskFastaFromBed(void);


private:

    bool _softMask;
    bool _useFullHeader;

    string _fastaInFile;
    string _bedFile;
    string _fastaOutFile;
    char   _maskChar;     // typically "N", but user's can choose something else, e.g., "X"

    // instance of a bed file class.
    BedFile *_bed;

    void MaskFasta();

    void PrettyPrintChrom(ofstream &out, string chrom, const string &sequence, int width);

};

#endif /* MASKFASTAFROMBED */