If you really need to get complex statistics from BAM files, Alistair Miles' pysamstats library is your port of call, at https://github.com/alimanfoo/pysamstats
To convert your raw sequence data to alignment data, you will need an aligner; the most widely used is the bwa (http://bio-bwa.sourceforge.net/)
Picard (surely a reference to Star Trek: The Next Generation) is the most commonly used tool to clean up BAM files; refer to http://broadinstitute.github.io/picard/
The technical forum for sequence analysis is SEQanswers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.