Calculate average read length in FASTQ files after Trimmomatic
In the legacy pipeline we need the average inner distance between R1 and R2. Typically we calculate that from the average fragment size (FragementSizeAvg on MergedItem) and the read length in the sequencing. Typically this works good enough, but when sequencing 2x150 and average fragment size of 160-180bp we get a lot of reading through to the adapter and trimming in the FASTQ files. In test data we have an average read length of ~120bp in the FASTQ files. Thus, we should really use the average read length instead of the sequencing length when calculating the average inner distance.