Match BAM headers bw files and get active chromosome list (from restrict) (written by Aaron Lun, 12 Dec 2014, copied and modified here)

activeChrs(bam.files, restrict)

Arguments

bam.files

Character . bam files to check

restrict

character. Chromosomes to select

Value

Vector of selected chromosomes