Script to save qc-data from RNA-seq pipe to file

Hi! @vezzi @ewels 

I understand you are reacting on this. I should have added some notes when sending the pull request. Ok, so the current RNA-seq pipeline works like this:

1) For each sample (can be merged from several runs or lanes) there is a bam file with duplicates and one where duplicates are removed. 
2) bam_stat.py is run on the two bam files (per sample) and the output is dumped to a file. Looks like this:
---------------------
The following have been reloaded with a version change:
  1) samtools/0.1.12-10 => samtools/0.1.19

bam_stat.py 2.3.6

===== Mapping statistics based on all reads =====
Load BAM file ...  Done

#==================================================
Total Records:                43581466

QC failed:                    0
Optical/PCR duplicate:        0
Non Primary Hits              4688936
Unmapped reads:               0
mapq < mapq_cut (non-unique): 1996072

mapq >= mapq_cut (unique):    36896458
Read-1:                       18649753
Read-2:                       18246705
Reads map to '+':             18447328
Reads map to '-':             18449130
Non-splice reads:             27987312
Splice reads:                 8909146
Reads mapped in proper pairs: 23123614

===== Mapping statistics based on reads after duplicate removal =====
Load BAM file ...  Done

#==================================================
Total Records:                38031467

QC failed:                    0
Optical/PCR duplicate:        0
Non Primary Hits              4688936
Unmapped reads:               0
mapq < mapq_cut (non-unique): 1531780

mapq >= mapq_cut (unique):    31810751
Read-1:                       15956601
Read-2:                       15854150
Reads map to '+':             15904417
Reads map to '-':             15906334
Non-splice reads:             24055384
Splice reads:                 7755367
Reads mapped in proper pairs: 20055034
===== Number of spliced alignments (dupRem) =====
spliced:          8006553
---------------------
3) A script is run to pars all output files and dumps the data to a joint json file "stat.json"

As you can see bam_stat.py reports different numbers for unique mapped read 1 and read 2 and this is why they are summed and divided by two when not singe end.

About the script Im fully aware its ugly and can me written in a more efficient way. I just didnt want to spend time on that since its a temporary thing (will be replaced by Phills pipeline). Ju just copied some code from the old (and ugly) RNA-seq pipe and rewrote a little.