-
Notifications
You must be signed in to change notification settings - Fork 8
/
SAMhandler.h
65 lines (41 loc) · 1.22 KB
/
SAMhandler.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
56
57
58
59
60
61
62
63
64
65
#ifndef __SAM_H__
#define __SAM_H__
#include <stdio.h>
#include <stdlib.h>
#include "HSP.h"
#include "definitions.h"
#include "sam.h"
#define OCC_CACHE_SIZE 81920
typedef struct OCCPositionCache
{
unsigned short ChromId;
unsigned char ReadStrand;
unsigned long long tp;
int occMismatch;
int resultSource;
char *cigarString;
unsigned int len;
} OCCPositionCache;
typedef struct OCCPositionCacheToDisk
{
unsigned char cell[11];
} OCCPositionCacheToDisk;
typedef struct OCC
{
unsigned int occPositionCacheCount;
OCCPositionCache occPositionCache[OCC_CACHE_SIZE];
OCCPositionCacheToDisk occPositionCacheToDisk[OCC_CACHE_SIZE];
bam1_t SAMOutBuffer;
} OCC;
#define SAM_MDATA_SIZE 2048
int SAMIUint8ConcatUint8(uint8_t *data, int *curSize,
uint8_t key);
int SAMIUint8ConcatUint32(uint8_t *data, int *curSize,
uint32_t key);
int SAMIUint8ConcatString(uint8_t *data, int *curSize,
char *key, int len);
void SAMOutputHeaderConstruct(bam_header_t *sheader, HSP *hsp);
void SAMOutputHeaderDestruct(bam_header_t *sheader);
void SAMOccurrenceConstruct(OCC *occ);
void SAMOccurrenceDestruct(OCC *occ);
#endif