One of the recurrent needs in NGS to calculate per position coverage and per position and per base coverage. IGV tools can be helpful in such calculations.
Link to download IGV tools is available under "Install igvtools" section in page: https://software.broadinstitute.org/software/igv/download. Download igvtools package. Igvtools is available as zip and unzip the zipped files. Put the files in system path or where user can access.

Requirements:
1) Samtools and IGVtools are installed
2) Bam file is indexed using samtools.
3) User knows the reference genome version (for eg. hg19, hg18)

Overall coverage calculation at each position:
$  sh /<path to igvtools>/igvtools count  -w 1   <filename>.bam  <filename>.wig  hg19

Example screenshot:



After calculation



Coverage calculation at each position per each base (A,C,G,T,N)

$  sh /<path to igvtools>/igvtools count  -w 1  --bases <filename>.bam  <filename>.wig  hg19
Example screen shot:


After calculation