| 1 |
#ifndef ABPOA_OUTPUT_H |
| 2 |
#define ABPOA_OUTPUT_H |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
|
| 6 |
#ifdef __cplusplus |
| 7 |
extern "C" { |
| 8 |
#endif |
| 9 |
|
| 10 |
typedef struct cand_het_pos_t { |
| 11 |
int pos, depth, var_type, count; // count: number of heterogeneous bases with same profile |
| 12 |
int n_uniq_alles; |
| 13 |
int *n_clu_reads, **clu_read_ids; // size: (m+1) * n_clu_reads[i]; allele -> read ids belong to this allele |
| 14 |
int *read_id_to_allele_idx; // size: n_seq, -1:not cover this het pos, else: allele index (0... n_uniq_alles-1) |
| 15 |
uint8_t *alle_bases; // size: n_uniq_alles, sorted by allele's first appearance position |
| 16 |
} cand_het_pos_t; |
| 17 |
|
| 18 |
typedef struct read_het_profile_t { |
| 19 |
int read_id; // 0 .. n_seq-1 |
| 20 |
int start_het_idx, end_het_idx; // 0 .. n_het_pos-1 |
| 21 |
int *alleles; // 0:ref(het->base), 1:alt |
| 22 |
} read_het_profile_t; |
| 23 |
|
| 24 |
typedef struct cand_het_t { |
| 25 |
// static information |
| 26 |
int pos, phase_set; // 0-based |
| 27 |
int var_type; // BAM_CINS/BAM_CDEL/BAM_CDIFF |
| 28 |
int n_depth; // may not be n_seq, as some reads are partially aligned |
| 29 |
int n_uniq_alles; |
| 30 |
int *alle_covs; // size: n_uniq_alles |
| 31 |
uint8_t *alle_bases; // size: n_uniq_alles |
| 32 |
|
| 33 |
// dynamic information, update during haplotype assignment |
| 34 |
uint8_t *alle_to_hap; // var-wise (alle_to_hap): alle_i -> 1:H1/2:H2/0:not set yet |
| 35 |
int **hap_to_alle_profile; // read-wise: 1:H1/2:H2 -> alle_i -> read count |
| 36 |
int *hap_to_cons_alle; // HAP-wise (hap_to_cons_alle_i): 1:H1/2:H2 -> alle_i |
| 37 |
|
| 38 |
uint8_t is_low_qual, is_skipped; |
| 39 |
} cand_het_t; |
| 40 |
|
| 41 |
|
| 42 |
void set_65536_table(void); |
| 43 |
void set_bit_table16(void); |
| 44 |
|
| 45 |
#ifdef __cplusplus |
| 46 |
} |
| 47 |
#endif |
| 48 |
|
| 49 |
#endif |