Skip to content

equal treatment for supplementary alignments #137

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

Merged
merged 3 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.disq-bio</groupId>
<artifactId>disq</artifactId>
<version>0.3.6-SNAPSHOT</version>
<version>0.3.7-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you accidentally included the snapshot version change here. Could you revert that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but I thought we'd want to bump the version with this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets bumped automatically as part of the release process. If we bump it manually we'll end up skipping a version.

<name>Disq</name>
<description>A library for manipulating bioinformatics sequencing formats in Apache Spark.</description>
<url>https://github.com/disq-bio/disq</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,11 @@ private Result checkRecordStartInternal(long vPos) throws IOException {

boolean mapped = SAMFlag.READ_UNMAPPED.isUnset(flags);
boolean secondary = SAMFlag.SECONDARY_ALIGNMENT.isSet(flags);
if (mapped && ((seqLength == 0 && !secondary) || numCigarOps == 0)) {
// Non-empty cigar/seq in mapped reads, except secondary alignments can have '*' seq
boolean supplementary = SAMFlag.SUPPLEMENTARY_ALIGNMENT.isSet(flags);
boolean primaryLine = !secondary && !supplementary;
if (mapped && ((seqLength == 0 && primaryLine) || numCigarOps == 0)) {
// Non-empty cigar/seq in mapped reads
// except secondary and supplementary alignments can have '*' seq
return NO_START;
}

Expand Down
Binary file modified src/test/resources/zero-length-secondary-alignment.bam
Binary file not shown.