-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcigar.h
55 lines (47 loc) · 1.15 KB
/
cigar.h
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
#ifndef __seqio_cigar_h__
#define __seqio_cigar_h__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CIGAR_M 0
#define CIGAR_I 1
#define CIGAR_D 2
#define CIGAR_N 3
#define CIGAR_S 4
#define CIGAR_H 5
#define CIGAR_P 6
#define CIGAR_EQ 7
#define CIGAR_X 8
#define CIGAR_STATE "MIDNSHP=X"
typedef struct cigar_block_t cigar_block_t;
typedef struct {
struct {
int length;
int capacity;
cigar_block_t* cigars;
} _mete_info;
} cigar_string_t;
typedef struct{
const cigar_string_t* cigar;
const char* reference;
const char* query;
struct{
char* ref;
char* query;
char* aln;
}alignment;
}cigar_alignment_t;
cigar_string_t* seqioCigarInit();
void seqioCigarFree(cigar_string_t* cigar);
void seqioCigarPush(cigar_string_t* cigar, char state);
char* seqioCigarToString(cigar_string_t* cigar);
cigar_string_t* seqioCigarFromString(char* cigar_string);
cigar_alignment_t* seqioCigarToAlignment(const cigar_string_t* cigar, const char* reference, const char* query);
void seqioCigarFreeAlignment(cigar_alignment_t* alignment);
#ifdef __cplusplus
}
#endif
#endif // __seqio_cigar_h__