iVar

trim_primer_quality.h
1 #include<iostream>
2 #include<vector>
3
4 #include "primer_bed.h"
5 #include "htslib/sam.h"
6
7 #ifndef trim_primer_quality
8 #define trim_primer_quality
9
10 struct cigar_ {
11 uint32_t *cigar;
12 uint32_t nlength;
13 int32_t start_pos;
14 };
15
16 int trim_bam_qual_primer(std::string bam, std::string bed, std::string bam_out, std::string region_, uint8_t min_qual, uint8_t sliding_window, int min_length);
17 int32_t get_pos_on_query(uint32_t *cigar, uint32_t ncigar, int32_t pos, int32_t ref_start);
18 int32_t get_pos_on_reference(uint32_t *cigar, uint32_t ncigar, uint32_t pos, uint32_t ref_start);
19 void reverse_qual(uint8_t *q, int l);
20 void reverse_cigar(uint32_t *cigar, int l);
21 double mean_quality(uint8_t *a, int s, int e);
22 cigar_ quality_trim(bam1_t* r, int qual_threshold, int sliding_window);
23 void print_cigar(uint32_t *cigar, int nlength);
24 cigar_ primer_trim(bam1_t *r, int32_t new_pos);
25 void replace_cigar(bam1_t *b, int n, uint32_t *cigar);
26 int16_t get_overlapping_primer_indice(bam1_t* r, std::vector<primer> primers);
27 cigar_ remove_trailing_query_ref_consumption(uint32_t* cigar, uint32_t n);
28 cigar_ condense_cigar(uint32_t* cigar, uint32_t n);
29
30 #endif
cigar_
Definition: trim_primer_quality.h:10