Commit 965a90c
Fix CRAM region queries when CIGAR isn't being decoded.
If using the required_fields option to select columns for decoding,
excluding CIGAR, then the sequence end position (cr->apos to cr->aend)
is not set correctly.
With CIGAR computed, ref_pos is increased by each CIGAR option.
Without it it'll end up being equivalent to cr->apos-1. Now it is
always minimum cr->apos itself (ie covers apos to apos inclusive).
The impact of this is filtering for the entirety of a single
chromosome could leave a sequence as pos 1 with apos=1 aend=0, which
then rejected the sequence as aend < 1 (for region chr:1-LEN).
I think this also fixes samtools/samtools#1574, but cannot be sure without
confirmation.1 parent 7d3eeec commit 965a90c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1777 | 1777 | | |
1778 | 1778 | | |
1779 | 1779 | | |
1780 | | - | |
| 1780 | + | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | 1783 | | |
| |||
0 commit comments