Skip to content
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

MergeBamAlignment UNMAP_CONTAMINANT_READS does not set the CIGAR to "*" #1134

Closed
jleinenbach opened this issue Mar 9, 2018 · 0 comments · Fixed by #1316
Closed

MergeBamAlignment UNMAP_CONTAMINANT_READS does not set the CIGAR to "*" #1134

jleinenbach opened this issue Mar 9, 2018 · 0 comments · Fixed by #1316

Comments

@jleinenbach
Copy link

jleinenbach commented Mar 9, 2018

Bug Report

Affected tool(s)

MergeBamAlignment with option UNMAP_CONTAMINANT_READS=true

Affected version(s)

  • Tested with 2.17.10-6

Description

SAM files processed with MergeBamAlignment with UNMAP_CONTAMINANT_READS=true create the following error message when processed with other Picard tools:

Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. CIGAR must be '*' if RNAME is not specified;

Steps to reproduce

Process a SAM file with MergeBamAlignment and UNMAP_CONTAMINANT_READS=true option, then verify it with ValidateSamFile.

Expected behavior

CIGAR should be set to '*' for unmapped reads.

Actual behavior

CIGAR was not changed when unmapping contaminant reads:
Line: XXXX 93 * 0 0 150M * 0 0 GACAGCCACGTTCTGCAAACCTCCTTTTGGGCAGTGTGATTCCTTTTAGCCCTCAGAATGGTTTCTAC
TACAGATATATAGGCAGACAGCAAGATCTCAGAGAGCAAGCAGGCTGTGAGATCCTTCCAGCCAGCAAGGGGCTATTGATCC JJJJFJJJJJJJJJFJJJJJJFJFAFFJJJAJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJFJJFJJJJJJJJJJJJJJJJJF
-JJJJJJJJJJJJJJFFJJJAJJJAJFJJJJFJAFJFAFJJAFJAFAAAA RG:Z:XXX_L5 CO:Z:Cross-species contamination AS:i:150 XS:i:19


yfarjoun pushed a commit that referenced this issue Apr 16, 2019
yfarjoun pushed a commit that referenced this issue Jul 16, 2019
* This PR addresses a hodgepodge of issues in github, and also (while I was at it) adds some tests and a few stratifiers to CollectSamErrorMetrics.
- test for MergeBamAlignment
- fixes #1134
- refactored a bam reading loop in a test
- added unmapping strategy that makes the result "invalid" (for folks who do not wish to change the mapping quality or cigar even if it means creating an invalid record)
- fixed a test
- fix documentation in FilterSamReads (fixes #1322)
mjhipp pushed a commit to mjhipp/picard that referenced this issue Aug 1, 2019
* This PR addresses a hodgepodge of issues in github, and also (while I was at it) adds some tests and a few stratifiers to CollectSamErrorMetrics.
- test for MergeBamAlignment
- fixes broadinstitute#1134
- refactored a bam reading loop in a test
- added unmapping strategy that makes the result "invalid" (for folks who do not wish to change the mapping quality or cigar even if it means creating an invalid record)
- fixed a test
- fix documentation in FilterSamReads (fixes broadinstitute#1322)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant