BamReader.this

Creates reader associated with file or stream. (If stream constructor is used, no random access is possible.)
Optionally, task pool can be specified. It will be used to unpack BGZF blocks in parallel.

  1. this(undead.stream.Stream stream, TaskPool task_pool)
    class BamReader
    this
    (
    undead.stream.Stream stream
    ,
    TaskPool task_pool = taskPool
    )
  2. this(string filename, std.parallelism.TaskPool task_pool)
  3. this(string filename)

Examples

import std.parallelism, bio.bam.reader;
void main() {
  auto pool = new TaskPool(4); // use 4 threads
  scope (exit) pool.finish();  // don't forget!
  auto bam = new BamReader("file.bam", pool);
  ...
}

Meta