We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When provided with an unmapped BAM and a mapped BAM MergeBamAlignment returns all of the records instead of just the mapped records.
This can be reproduced by running MergeBamAlignment with the following example reads.
Unmapped reads:
Solexa-272222:1089771 77 * 0 0 * * 0 0 AGTGCTGGGATTACAGGCGTGNGCCNCCATGCCCNGCCCAGTATCATCCCTTTCAGTGACAGACNTTAGAGAGCACGGATTGGATTGATGCNGTAATGTCTCACCTCTCTGTCTCGCTCTGTTTTGGATAGCCGCATGTGCC ijjjjjjjjjjjjjjjjjjjj#ijj#jjjjjjjj#jjjjjjjjjjjjjjjijjjjjjjjjjjjj#jjijjjjjijjjjjjjijjjjjjjjj#ijjjjjijjjjjjjjjjjijjjjijjjjjjijjjjjjjjjjjjjjijjji aD:i:4 bD:i:1 cD:i:5 aE:f:0 bE:f:0 cE:f:0 RG:Z:A MI:Z:1089771 aM:i:2 bM:i:0 cM:i:3 RX:Z:ACGACTTG-GTCGAAGA ac:Z:AGTGCTGGGATTACAGGCGTGAGCCACCATGCCCAGCCCAGTATCATCCCTTTCAGTGACAGACTTTAGAGAGCACGGATTGGATTGATGCAGTAATGTCTCACCTCTCTGTCTCGCTCTGTTTTGGATAGCCGCATGTGCC bc:Z:AGTGCTGGGATTACAGGCGTGNGCCNCCATGCCCNGCCCAGTATCATCCCTTTCAGTGACAGACNTTAGAGAGCACGGATTGGATTGATGCNGTAATGTCTCACCTCTCTGTCTCGCTCTGTTTTGGATAGCCGCATGTGCC ad:B:s,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,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:Z:NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNM bq:Z:<====================!<==!========!===============<=============!==<=====<=======<=========!<=====<===========<====<======<==============<==== Solexa-272222:1089771 141 * 0 0 * * 0 0 AGATGCTTCGGCACATGCGGCTATCCAAANCAGAGCGAGACAGAGAGGTGAGACATTACTGCATCAATCCAATCCGTGCTCTCTAAAGTCTNTCACTGAAAGGGANGATACTGGGCTGGGCATGGTGGCTCACGNCTGTAATC jjijjjjjjjjjijjjjjjjjijjjjjjj#jjjjijjjjjjjjjjjjjjjjjjjjjjjjjjjijjjjjjijjjjjjjjjjjjjjjjjjjjj#jjijjjjijjjjj#jjjjjjjjijjjjjjjjjjjjjijjijj#jjijjjji aD:i:4 bD:i:1 cD:i:5 aE:f:0 bE:f:0 cE:f:0 RG:Z:A MI:Z:1089771 aM:i:2 bM:i:0 cM:i:3 RX:Z:ACGACTTG-GTCGAAGA ac:Z:AGATGCTTCGGCACATGCGGCTATCCAAAACAGAGCGAGACAGAGAGGTGAGACATTACTGCATCAATCCAATCCGTGCTCTCTAAAGTCTGTCACTGAAAGGGATGATACTGGGCTGGGCATGGTGGCTCACGCCTGTAATC bc:Z:AGATGCTTCGGCACATGCGGCTATCCAAANCAGAGCGAGACAGAGAGGTGAGACATTACTGCATCAATCCAATCCGTGCTCTCTAAAGTCTNTCACTGAAAGGGANGATACTGGGCTGGGCATGGTGGCTCACGNCTGTAATC ad:B:s,4,4,3,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4,4,3,4,3,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4,4,3,4,3,3,4,3,4,4,4,4,2,4,4,3,3,4,3,3,4,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,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NNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNN bq:Z:==<=========<========<=======!====<==================================<=====================!=======<=====!========<=============<=====!==<====<
Mapped reads:
Solexa-272222:1089771 99 chr15 34184835 0 16M51769N126M = 34236612 151 AGTGCTGGGATTACAGGCGTGNGCCNCCATGCCCNGCCCAGTATCATCCCTTTCAGTGACAGACNTTAGAGAGCACGGATTGGATTGATGCNGTAATGTCTCACCTCTCTGTCTCGCTCTGTTTTGGATAGCCGCATGTGCC ijjjjjjjjjjjjjjjjjjjj#ijj#jjjjjjjj#jjjjjjjjjjjjjjjijjjjjjjjjjjjj#jjijjjjjijjjjjjjijjjjjjjjj#ijjjjjijjjjjjjjjjjijjjjijjjjjjijjjjjjjjjjjjjjijjji AS:i:-19 ZS:i:-19 XN:i:0 XM:i:5 XO:i:0 XG:i:0 NM:i:5 MD:Z:21A3A8A29T26A50 YS:i:-10 YT:Z:CP XS:A:+ NH:i:2 Solexa-272222:1089771 147 chr15 34236612 0 143M = 34184835 -151 GATTACAGNCGTGAGCCACCATGCCCAGCCCAGTATCNTCCCTTTCAGTGANAGACTTTAGAGAGCACGGATTGGATTGATGCAGTAATGTCTCACCTCTCTGTCTCGCTCTGNTTTGGATAGCCGCATGTGCCGAAGCATCT ijjjjijj#jjijjijjjjjjjjjjjjjijjjjjjjj#jjjjjijjjjijj#jjjjjjjjjjjjjjjjjjjjjijjjjjjijjjjjjjjjjjjjjjjjjjjjjjjjjjijjjj#jjjjjjjijjjjjjjjijjjjjjjjjijj AS:i:-10 ZS:i:-20 XN:i:0 XM:i:5 XO:i:0 XG:i:0 NM:i:5 MD:Z:8G28A13C61T21G7 YS:i:-19 YT:Z:CP XS:A:+ NH:i:2 Solexa-272222:1089771 355 chr15 34185232 0 16M51372N126M = 34236612 151 AGTGCTGGGATTACAGGCGTGNGCCNCCATGCCCNGCCCAGTATCATCCCTTTCAGTGACAGACNTTAGAGAGCACGGATTGGATTGATGCNGTAATGTCTCACCTCTCTGTCTCGCTCTGTTTTGGATAGCCGCATGTGCC ijjjjjjjjjjjjjjjjjjjj#ijj#jjjjjjjj#jjjjjjjjjjjjjjjijjjjjjjjjjjjj#jjijjjjjijjjjjjjijjjjjjjjj#ijjjjjijjjjjjjjjjjijjjjijjjjjjijjjjjjjjjjjjjjijjji AS:i:-19 ZS:i:-19 XN:i:0 XM:i:5 XO:i:0 XG:i:0 NM:i:5 MD:Z:21A3A8A29T26A50 YS:i:-10 YT:Z:CP XS:A:+ NH:i:2 Solexa-272222:1089771 403 chr15 34236612 0 143M = 34185232 -151 GATTACAGNCGTGAGCCACCATGCCCAGCCCAGTATCNTCCCTTTCAGTGANAGACTTTAGAGAGCACGGATTGGATTGATGCAGTAATGTCTCACCTCTCTGTCTCGCTCTGNTTTGGATAGCCGCATGTGCCGAAGCATCT ijjjjijj#jjijjijjjjjjjjjjjjjijjjjjjjj#jjjjjijjjjijj#jjjjjjjjjjjjjjjjjjjjjijjjjjjijjjjjjjjjjjjjjjjjjjjjjjjjjjijjjj#jjjjjjjijjjjjjjjijjjjjjjjjijj AS:i:-10 ZS:i:-20 XN:i:0 XM:i:5 XO:i:0 XG:i:0 NM:i:5 MD:Z:8G28A13C61T21G7 YS:i:-19 YT:Z:CP XS:A:+ NH:i:2
I would expect a BAM with the 4 mapped reads.
I get a BAM with all 6 reads.
The text was updated successfully, but these errors were encountered:
I think this might be the same issue as #589. The last two reads in my mapped reads example are not primary alignments, based on the SAM flags.
Sorry, something went wrong.
No branches or pull requests
Bug Report
Affected tool(s)
MergeBamAlignment
Affected version(s)
Description
When provided with an unmapped BAM and a mapped BAM
MergeBamAlignment
returns all of the records instead of just the mapped records.Steps to reproduce
This can be reproduced by running
MergeBamAlignment
with the following example reads.Unmapped reads:
Mapped reads:
Expected behavior
I would expect a BAM with the 4 mapped reads.
Actual behavior
I get a BAM with all 6 reads.
The text was updated successfully, but these errors were encountered: