Repository navigation
Take several regions in one ramdump - #125
Merged
Merged
Conversation
ramdump took one region, so a list of regions cost a process each, most of it ROOT's libraries starting and the file being opened. It now reads several regions in turn from the file kept open, each region's records in order, as samtools view does without -M; -c counts them all. On chr20 of NA12878, 100 regions of 1 kb take 0.73 s in one process instead of 6.55 s in a process each.
| // Counting with no FLAG filter never has to decode a record. | ||
| if (countOnly && requireFlags == 0 && excludeFlags == 0) { | ||
| writer.Int(ramntuplescan(*ram, region.c_str(), nullptr)); | ||
| Long64_t total = 0; |
There was a problem hiding this comment.
warning: no header providing "Long64_t" is directly included [misc-include-cleaner]
tools/ramdump.cxx:18:
- #include <algorithm>
+ #include <RtypesCore.h>
+ #include <algorithm>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #125 +/- ##
===========================================
+ Coverage 88.90% 88.99% +0.08%
===========================================
Files 26 26
Lines 3506 3515 +9
Branches 1198 1203 +5
===========================================
+ Hits 3117 3128 +11
Misses 204 204
+ Partials 185 183 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ramdumptook one region, so a list of regions meant a process each: on chr20, 100regions of 1 kb took 65 ms a region, about 40 ms of it ROOT's libraries starting and
28 ms opening the file, against 6.3 ms a region in a process that keeps the file open.
ramdump file region...now reads the regions in turn from the file kept open, eachregion's records in order, as
samtools viewdoes without-M, so a record in two regionsis printed twice.
-cprints the count of all of them. The readers made at the firstrecord found serve every region after it.
NA12878 chr20 at 30x on a Xeon E5-2690 v4, pinned to one socket, file in the page cache,
medians of 5 runs in alternating order, the 100 regions of the paper's
access/loci.txt:The output is the same, byte for byte. A new test checks the order and the counts with and
without a FLAG filter. All tests pass. No format change.