Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the mpileup BAM_CREF_SKIP filter. #2281

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions bam2bcf_edlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,19 +1559,10 @@ int bcf_edlib_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos,
}
}

int qbeg, qpos, qend, tbeg, tend, kk;
int qbeg, qpos, qend, tbeg, tend;
uint8_t *seq = bam_get_seq(p->b);
uint32_t *cigar = bam_get_cigar(p->b);
if (p->b->core.flag & BAM_FUNMAP) continue;

// FIXME: the following loop should be better moved outside;
// nonetheless, realignment should be much slower anyway.
for (kk = 0; kk < p->b->core.n_cigar; ++kk)
if ((cigar[kk]&BAM_CIGAR_MASK) == BAM_CREF_SKIP)
break;
if (kk < p->b->core.n_cigar)
continue;

// determine the start and end of sequences for alignment
int left2 = left, right2 = right;
int min_win_size = MAX(-biggest_del, biggest_ins);
Expand Down
11 changes: 1 addition & 10 deletions bam2bcf_indel.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,19 +845,10 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos,
}
}

int qbeg, qpos, qend, tbeg, tend, kk;
int qbeg, qpos, qend, tbeg, tend;
uint8_t *seq = bam_get_seq(p->b);
uint32_t *cigar = bam_get_cigar(p->b);
if (p->b->core.flag & BAM_FUNMAP) continue;

// FIXME: the following loop should be better moved outside;
// nonetheless, realignment should be much slower anyway.
for (kk = 0; kk < p->b->core.n_cigar; ++kk)
if ((cigar[kk]&BAM_CIGAR_MASK) == BAM_CREF_SKIP)
break;
if (kk < p->b->core.n_cigar)
continue;

// determine the start and end of sequences for alignment
// FIXME: loops over CIGAR multiple times
int left2 = left, right2 = right;
Expand Down