Usually for DNA we map PE data to the genome and then use picard's CollectInsertSizeMetrics to give a insert size distribution. For RNA PE data we map to the genome with STAR and then want to look at insert size. I don't think that CollectInsertSizeMetrics will work, since it will think that spliced reads actually have the entire intron as the insert, thus artificially increasing the insert size. Is there a splicing aware tool that will calculate the actual insert size after mapping to the genome? I realize I can also map to the transcriptome and CollectInsertSizeMetrics should work, but I'm wondering if there is an alternate to having to do both mappings.
You can filter out spliced reads from your bam file and use the non-spliced reads to calculate the insert size. See the post: Samtools Filter Reads Cigar Field