Fix: improve region query logic in RAMNTupleView#15
Fix: improve region query logic in RAMNTupleView#15vgvassilev merged 2 commits intocompiler-research:developfrom
Conversation
AdityaPandeyCN
commented
Feb 1, 2026
- Add CIGAR span calculation for accurate read overlap detection
- Filter secondary/supplementary/unmapped reads (flag 0x904)
- Support reference name aliasing (chr1 <-> 1, chrM <-> MT)
- Handle flexible query formats (rname, rname:pos, rname:start-end, *)
- Use individual field views for better performance
- Add early termination when past query region
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (80.76%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #15 +/- ##
==========================================
Coverage ? 55.78%
==========================================
Files ? 16
Lines ? 1425
Branches ? 752
==========================================
Hits ? 795
Misses ? 521
Partials ? 109
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
|
||
| } // namespace | ||
|
|
||
| Long64_t ramntupleview(const char *file, const char *query, bool /*cache*/, bool /*perfstats*/, |
There was a problem hiding this comment.
warning: function 'ramntupleview' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
| Long64_t ramntupleview(const char *file, const char *query, bool /*cache*/, bool /*perfstats*/, | |
| Long64_t ramntupleviewstatic (const char *file, const char *query, bool /*cache*/, bool /*perfstats*/, |
In a separate PR, we should make codecov block PRs if the testing coverage degrades. |
|
Can you have a look @vgvassilev ? |
|
Can you address the clang-tidy and missing coverage first? |
|
|
||
| if (i < 10) { | ||
| chrom = "chr1"; | ||
| chrom_length = 249250621; |
There was a problem hiding this comment.
warning: Value stored to 'chrom_length' is never read [clang-analyzer-deadcode.DeadStores]
chrom_length = 249250621;
^Additional context
benchmark/generate_sam.cxx:52: Value stored to 'chrom_length' is never read
chrom_length = 249250621;
^| @@ -1,3 +1,4 @@ | |||
| #include <cstdint> | |||
| #include <gtest/gtest.h> | |||
There was a problem hiding this comment.
warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]
#include <gtest/gtest.h>
^There was a problem hiding this comment.
That's an issue which needs to be fixed in clang-tidy as we discussed.
|
Hi @vgvassilev , Can you have a look? Code cov of the test file should not be a issue and the ntupleview file is now above the required no. |
vgvassilev
left a comment
There was a problem hiding this comment.
There is still some relevant clang-tidy issues. Also this looks broken: https://app.codecov.io/gh/compiler-research/ramtools/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research
| std::string rest = region.substr(colonPos + 1); | ||
|
|
||
| size_t dashPos = rest.find('-'); | ||
| try { |
There was a problem hiding this comment.
Is it a good idea to rely on exceptions for this code?
There was a problem hiding this comment.
Removed try-catch exceptions
| @@ -1,3 +1,4 @@ | |||
| #include <cstdint> | |||
| #include <gtest/gtest.h> | |||
There was a problem hiding this comment.
That's an issue which needs to be fixed in clang-tidy as we discussed.
|
I guess codecov problem is it doesn't has a successful base commit to compare against, this PR would solve it(https://docs.codecov.com/docs/error-reference#section-missing-head-commit) |
|
@vgvassilev Can we get this in? |
vgvassilev
left a comment
There was a problem hiding this comment.
LGTM! Please squash everything into a single commit with the appropriate commit message.
- Add CIGAR span calculation for accurate read overlap detection - Filter secondary/supplementary/unmapped reads (flag 0x904) - Support reference name aliasing (chr1 <-> 1, chrM <-> MT) - Handle flexible query formats (rname, rname:pos, rname:start-end, *) - Use individual field views for better performance - Add early termination when past query region Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
7a8c111 to
d77d340
Compare
90f9f2c to
cef6ab1
Compare
|
@vgvassilev Squashed the commits! |
|
@vgvassilev Gentle reminder for this |
- Add CIGAR span calculation for accurate read overlap detection - Filter secondary/supplementary/unmapped reads (flag 0x904) - Support reference name aliasing (chr1 <-> 1, chrM <-> MT) - Handle flexible query formats (rname, rname:pos, rname:start-end, *) - Use individual field views for better performance - Add early termination when past query region Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com> use enums and add tests Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com> clang formatting Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com> add comments Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com> clang formatting Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com> clang formatting Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>