-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug in MergeBamAlignment (#1581)
- Fixed yet another bug in MergeBamAlignment: when there's a deletion in the base just beyond the 5' end of the mate, the code for clipping overhanging reads got confused and didn't clip anything. This commit fixes that. - Added tests that specifically cover this case.
- Loading branch information
Yossi Farjoun
authored
Sep 29, 2020
1 parent
c04a6e3
commit 9f0ec00
Showing
7 changed files
with
806 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
604 changes: 501 additions & 103 deletions
604
src/test/java/picard/sam/AbstractAlignmentMergerTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
testdata/picard/sam/MergeBamAlignment/indel_reads_aligned.sam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@HD VN:1.6 SO:queryname | ||
@SQ SN:chr1 LN:1000 M5:17522ddd273279f4595f50fea9864734 | ||
@PG ID:bwa PN:bwa VN:0.7.15-r1140 | ||
H2GCKCCXX150314:7:1101:10236:61064 81 chr1 490 0 4M2D147M = 496 -147 ACAGCTGCTGTAGGGCTGGCCTAAGTCAGGCAGTTCAAGATAACCTGAAGGAGTCGAATAACATCTATCCAGTGAGTCCTGCAAGACTTCAGGCTCTTTCTCATCCAGCAGCTCCCTGCTGAGCCTGGAAAAGTGGGAAAAAGTAAAGAAT F,<KKKFKKKKKF<FAFFAKKKKKKKKKFKFKKKAFKKKKKAKKKKKKKK<KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFAA NM:i:2 MD:Z:4^CA147 AS:i:147 XS:i:142 | ||
H2GCKCCXX150314:7:1101:10236:61064 161 chr1 496 0 144M7S = 490 147 CTGCTGTAGGGCTGGCCTAAGTCAGGCAGTTCAAGATAACCTGAAGGAGTCGAATAACATCTATCCAGTGAGTCCTGCAAGACTTCAGGCTCTTTCTCATCCAGCAGCTCCCTGCTGAGCCTGGAAAAGTGGGAAAAAGTAAAGCATCTGT AAFFFKKKFKKKKF<FKKKKAFKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKFKKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFKKKFKKKKKFFKFAFFKKKAFA7AFKKA,,A,FA7F<,AFK NM:i:0 MD:Z:144 AS:i:144 XS:i:139 | ||
H2GCKCCXX150314:7:1101:10338:42042 97 chr1 131 22 145M6S = 123 145 GATCCGGTCACCACTAACCATGGGCAGATCCATGGCAATGAGCTGGACTTTGTTGGGTTTTGCTATGAGAAGAGGAGGATCCAGGGCAGCTGCAAAATCAGAGAGTTTAGAGAACTCTATAAACTGGGTCGCATCGGGATCAAACCTGTCT AAFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFKKKKKK7FKKKKK<KKKKK NM:i:0 MD:Z:145 AS:i:145 XS:i:135 | ||
H2GCKCCXX150314:7:1101:10338:42042 145 chr1 123 21 5M2D146M = 131 -145 AGACAGGATCCGGTCACCACTAACCATGGGCAGATCCATGGCAATGAGCTGGACTTTGTTGGGTTTTGCTATGAGAAGAGGAGGATCCAGGGCAGCTGCAAAATCAGAGAGTTTAGAGAACTCTATAAACTGGGTCGCATCGGGATCAAAC A7KA<KKFKKFFKFFKKKKKKKKKKKKKKKFKKKKKKKKKKKKKFAAKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFAKKKKFF<KFKKKKKKKKKKKFKKKKKKKKKKKKFKKKKKKKKAKKKKKKKKKKKKKKFKKFAFAA NM:i:2 MD:Z:5^AT146 AS:i:146 XS:i:136 | ||
H2GCKCCXX150314:7:1101:10703:6319 81 chr1 799 60 3S148M = 799 -148 CAGGTTGGGACATTCTGAATAAGAGGTTAGTATCAGCGTTTTGCCATGTCCCCATGAACCCTGGTTCAGCCGTAGTCGTTCTGGTTCCGAACTGCATGGAGTTGTCAGTACAGGAGTCTCTTAAAGTCAAGTCTCTTGCCCTCTTTGGCTC AFAKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKAKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKF7KKKKKKKKKKKKKKKKKKFKKKKF7KKKKKKKKKKKKKKKKKKKKKFFFAA NM:i:0 MD:Z:148 AS:i:148 XS:i:0 | ||
H2GCKCCXX150314:7:1101:10703:6319 161 chr1 799 60 148M1D3M = 799 148 GTTGGGACATTCTGAATAAGAGGTTAGTATCAGCGTTTTGCCATGTCCCCATGAACCCTGGTTCAGCCGTAGTCGTTCTGGTTCCGAACTGCATGGAGTTGTCAGTACAGGAGTCTCTTAAAGTCAAGTCTCTTGCCCTCTTTGGCTCCTG AAFFFAAKKKKKKKKKKKKKKKKKKKKKKAKKKKKKKKKKKKKKKKKKKKKKKKKKFAFKKKKFKKKAFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKAKKKKKKKKKKKFFKKFKKKKKKKKKA NM:i:1 MD:Z:148^T3 AS:i:148 XS:i:0 | ||
H2GCKCCXX150314:7:1101:11535:49813 97 chr1 044 60 151M = 040 148 ATCAATTGCCTTATCAATTAGAAGGGCTGAATTTTGACCAAAGATCTTGCCACACTCATTACAATTGTAACGTTTTACTCCAGTATGAAGTCTACGATGGCAGGTAAGGGATGACTCCTGACTGAAGGTCTTGCCACACTCTTTACACCTG AAFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK NM:i:1 MD:Z:148T2 AS:i:148 XS:i:80 | ||
H2GCKCCXX150314:7:1101:11535:49813 145 chr1 040 60 3M1D148M = 044 -148 CAGATCAATTGCCTTATCAATTAGAAGGGCTGAATTTTGACCAAAGATCTTGCCACACTCATTACAATTGTAACGTTTTACTCCAGTATGAAGTCTACGATGGCAGGTAAGGGATGACTCCTGACTGAAGGTCTTGCCACACTCTTTACAC KKKFKKAFKKAKKKKKFFKFKKKKKFFAKKKKKKKKFKFKKFKKKKFF<KKKFKFKFKKKKKKKKKKKKKFFFKFKKKKKKKAKAFFKKFKF<KKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKFFAA, NM:i:1 MD:Z:3^T148 AS:i:148 XS:i:80 | ||
H2GCKCCXX150314:7:1101:11840:41972 81 chr1 836 60 4M1D147M = 842 -146 GACAGGTACATGCTTAATAGAAACATATGCATTGGAAAATCAACACTGTTTGAAGGGCTTTGTTCCAGGCTGTCAGATGCATGTGGAAAGAAAAGGACAGTTAAAGTCTACTGGAAAGAAAGAGAAAAGAAACACAGACAAGGAATACGTG #AKAAKFA<KKFKKFKKKKKKKKKKFKKKKKKKKKKKKFKKKKKKKKFKKKKKFFKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKAK<KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFFAA NM:i:1 MD:Z:4^T147 AS:i:147 XS:i:0 | ||
H2GCKCCXX150314:7:1101:11840:41972 161 chr1 842 60 146M5S = 836 146 GTACATGCTTAATAGAAACATATGCATTGGAAAATCAACACTGTTTGAAGGGCTTTGTTCCAGGCTGTCAGATGCATGTGGAAAGAAAAGGACAGTTAAAGTCTACTGGAAAGAAAGAGAAAAGAAACACAGACAAGGAATACGTGCTGTC AAFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKFKKKFKKKKFKKKKKKKKKKFKFKKKKKKKKFF7FKKKKKKKKKKKKKKKKKKKKKKFFKKKKKKKKKKFKKKKKKKKKKK NM:i:0 MD:Z:146 AS:i:146 XS:i:0 | ||
H2GCKCCXX150314:7:1101:11931:5317 81 chr1 758 60 3S148M = 758 -148 CAGGGGGAGATCGCCATACGTATAACCCAGTCCCTTTGGCCAGGTGACATTTGCTCTGAACTGGATGATACGAATGATGTCAGATTTGGAATCTAACATCGTGGCTGTGGAGAGGGTCAAGGAGTACTCCAAGACAGAGACAGAGGTGGGT A<KFKKKKF7AKFKKKKKKKKKFF7KKKFKKKKKKKKF7KKKKAKKKKKKKKFKKKKKKFKKKKKKKKKKKKKKKKKKAKKKFKFKKKKKKKKKKKKKFFKKKKKKFKKKKFKKKKKKFFFKFA,KKKKKKKKKKKKKKKKKKKFA<FFAA NM:i:0 MD:Z:148 AS:i:148 XS:i:0 | ||
H2GCKCCXX150314:7:1101:11931:5317 161 chr1 758 60 148M1D3M = 758 148 GGGGAGATCGCCATACGTATAACCCAGTCCCTTTGGCCAGGTGACATTTGCTCTGAACTGGATGATACGAATGATGTCAGATTTGGAATCTAACATCGTGGCTGTGGAGAGGGTCAAGGAGTACTCCAAGACAGAGACAGAGGTGGGTCTG AAFF<FKKKKKKKKKKKKKKKKKKAFKKK,AKKKKKKAFAFKKKKKKKKKFKAFFA<FAKKFKKKKKKKKAA,FKFFKKKKKFFFKKKAFFKKKKKKKKAF7<KKKKFKKK<KKK7KKKKKKA77AFKKAKKKKKKKKK,AFK,7FFA<7A NM:i:1 MD:Z:148^A3 AS:i:148 XS:i:19 | ||
H2GCKCCXX150314:7:1101:12033:69942 81 chr1 063 60 3M1D148M = 067 -148 CAGGTCCGATAGACACCAGGAAGCAACTAGCAGAGAATTTGGTAGTCATAGGTGGCACTTCTATGTTGCCAGGATTTCTCCACAGATTGCTTGCAGAAATAAGGTATTTGGTAGAAAAACCAAAATATAAAAAAGCACTTGGCACTAAGAC <<AFAKAAKKFKFKF<FAA7FFAKKKKKKKF7KKAAKKKKFAKKKKKKKKFFKFAKKFKKKKKKFKKKFKKKKKFAFKKKAKKFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKFK7<AKKKKKKKKKKKKKKFFFA, NM:i:1 MD:Z:3^T148 AS:i:148 XS:i:22 | ||
H2GCKCCXX150314:7:1101:12033:69942 161 chr1 067 60 146M5S = 063 148 GTCCGATAGACACCAGGAAGCAACTAGCAGAGAATTTGGTAGTCATAGGTGGCACTTCTATGTTGCCAGGATTTCTCCACAGATTGCTGGCAGAAAGAAGGTATTTGGTAGAAAAACCAAAATATAAAAAAGCACTTGGAACTAAGGCGTG ,AAFFFKKKKKKKKKKKKFKKKKKKKKKKKKKAKKKKAKA7FKKKKKKKKKKFFKKFKAAKFKKKKFFKF<FKAFFFKAKFKKK,FFK7F<FKA<F7FKKKKKK7F<,A<FAFK,AA,AA,<A,<7AA7FFAFA7FK############## NM:i:3 MD:Z:88T7T42C6 AS:i:131 XS:i:22 | ||
H2GCKCCXX150314:7:1101:12266:70276 81 chr1 723 16 38S39M2I72M = 817 -17 CACATGCATGCTTGTCGGTCGTTTGTGTCACATTCACCCTGTTGCAGGCGTGAATGCCGGTGGTGTTACACTCACACTGTTGTAGGAGTCCAGGTCGGTGGTGTTACACACATTCATGCTGTTGCAGGCGTGCAGGTCGGTGGTGTTACAC #################################################################AKAF7,7,A,AAKKKAF7F7KAA7,7,FKK<KKKFKKKKKKKAKKKFKKFKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFAA NM:i:9 MD:Z:14C1G1T13T9C3C2G61 AS:i:68 XS:i:59 | ||
H2GCKCCXX150314:7:1101:12266:70276 161 chr1 817 0 58M93S = 723 17 GGTCGGTGGTGTTACACACATTCACACTGTTGCAGGCGTGCAGGTCGGTGGTGTTACAGTTGGGCCTTAGAAAGATTACAGGTCGTTGAGGTTACAAAAAGTCTATATCACGAGGGCAGGGGGAAGTTGATGAATAAAAAGTAAAAAGTAA <AAAFFKKKKKKKKKKKKKKFKKKAFFKAKKKFKK7A<FFFKKFKKFF,FKKFKAFKK############################################################################################# NM:i:0 MD:Z:58 AS:i:58 XS:i:58 | ||
H2GCKCCXX150314:7:1101:13423:27626 97 chr1 241 0 125M26S = 198 109 GGGTGGAGCTGAGGGTGGAAGGGGAGTGAGCTGACGCTCGGAAGGTGTCTTGAGATTATCATCCGCTGAGGGTGGAAGCGGCCCCCGCAGAGGCTCGGCAGGTGTATTGATGTTATCATCTGCTGCGGGCGGGGCTGAGGGAGGAGGGGGA A<F<AFFKKKKAKKF<FF7,A<FK7F7FKKKKKKKKAKKF<,<AF<<F,,<AFKK,FFK77FFKKKKKFKKKKKFK<<,FKA<AF<F7<FK,F,A,,AAKFKKK<,A7K,<,,,,,,,,<AFKFK########################## NM:i:2 MD:Z:91C19A13 AS:i:115 XS:i:111 | ||
H2GCKCCXX150314:7:1101:13423:27626 145 chr1 198 0 40M1D111M = 241 -109 CCGCAGACGCTCGGCAGTCGTTTAGATATTATCATCTGCCGAGGGTGGAGCTGAGGGTGGAAGGGGAGTGAGCTGACGCTCGGAAGGTGTCTTGAGATTATCATCCGCTGAGGGTGGAAGCGGCCCCCGCAGACGCTCGGCAGGTGTATTG ##########################################FFKFKKFFF7FFFKKKFFKKKKKKKKKKKKFKKK<KKKFAKKKFKKKAKKFF7,,AFFKKKKFF<KFKFF,7FFKFAFKKFKFKFKKKFKFKKKKFFKKFKKKFFFFA, NM:i:5 MD:Z:17G0T2C1T16^T111 AS:i:124 XS:i:122 | ||
H2GCKCCXX150314:7:1101:14672:72157 81 chr1 626 60 3M1D148M = 630 -148 CAGGATGTAGAGGCAGCCATCGGCGTCCAGGCGGCCAGCATCACCCGTGTGCAGCCAGCCTTCCTCGTCGATGGCCTCACAAGTCTTGTCCTCCATGTTCAGGTAGCCCATGAATATGGTGCGGCCCCACAGGCAGATCTCGCCAATGCCC ##############A<KFFFKA(<,<KFA7<KFKKKKFFAFKKKKAKKKKKKKKFKAKKF7KKFKKFKKKAAFAFAKKKKKKKKKKKA7KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFAAA NM:i:2 MD:Z:3^T10A137 AS:i:143 XS:i:0 | ||
H2GCKCCXX150314:7:1101:14672:72157 161 chr1 630 60 134M17S = 626 148 GATGTAGAGGAAGCCATCGGCGTCCAGGCGGCCAGCATCACCCGTGTGCAGCCAGCCTTCCTCGTCGATGGCCTCACAAGTCTTGTCCTCCATGTTCAGGTAGCCCATGAATATGGTGCGGCCCCACAGGCAGAGCGCGCCAGTGCCCCGT AAAFFKKKKKKKKKKKKKFKKKFKKKKKKKKKKKKKKFKKFKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKFKFKFKAFKKKKAFKFKKKKKKKKFKKKKKKKFKKKKKKKKAKKKFFKK(,F,,<AAAK################## NM:i:0 MD:Z:134 AS:i:134 XS:i:0 | ||
H2GCKCCXX150314:7:1101:14986:51008 97 chr1 580 60 147M1I3M = 579 146 GCTGGGACGGGATGGGATTCTTCTCACGGCGCACGTTCTGTGGGCGGAGTGGGCGGAGCTGCCGGGGTCAGTTGGTCCAACTGTCCCGGCCTGAGGTGTCGGCCGGATCCCTCCTTCTCCCGGCGCCTCAAGCGGAAGGTGAGGGCCTGTC AAFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKKFFKFKFKFKKFKKKAF NM:i:2 MD:Z:80G69 AS:i:142 XS:i:0 | ||
H2GCKCCXX150314:7:1101:14986:51008 145 chr1 579 60 4S147M = 580 -146 GACAGGCTGGGACGGGATGGGATTCTTCTCACGGCGCACGTTCTGTGGGCGGAGTGGGCGGAGCTGCCGGGGTCAGTTGGTCCAACTGTCCCGGCCTGAGGTGTCGGCCGGATCCCTCCTTCTCCCGGCGCCTCAAGCGGAAGGTGAGGGC AFFFFAAKFFKKKKFKFKKKKKKKKKKKKFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKFKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFAA NM:i:1 MD:Z:81G65 AS:i:142 XS:i:0 | ||
H2GCKCCXX150314:7:1101:15169:9659 81 chr1 043 60 4S147M = 043 -147 ACAGCTTCTTGGAGCTTGTTTGCACACCAGCAGCCGCGCATGAGTAGTTGCCAATCTCAGCACCAAACTGCAGAGCCACGGCCACATCACAATCATCCACGCTTAGCACAGCCACCTTGTCCTTGGAGGGGCCCTGTGCACCCCCTAGGGC AKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKA,KKKKKKKKKKKKKKAKKKFKKKKKKKKFFFAA NM:i:0 MD:Z:147 AS:i:147 XS:i:0 | ||
H2GCKCCXX150314:7:1101:15169:9659 161 chr1 043 60 147M2D4M = 043 147 CTTCTTGGAGCTTGTTTGCACACCAGCAGCCGCGCATGAGTAGTTGCCAATCTCAGCACCAAACTGCAGAGCCACGGCCACATCACAATCATCCACGCTTAGCACAGCCACCTTGTCCTTGGAGGGGCCCTGTGCACCCCCTAGGGCCTGT <AFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKKKAFKKKKKKKKKFKFKKKKKKKFKKKKKKF<KKKKKKKKKKAKKKKKFFKKKKKKKKKKKKKKKKKKKKKKKKFKKKKFFKKKKKKKKFKKFKKFKKKKKKKKK< NM:i:2 MD:Z:147^AT4 AS:i:147 XS:i:0 | ||
H2GCKCCXX150314:7:1101:15291:20278 81 chr1 722 60 5M1D146M = 728 -146 GACAGCAGTAAGAAGAGGAGGAAAAAGAGAAAACGGAGGTCCCCCTTCCCTGGTTCCCTTCTTGCCTACCTCTGGATCTGTTGGATGCAGGGCAGGACAAAGACACGCCCTCCAGCCACCATGACTGGGGGGCTTCGGCAGAACCCTGCAA FKKKKKKKKKKKAKKKKKFFFFKKKKKKKKKKKKKKFKFKKKKKKFKKKKKKKKKKKKKKKFKKKKKKKKFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFAAA NM:i:1 MD:Z:5^A146 AS:i:146 XS:i:0 | ||
H2GCKCCXX150314:7:1101:15291:20278 161 chr1 728 60 146M5S = 722 146 CAGTAAGAAGAGGAGGAAAAAGAGAAAACGGAGGTCCCCCTTCCCTGGTTCCCTTCTTGCCTACCTCTGGATCTGTTGGATGCAGGGCAGGACAAAGACACGCCCTCCAGCCACCATGACTGGGGGGCTTCGGCAGAACCCTGCAACTGTC AAAFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKFKKKKKKKKKKKF<FKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFKKKKKAKAKKKKKKKAFKKKKKKKKKKK<AKKKKKKKKFA NM:i:0 MD:Z:146 AS:i:146 XS:i:0 |
Oops, something went wrong.