struct HTS::Bam::Pileup::Filter

Overview

Read-level filter applied by the pileup engine before a record reaches a column. Shared by both Pileup (single input) and Mpileup (multiple inputs).

Flags follow the SAM/samtools convention (see Bam::Flag constants): exclude_flags - skip the read if ANY of these bits are set (samtools -F / --ff) require_flags - skip the read unless ALL of these bits are set (samtools -f) min_mapq - skip reads with mapping quality below this count_orphans - when false, skip paired reads not in a proper pair

Example: Pileup::Filter.new(min_mapq: 20, exclude_flags: Bam::Flag::UNMAP | Bam::Flag::SECONDARY | Bam::Flag::QCFAIL | Bam::Flag::DUP | Bam::Flag::SUPPLEMENTARY, count_orphans: false)

Defined in:

hts/bam/pileup.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(min_mapq : Int32 = 0, *, exclude_flags : Bam::Flag = Bam::Flag::NONE, require_flags : Bam::Flag = Bam::Flag::NONE, count_orphans : Bool = true) #

[View source]

Instance Method Detail

def count_orphans? : Bool #

[View source]
def exclude_flags : Bam::Flag #

[View source]
def min_mapq : Int32 #

[View source]
def require_flags : Bam::Flag #

[View source]
def skip?(rec : Pointer(LibHTS::Bam1T)) : Bool #

Whether the pileup engine should skip this record.


[View source]