-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathsequenceUtils.h
More file actions
31 lines (20 loc) · 809 Bytes
/
sequenceUtils.h
File metadata and controls
31 lines (20 loc) · 809 Bytes
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
#ifndef SEQUENCEUTILS_H
#define SEQUENCEUTILS_H
#include <string>
#include <algorithm>
#include <cctype>
#include <stdint.h>
using namespace std;
typedef int64_t CHRPOS;
// Performs an in-place sequence reversal
void reverseSequence(string &seq);
// Performs an in-place reverse complement conversion
void reverseComplement(string &seq, bool isRNA = false);
// Converts every character in a string to lowercase
void toLowerCase(string &seq);
// Converts every character in a string to uppercase
void toUpperCase(string &seq);
// Calculates the number of a, c, g, t, n, and other bases found in a sequence
void getDnaContent(const string &seq, CHRPOS &a, CHRPOS &c, CHRPOS &g, CHRPOS &t, CHRPOS &n, CHRPOS &other);
int countPattern(const string &seq, const string &pattern, bool ignoreCase);
#endif