|BAMALIGNFRAC(1)||General Commands Manual||BAMALIGNFRAC(1)|
bamalignfrac - compute fraction of aligned bases in alignment file
bamalignfrac [options] <input.bam>
bamalignfrac reads a SAM/BAM/CRAM file, computes a set of statistical values and outputs these on the standard output channel. The values produced are
- the number of names passing a given regex filter
- the number of primary alignments
- the number of total alignments
- the total number of bases
- the total number of aligned bases
- the fraction of aligned bases
- the total number of clipped/unaligned bases
- the number of unmapped reads
These values are printed on the standard output channel at the end of the program run in the last line printed by the program. The program prints a set of line description line prior to that.
The input file needs to be provied in query name sorted order, which can be obtained via e.g.
$ bamsort SO=queryname
right before being passed to bamalignfrac.
The following key=value pairs can be given:
verbose=<0|1>: print preliminary values for file prefixes while processing the input file
name=<>: only consider reads matching the given regular expression. By default all reads are considered.
Written by German Tischler-Höhle.
Report bugs to <firstname.lastname@example.org>
Copyright © 2009-2019 German Tischler, © 2011-2013
Genome Research Limited. License GPLv3+: GNU GPL version 3
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.