-
Notifications
You must be signed in to change notification settings - Fork 308
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
Fix Adam2fastq in case of read with both reverse and unmapped flags #982
Conversation
Test PASSed. |
@@ -222,7 +222,7 @@ class AlignmentRecordConverterSuite extends FunSuite { | |||
|
|||
} | |||
|
|||
test("converting to fastq with unmapped reads") { | |||
test("converting to fastq with unmapped reads when read reverse strand flag was set") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you create a new unit test instead of modifying this existing one? it is better to always be increasing unit test coverage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test as it is was previously written handled the case which it was then testing, which was the case of reverse stand flag with negative flag, incorrectly and thus failed with the changes introduced by this PR. I modified the test to be correct, and the change in the message above to converting to fastq with unmapped reads when read reverse strand flag was set
just describes the test more specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree with @heuermh; specifically, I would fix the current test, and add a new test that tests the "unmapped + reverse strand flag" case.
Other than the test case nit, LGTM! |
…d without rev complement (0x10) set. Also revised 'first' and 'second' ordering in tests to me more clear.
Test PASSed. |
Thanks for the test fix! Can you squash down and rebase? @heuermh if it looks good to you, I will merge. |
+1 |
I updated PR so that tests cover correctly both umapped with Ox10 set and unset. The existing test did need to be revised as it was incorrect before. I had to add a the new test using different different records because actually the case which was not covered previously was the case of umapped without Ox10 set, and required a different record to test. I also revised to be consistent what was previously a confusing re-ordering of
or
is more clear if the tuple order remains the same and the val names are not switched when parsing the tuple. And yes - I'll squash and rebase |
Actually, I can take care of the rebase + squash when merging. I'll merge this now... |
Fixes the bug in fastq dump discussed in #980
specifically for case of a read that has both reverse and unmapped flags set in the input bam file.