Skip to content

Commit

Permalink
[extract] Add bam flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Jul 6, 2018
1 parent e576250 commit 8a8d3a5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,21 @@ func (r *Extracter) ExtractInterContigLinks() {
}
break
}
// Filtering: Unmapped | Secondary | QCFail | Duplicate | Supplementary
if rec.MapQ == 0 || rec.Flags&3844 != 0 {
continue
}

// Make sure we have these contig ids
at, bt := rec.Ref.Name(), rec.MateRef.Name()
ai, bi := r.contigToIdx[at], r.contigToIdx[bt]
ai, ok := r.contigToIdx[at]
if !ok {
continue
}
bi, ok := r.contigToIdx[bt]
if !ok {
continue
}

// read1 read2
// ---a-- X|----- dist = a2 ----| |--- dist = b ---|X ------ b2 ------
Expand Down

0 comments on commit 8a8d3a5

Please sign in to comment.