Skip to content

Commit

Permalink
Initialised variables,
Browse files Browse the repository at this point in the history
  • Loading branch information
whitwham authored and daviesrob committed Sep 2, 2019
1 parent 4a2fb7f commit 0557cd1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bam_markdup.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ static inline int get_coordinate_positions(const char *qname, int *xpos, int *yp
static int optical_duplicate(bam1_t *ori, bam1_t *dup, long max_dist) {
int ret = 0, seps;
char *original, *duplicate;
int oxpos, oypos, dxpos, dypos;
int oxpos = 0, oypos = 0, dxpos = 0, dypos = 0;


original = bam_get_qname(ori);
Expand Down Expand Up @@ -620,12 +620,12 @@ static int mark_duplicates(md_param_t *param, khash_t(duplicates) *dup_hash, bam

if (param->opt_dist) { // mark optical duplicates
if (optical_duplicate(ori, dup, param->opt_dist)) {
bam_aux_append(dup, "dt", 'Z', 3, (uint8_t *) "SQ");
bam_aux_append(dup, "dt", 'Z', 3, (const uint8_t *)"SQ");
dup_type = 'O';
(*optical)++;
} else {
// not an optical duplicate
bam_aux_append(dup, "dt", 'Z', 3, (uint8_t *) "LB");
bam_aux_append(dup, "dt", 'Z', 3, (const uint8_t *)"LB");
}
}

Expand Down Expand Up @@ -1098,10 +1098,10 @@ static int bam_mark_duplicates(md_param_t *param, char *arg_list, char *out_fn,

if (param->opt_dist) {
if (kh_val(dup_hash, k).type) {
bam_aux_append(b, "dt", 'Z', 3, (uint8_t *) "SQ");
bam_aux_append(b, "dt", 'Z', 3, (const uint8_t *)"SQ");
np_opt_duplicate++;
} else {
bam_aux_append(b, "dt", 'Z', 3, (uint8_t *) "LB");
bam_aux_append(b, "dt", 'Z', 3, (const uint8_t *)"LB");
}
}
}
Expand Down

0 comments on commit 0557cd1

Please sign in to comment.