drunk on perbase pileups and lua expressions.
pbr <BAM_FILE> -f <FASTA_FILE> -t <THREADS> --mate-fix --max-depth <MAX_DEPTH> -k <FLANKING>Single Base Reference (-k 0)
pbr test/simple_test.bam -f test/simple_test.fa -t 4 --mate-fix --max-depth 500000 -k 0Multi-Base Reference Window (-k 1)
pbr test/simple_test.bam -f test/simple_test.fa -t 4 --mate-fix --max-depth 500000 -k 1Filter rows where the reference base is 'A':
pbr test/simple_test.bam -f test/simple_test.fa -t 4 --mate-fix --max-depth 500000 -k 0 --pile-expression "return pile.ref_base == 'A'"Filter rows where the reference window is 'AAG':
pbr test/simple_test.bam -f test/simple_test.fa -t 4 --mate-fix --max-depth 500000 -k 1 --pile-expression "return pile.ref_base == 'AAG'"Filter reads with a specific tag, e.g., RG:Z:test:
pbr test/simple_test.bam -f test/simple_test.fa -t 4 --mate-fix --max-depth 500000 -k 0 --pile-expression "return read:tag('RG') == 'test'"The --expression (-e) option allows you to filter reads using Lua expressions. The read object exposes the following fields:
qname: Query name- ....
The --pile-expression (-p) option allows you to filter rows using Lua expressions. The pile object exposes the following fields:
depth: Read deptha,c,g,t,n: Counts of each baseins,del,ref_skip,fail: Counts of insertions, deletions, reference skips, and failed readspos: 0-based positionref_base: Reference base or window (e.g.,'A'for-k 0,'AAG'for-k 1)
The output is a tab-separated file with the following columns:
#chrom: Chromosome namepos0: 0-based positionref_base: Reference base or window (e.g.,'A'for-k 0,'AAG'for-k 1)depth: Read deptha,c,g,t,n: Counts of each base