Skip to content

Commit

Permalink
Ensure that reads that are already marked as duplicate are handled co…
Browse files Browse the repository at this point in the history
…rrectly in mark duplicates / mark optical duplicates.
  • Loading branch information
pcostanza committed Aug 19, 2020
1 parent 1712531 commit 78ce9b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elPrep: a high-performance tool for preparing SAM/BAM files.
Copyright (c) 2017, 2018 imec vzw.
Copyright (c) 2017-2020 imec vzw.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
2 changes: 1 addition & 1 deletion cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
// ProgramName is "elprep"
ProgramName = "elprep"
// ProgramVersion is the version of the elprep binary
ProgramVersion = "4.1.5"
ProgramVersion = "4.1.6"
// ProgramURL is the repository for the elprep source code
ProgramURL = "http://github.com/exascience/elprep"
)
Expand Down
4 changes: 2 additions & 2 deletions filters/mark-duplicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func MarkDuplicates(alsoOpticals bool) (sam.Filter, *sync.Map, *sync.Map) {
if alsoOpticals {
return func(aln *sam.Alignment) bool {
addLIBID(aln, lbTable) // need this for all reads when marking optical duplicates
if aln.FlagNotAny(sam.Unmapped | sam.Secondary | sam.Duplicate | sam.Supplementary) {
if aln.FlagNotAny(sam.Unmapped | sam.Secondary | sam.Supplementary) {
adaptAlignment(aln)
classifyFragment(aln, fragments)
classifyPair(aln, pairsFragments, pairs)
Expand All @@ -432,7 +432,7 @@ func MarkDuplicates(alsoOpticals bool) (sam.Filter, *sync.Map, *sync.Map) {
}
}
return func(aln *sam.Alignment) bool {
if aln.FlagNotAny(sam.Unmapped | sam.Secondary | sam.Duplicate | sam.Supplementary) {
if aln.FlagNotAny(sam.Unmapped | sam.Secondary | sam.Supplementary) {
addLIBID(aln, lbTable) // don't need this for all reads when not marking optical duplicates
adaptAlignment(aln)
classifyFragment(aln, fragments)
Expand Down

0 comments on commit 78ce9b8

Please sign in to comment.