forked from genome/ibwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbwaremap.h
52 lines (40 loc) · 1.35 KB
/
bwaremap.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
#ifndef __coordmap_h__
#define __coordmap_h__
#include "bntseq.h"
#include "bwtaln.h"
#include <stdint.h>
typedef struct
{
char *seqname;
int exact;
uint32_t start;
uint32_t stop;
char *cigar;
int n_gapo;
} read_mapping_t;
typedef struct {
read_mapping_t map;
uint64_t target_tid_offset;
} bnsremap_t;
typedef struct {
bntseq_t *bns;
ubyte_t *data;
int remap; /* set if the sequence is logically remapped onto another*/
bnsremap_t **mappings;
} seq_t;
#ifdef __cplusplus
extern "C" {
#endif
int load_remappings(seq_t* seq, const char* path);
int read_mapping_extract(const char *str, read_mapping_t *m);
void read_mapping_destroy(read_mapping_t *m);
int is_remapped_sequence_identical(const read_mapping_t *m, uint32_t start, uint32_t len);
// int remap_read_coordinates(const read_mapping_t *m, uint32_t *remapped, uint32_t len);
int remap_cigar(const char *cigar, uint32_t *result, uint32_t pos, uint32_t seqlen);
uint64_t bwa_remap_position(const seq_t* bns, const bntseq_t* target, uint64_t pac_coor, int32_t *seqid, int *status);
uint64_t bwa_remap_position_with_seqid(const seq_t* bns, const bntseq_t* target, uint64_t pac_coor, int32_t seqid, int *status);
int update_cigar(bwa_seq_t* seq, uint32_t pos, const seq_t* bns);
#ifdef __cplusplus
}
#endif
#endif /* __coordmap_h__ */