Skip to content

Commit

Permalink
Skipped unmapped BAM reads with coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
dzerbino committed Jun 24, 2021
1 parent 97f23f2 commit d166db5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bamReader.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ typedef struct bamFileReaderData_st {
} BamReaderData;

static void storeReadComponents(HashFib * starts, HashFib * ends, bam1_t * aln) {
// Sometimes a read has coordinates, but is not mapped (cf BWA)
// We should skip these exceptions
if (aln->core.flag & 0x4)
return;
// Note that BAM coords are 0-based, hence +1
int start = aln->core.pos + 1;
uint32_t *cigar = bam_get_cigar(aln);
Expand Down

0 comments on commit d166db5

Please sign in to comment.