forked from samtools/htslib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix indexing bug with "placed" unmapped reads.
Unmapped-but-placed (having REF/POS) reads are not included in the index. Hence if an placed unmapped is the first record in a bin, then it may not be returned. Note most aligners write out mapped followed by unmapped which does not trigger this problem. The SAM spec states that all unmapped placed reads should be considered as having an alignment length of 1. While it doesn't seem to explicitly state these must therefore be in the index, it does imply it. It appears that picard also indexes placed reads in this manner. Originally reported by John Marshall. Fixes samtools#1142
- Loading branch information
1 parent
f674651
commit 2b99b13
Showing
3 changed files
with
42 additions
and
8 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
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,11 @@ | ||
@HD VN:1.4 SO:coordinate | ||
@SQ SN:1 LN:249250621 M5:1b22b98cdeb4a9304cb5d48026a85128 | ||
@SQ SN:2 LN:243199373 M5:a0d9851da00400dec1098a9255ac712e | ||
um1 69 1 1000000 0 * * 0 0 AAAAAAAAAA * | ||
um1 137 1 1000000 44 10M * 0 0 AAAAAAAAAA * | ||
um2 69 1 2000000 0 * * 0 0 AAAAAAAAAA * | ||
um2 137 1 2000000 44 10M * 0 0 AAAAAAAAAA * | ||
mu1 137 2 1000000 44 10M * 0 0 AAAAAAAAAA * | ||
mu1 69 2 1000000 0 * * 0 0 AAAAAAAAAA * | ||
mu2 137 2 2000000 44 10M * 0 0 AAAAAAAAAA * | ||
mu2 69 2 2000000 0 * * 0 0 AAAAAAAAAA * |
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