-
Notifications
You must be signed in to change notification settings - Fork 8
/
SAM.h
73 lines (62 loc) · 2.38 KB
/
SAM.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
66
67
68
69
70
71
72
73
/*
*
* SAM.h
* Soap3(gpu)
*
* Copyright (C) 2011, HKU
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef __SAM_H__
#define __SAM_H__
#include <stdio.h>
#include <stdlib.h>
#include "2bwt-lib/BWT.h"
#include "2bwt-lib/HSP.h"
#include "2bwt-flex/HOCC.h"
#include "2bwt-flex/OCC.h"
#include "definitions.h"
#include "Release.h"
#include "samtools-0.1.18/sam.h"
#define SAM_FLAG_IS_PAIR_READ 1
#define SAM_FLAG_PROPER_PAIR 2
#define SAM_FLAG_READ_UNMAPPED 4
#define SAM_FLAG_MATE_UNMAPPED 8
#define SAM_FLAG_READ_ALGNMT_STRAND 16
#define SAM_FLAG_MATE_ALGNMT_STRAND 32
#define SAM_FLAG_FIRST_IN_PAIR 64
#define SAM_FLAG_SECOND_IN_PAIR 128
#define SAM_FLAG_SECONDARY_ALGNMT 256
#define SAM_FLAG_QC_CHECK_FAILED 512
#define SAM_FLAG_DUPLICATE 1024
#define SAM_MDATA_SIZE 2048
// SAM_MAPQ_UNAVAILABLE should be set to 255
// according to SAM v1.4 specification.
// However we are making an exception here
// as some of the downstream programs are not
// capable of handling 255.
#define SAM_MAPQ_UNAVAILABLE 255
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, HSPAux * hspaux, int maxReadLength );
void SAMOutputHeaderDestruct ( bam_header_t * sheader );
void SAMOccurrenceConstruct ( OCC * occ );
void SAMOccurrenceDestruct ( OCC * occ );
#endif