<p>Is there a tool or maybe a method in R to produce a line graph of the coverage of mapped resequencing, for each chromosome of the mapped <a href='http://samtools.sourceforge.net/SAM1.pdf'>bam</a> file? I'm looking to compare the coverage across the genome of mapped reads using two different mapping software.</p>

Do a simple loop with bash & samtools:

    cut -d '       ' -f 1 reference.fa.fai |\
     while read CHROM
     do
         for BAM in *.bam
         do
             echo -n -e "${CHROM}\t${BAM}\t"
             samtools  view -F 4  -c ${BAM} ${CHROM}
         done
     done