File: GenomicIntervalQuery.txt

package info (click to toggle)
pbbam 1.6.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,812 kB
  • sloc: cpp: 57,023; xml: 2,749; ansic: 869; python: 534; sh: 277; makefile: 187
file content (16 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// using C++11 range-based for loop
GenomicIntervalQuery query(GenomicInterval("chr1:1000-2000"), dataset);
for (const BamRecord& record : query) {
    // ... do stuff ...
}

// OR

// using iterators directly
GenomicIntervalQuery query(GenomicInterval("chr1:1000-2000"), dataset);
auto iter = query.cbegin();
auto end  = query.cend();
for (; iter != end; ++iter) {
    // ... do stuff ...
}